Skip to main content

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.

Internal projects only

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

  1. Open up this link to install the Kapa.ai External Client App
  2. Install the application, and give access to All users or just the profiles you want to be able to Create the Salesforce Cases source
  3. To ensure that the ingestion continues to work, make sure to mark the Refresh Token Policy -> Refresh token is valid until revoked in the App Authorization section of the app.

Step 2: Connect your Salesforce org

  1. Go to the Sources tab in the Kapa platform
  2. Click Add new source
  3. Select Salesforce Cases as the source type
  4. Click Connect Salesforce
  5. A Salesforce login window opens. Sign in with a user account that has access to Cases in your org
  6. Approve the Kapa External Client App when prompted
  7. 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

OptionDescriptionDefault
Case ageOnly include cases created within this windowOpened in the last 6 months
StatusesOnly include cases with these statusesAll statuses
PrioritiesOnly include cases with these prioritiesAll priorities
OriginsOnly include cases with these originsAll origins
TypesOnly include cases of these typesAll types
Record types to includeOnly include cases with these record typesAll record types
Owner queues to includeOnly include cases owned by these queuesAll queues
Advanced filter rulesCustom 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:

  1. Field - pick from Case fields or related-object fields discovered from your org's schema

  2. Operator - the available operators depend on the field type:

    Field typesOperators
    String, textarea, email, URL, phone, picklistequals, does not equal, is any of, is none of
    Multipicklistincludes any of, excludes all of
    Booleanequals
    Number, currency, percentequals, does not equal, less than, greater than, ≤, ≥, is any of, is none of
    Date, datetimeequals, does not equal, less than, greater than, ≤, ≥
    Reference, IDequals, does not equal, is any of, is none of
  3. 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

OptionDescriptionDefault
Custom fields to ingestCustom Case field API names whose values are included in the indexed contentNone

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
tip

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.