Index your Salesforce support cases, so the answers your agents already wrote can answer the next question. The source connects with its own Salesforce connected app. To index Knowledge articles as well, add a Salesforce Knowledge source. It can use the same connected app.
Cases hold customer details. Add this source to an internal knowledge base, or at least turn on PII masking before the first sync. Masking only applies to cases indexed after you turn it on.

Before you start

  • A Pro or Enterprise plan.
  • Your org’s My Domain URL, for example https://acme.my.salesforce.com.
  • The Edit Sources permission on the knowledge base. Owners and admins always have it.

Set up

1

Create a connected app

In Salesforce Setup → App Manager, create a connected app with OAuth turned on and Enable Client Credentials Flow ticked. In the app’s policies, set a Run As user who can read cases. If you already did this for Salesforce Knowledge, reuse that app.
2

Add the source

In Kelu, open the knowledge base, go to Sources → Add source, pick Salesforce Cases and click Continue. Enter a Display name, then the Instance URL, Consumer key and Consumer secret.
3

Choose the scope

Set the options below. Created within starts at 180 days — clear it to index the whole case history.
4

Test and add

Click Test connection, then Add source.

Options

These are on the add form:
OptionDefaultWhat it does
Closed cases onlyOnSkips open cases.
Include the email threadOffAdds the case’s emails, signatures and quoted replies included.
Created within (days)180Only cases opened in the last N days. Empty indexes every case.
Updated within (days)EmptyOnly cases changed in the last N days.
These are on the source’s Configuration tab, after you add it. Each takes one value per line. Empty means no limit.
OptionWhat it does
StatusesOnly cases in these statuses, spelled as in your picklist — for example Closed - Resolved. Use it to leave out Closed - Duplicate.
Record typesOnly these record types, by developer name.
Case typesOnly these case types, such as Problem.
PrioritiesOnly these priorities, such as High.
OriginsOnly cases that arrived this way, such as Email.
Custom fieldsExtra Case fields to index, by API name — for example Resolution__c.
Include private commentsOff by default. Private case comments are agent notes the customer never saw. Turn on to index them too.
A case must match every option you set. Within one option, any listed value matches.

What gets indexed

Each case becomes one document, titled Case <number>: <subject> and linked to the case in Salesforce. It holds the status, type, priority, origin and dates, the description, any custom fields you named, and the public comments (plus emails, if on) in date order. Private comments are left out unless you turn them on. When emails are included and a closed case ends with an email from your team, that email is filed under Resolution.

Sync

Cases sync every 10 minutes. Only cases that changed are read again. Sync Now on the source page runs a sync at once. A sync removes cases that were deleted in Salesforce, and cases that no longer match your options. The one exception is Created within and Updated within: a case that only aged out of that window stays in the index. Remove it by hand on the Documents tab.

Troubleshooting

  • “salesforce token error” — the client credentials flow is off, no Run As user is set, or the key or secret is wrong. The message includes Salesforce’s own reason.
  • “read Case” fails on Test connection — the Run As user cannot read cases.
  • Fewer cases than expected — check Closed cases only and Created within, which starts at 180 days.
  • Cases showing on a public widget — move them to an internal knowledge base. Changing New documents to Restricted under Configuration only affects cases indexed after the change.