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
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.
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.
Choose the scope
Set the options below. Created within starts at 180 days — clear it to index the whole case history.
Options
These are on the add form:| Option | Default | What it does |
|---|---|---|
| Closed cases only | On | Skips open cases. |
| Include the email thread | Off | Adds the case’s emails, signatures and quoted replies included. |
| Created within (days) | 180 | Only cases opened in the last N days. Empty indexes every case. |
| Updated within (days) | Empty | Only cases changed in the last N days. |
| Option | What it does |
|---|---|
| Statuses | Only cases in these statuses, spelled as in your picklist — for example Closed - Resolved. Use it to leave out Closed - Duplicate. |
| Record types | Only these record types, by developer name. |
| Case types | Only these case types, such as Problem. |
| Priorities | Only these priorities, such as High. |
| Origins | Only cases that arrived this way, such as Email. |
| Custom fields | Extra Case fields to index, by API name — for example Resolution__c. |
| Include private comments | Off by default. Private case comments are agent notes the customer never saw. Turn on to index them too. |
What gets indexed
Each case becomes one document, titledCase <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.