Salesforce Cases
Kapa provides an integration to pull Cases from your Salesforce org. This integration allows your AI assistant to ground the answers in real customer support interactions, agent responses, and case resolutions, providing more relevant and accurate answers to your users.
Salesforce Cases contains customer-facing support data. Only add this source to an internal project. Verify you are in the correct project before connecting.
Prerequisites
- A Salesforce org (Production)
- Permission to install an External Client App
Data ingested
When you connect Kapa to Salesforce Cases, the following data is ingested per case:
- Standard Case fields: case number, subject, description, status, priority, origin, type, open/closed state, and creation and modification timestamps
- Case comments: comment body, author ID, and timestamp
- Email messages: subject, body, and message timestamp
- Chatter feed: post bodies and threaded replies (text, link, content, question, and answer posts)
- Custom fields: values of any custom Case fields you select in the Fields step
Ownership
The Salesforce Cases source is tied to the Kapa user who completes the OAuth connection. Only that user can modify the source configuration. Other team members can view the connection details but cannot change them.
If the connecting user's Kapa account is later deleted, the source becomes locked and cannot be reconfigured. In that situation, create a new Salesforce Cases source.
Setup
Step 1: Install the Kapa.ai External Client App in your Salesforce organization
- Open up this link to install the Kapa.ai External Client App
- Install the application, and give access to All users or just the profiles you want to be able to Create the Salesforce Cases source
- To ensure that the ingestion continues to work, make sure to mark the
Refresh Token Policy->Refresh token is valid until revokedin the App Authorization section of the app.
Step 2: Connect your Salesforce org
- Go to the Sources tab in the Kapa platform
- Click Add new source
- Select Salesforce Cases as the source type
- Click Connect Salesforce
- A Salesforce login window opens. Sign in with a user account that has access to Cases in your org
- Approve the Kapa External Client App when prompted
- The window closes automatically and the Connect step shows a Connected to Salesforce confirmation
Step 3: Configure filters
Use filters to control which cases are ingested. All include filters act as allowlists. An empty list means no restriction on that dimension. Filters across dimensions are AND-ed together; values within a single filter are OR-ed.
Configure the filters that match your use case, then click Next.
Step 4: Select custom fields
Optionally pick custom Case fields whose values should be included alongside the standard fields in the indexed content. It's important to only select fields that you believe could provide meaningful context during retrieval. Click Save to start the initial ingestion.
Configuration options
Filters
| Option | Description | Default |
|---|---|---|
| Case age | Only include cases created within this window | Opened in the last 6 months |
| Statuses | Only include cases with these statuses | All statuses |
| Priorities | Only include cases with these priorities | All priorities |
| Origins | Only include cases with these origins | All origins |
| Types | Only include cases of these types | All types |
| Record types to include | Only include cases with these record types | All record types |
| Owner queues to include | Only include cases owned by these queues | All queues |
| Advanced filter rules | Custom field-level include/exclude rules (see below) | None |
Advanced filter rules
The filter builder lets you write rules against any Case field or 1-hop related-object field (Account, Contact, Owner, Asset, RecordType). Each rule has three parts:
-
Field - pick from Case fields or related-object fields discovered from your org's schema
-
Operator - the available operators depend on the field type:
Field types Operators String, textarea, email, URL, phone, picklist equals, does not equal, is any of, is none of Multipicklist includes any of, excludes all of Boolean equals Number, currency, percent equals, does not equal, less than, greater than, ≤, ≥, is any of, is none of Date, datetime equals, does not equal, less than, greater than, ≤, ≥ Reference, ID equals, does not equal, is any of, is none of -
Value - a single value or a set of values depending on the operator
All advanced rules are AND-ed with each other and with the standard include filters above.
Fields
| Option | Description | Default |
|---|---|---|
| Custom fields to ingest | Custom Case field API names whose values are included in the indexed content | None |
Best practices
- Focus on closed cases: Closed cases contain complete solutions and verified resolutions and are the most valuable for Kapa
- Set a case age window: Ingesting only the last 6–12 months avoids outdated information reaching your users. Use the Case age filter to control this
- Filter by status: If your org uses specific statuses for resolved cases (e.g. "Closed", "Resolved"), restrict ingestion to those statuses
- Limit custom fields: Only ingest custom fields that add meaningful context for your users. Avoid fields that contain internal metadata, IDs, or redundant information
Start narrow and expand. Begin with a short case age window and a status filter for closed cases, then review what Kapa surfaces and broaden the scope if needed.
Troubleshooting
- OAuth window closes with an error: Ensure your Salesforce user has permission to authorize the Kapa External Client App and that pop-ups are not blocked in your browser
- Empty filter dropdowns (statuses, priorities, etc.): These values are loaded live from your org. If they appear empty, verify that your Salesforce user has permission to run SOQL describe queries against the Case object
- No cases appearing after save: Check that your org contains cases matching all of your filter criteria. Overly narrow filters, especially a short case age window combined with strict status and record type filters, can produce an empty result set
- "Only [user] can edit this configuration": The source was connected by another Kapa user. Contact that user to make changes, or ask a Kapa admin to remove and recreate the source. This is done to ensure that a user with less access than another will not mistakenly get to see information that they are not supposed to when editing a Source.