Skip to main content

About Salesforce

Salesforce is a cloud-based CRM platform for managing customer relationships, sales pipelines, support cases, and more. The Serval Salesforce integration connects securely to your Salesforce org and does two things: it syncs Service Cloud Cases with Serval tickets (one-way or two-way), and it lets your workflows reach the Salesforce API on demand. The workflow surface acts as a live passthrough - each request runs only when a workflow asks for it, so accounts, contacts, cases, opportunities, custom objects, and SOQL queries are all reachable. Because every call runs as the user you assign during setup, that user’s permissions determine what Serval can read or change. Authentication: OAuth 2.0 Client Credentials Flow Data sync: When ticket sync is enabled, Serval polls your org for Case and CaseComment changes roughly every 30 seconds. Everything else is on-demand - workflow actions call the API only when a workflow runs, and Serval stores no Salesforce record data beyond the tickets it syncs.

What the Salesforce integration enables

Anything defined in the Salesforce REST API can be accessed through Serval.

Ticket sync

Connecting Salesforce also enables native ticket sync between Serval tickets and Salesforce Service Cloud Cases. Serval polls your org for Case changes, ingests new and updated Cases as Serval tickets, and - in two-way mode - writes Serval-side changes back as Case updates and CaseComments. Sync can cover every Case in the org or be scoped to a single Case Queue.

What syncs

The Salesforce API posts every CaseComment as the Connected App’s Run As user - it cannot impersonate authors. Human-authored Serval messages are therefore prefixed with an attribution header, [Comment from: Name <email>], so agents in Salesforce can see who actually wrote them. The header is stripped again when the comment syncs back, so it never appears on the Serval side.

Set up ticket sync

Ticket sync is configured per team on top of an existing Salesforce connection.
1

Connect the Salesforce integration

Follow Get your credentials and Connect in Serval below if you haven’t already. Ticket sync uses the same Connected App connection - no extra credentials are needed.
2

Open your team's ticket sync settings

In the Salesforce app’s settings in Serval, open the team’s Salesforce Case Syncing configuration.
3

Choose a Salesforce queue (optional)

Optionally select a Case Queue - Cases owned by that queue sync to this team, and Cases Serval creates are placed in it. Leave it on All Cases to sync every Case in the org; Cases Serval creates are then left to your org’s assignment rules.
4

Map statuses

Map each Serval status to a Salesforce Case Status. Serval fetches your org’s actual Status picklist (including custom values), so the options match what your agents see. Statuses you leave unmapped are simply never written to Salesforce.
5

Choose a sync strategy and enable

Pick how tickets should sync - selectively per ticket, automatically on escalation, for all new tickets (full two-way sync), or by importing existing Cases - and whether the sync is one-way or two-way. Save to start syncing.

Required Salesforce permissions

Ticket sync runs entirely as the Connected App’s Run As user, so that user’s profile or permission sets must cover the objects the sync touches:

Polling cadence and API usage

Serval polls your org for changed Cases and CaseComments roughly every 30 seconds (a SOQL query filtered on SystemModstamp). There are no webhooks in this version, so changes made in Salesforce can take up to about 30 seconds to appear in Serval; changes made in Serval are pushed to Salesforce as they happen.
Salesforce enforces org-wide daily API request limits, and Serval’s polling consumes part of that allocation around the clock while ticket sync is enabled. If your org runs close to its limit, account for the polling traffic when budgeting API usage.

Limitations

  • No attachments. Files attached on either side do not sync.
  • No real-time webhooks. Sync is polling-based, with roughly 30 seconds of latency for changes originating in Salesforce.
  • No live agent handoff. Unlike the ServiceNow integration, there is no bridge to a human Salesforce agent chat.
  • Single Case treatment. All Cases are synced the same way regardless of record type - there is no per-record-type configuration.
  • Email-to-Case conversations don’t sync. Serval syncs the CaseComment thread. Orgs whose case conversations live in EmailMessage records (typical with Email-to-Case) will see only CaseComment traffic sync - the email thread itself stays in Salesforce.

Get your credentials

To connect Salesforce, you create an app in your Salesforce org (a Connected App, or the newer External Client App) configured for OAuth with the Client Credentials Flow enabled and a Run As user assigned. From it you collect the Consumer Key (your Client ID) and Consumer Secret (your Client Secret), plus your org’s instance domain. The full provider walkthrough lives in Salesforce’s Client Credentials Flow setup guide.
1

Open the External Client App Manager

In Salesforce, go to Setup. In the left sidebar under Platform Tools, navigate to Apps → External Client Apps → External Client App Manager. (Connected Apps work the same way via App Manager.)
2

Create the app

Click New External Client App in the top right. Enter a name (for example, “Serval Integration”) and fill out the required fields.
3

Enable OAuth

In the API (Enable OAuth Settings) section, enable OAuth. Provide a callback URL - it is not used by this flow, but Salesforce requires a value, so something like https://serval.com is fine. Then move the OAuth scopes your workflows need into Selected OAuth Scopes.
Choose scopes that cover the Salesforce objects your workflows will read or change. You can update scopes later.
4

Turn on Client Credentials Flow

Under Flow Enablement, toggle Enable Client Credentials Flow on.
This toggle is required. If the Client Credentials Flow is not enabled, Serval cannot authenticate and the connection test will fail.
5

Assign a Run As user

In the app’s OAuth / Client Credentials policies, assign a Run As user for the Client Credentials Flow.
Every Serval API call runs as this user, with this user’s object and field permissions. Pick a user whose access matches exactly what your workflows should be allowed to do. If you plan to use ticket sync, also grant this user the object permissions listed in Required Salesforce permissions.
6

Retrieve your Client ID and Client Secret

Save the app, then open its OAuth settings and click Consumer Key and Secret (you may be prompted to re-verify your identity). The Consumer Key is your Client ID and the Consumer Secret is your Client Secret.
7

Note your instance domain

Record your instance domain (for example, mycompany.my.salesforce.com), entered without the https:// prefix.

Connect in Serval

In Serval, go to Apps → Available → Salesforce → Connect and fill in the following fields. All three are required, and Serval will not let you save until each one is filled in.
1

Instance Domain

Enter your Salesforce instance domain without the https:// prefix (for example, mycompany.my.salesforce.com).
Serval checks that this looks like a valid Salesforce domain - it must end in .salesforce.com. If it doesn’t match that shape, the form rejects it when you try to save with the message “Must be a valid Salesforce domain (e.g., mycompany.my.salesforce.com)”. A well-formed but incorrect domain (the right shape but the wrong org) is accepted, and surfaces later as a failed connection test, so double-check it carefully.
2

Client ID

Enter the Consumer Key from your Salesforce app.
3

Client Secret

Enter the Consumer Secret from your Salesforce app.
When you reconfigure an existing connection later, the saved Client Secret is shown obfuscated, so the real value is never displayed again. Leave it as-is to keep the value you already saved, or click Replace to enter a new one.
4

Save

Click Save to create the connection.

Verifying the connection

Serval includes a built-in Test Salesforce Connection healthcheck. It makes an authenticated request to your org, treats the response as a list of available API versions, and reports the count. This confirms that your instance domain, Client ID, and Client Secret all work together to authenticate against the org. On success, you will see:
Successfully connected to Salesforce. <N> API versions available.
On failure, you will see:
Unable to connect to Salesforce. Please verify your instance domain, client ID, and client secret are valid.
A successful save only confirms the fields were well-formed, not that the credentials actually work. Always run the connection test after connecting to confirm Serval can authenticate to your org.

Gotchas and troubleshooting

The form confirms your Instance Domain has a valid Salesforce shape, but it cannot tell whether it points at the right org - a well-formed domain for the wrong org saves cleanly and only fails when Serval tries to authenticate. Re-check the domain (entered without https://, e.g. mycompany.my.salesforce.com), then re-run the test. If the domain is correct, confirm the Client ID and Client Secret are the Consumer Key and Consumer Secret from the same app.
Serval uses the OAuth Client Credentials Flow, so your Salesforce app must have Enable Client Credentials Flow turned on and a Run As user assigned. If the flow is not enabled, the token request fails and the connection test returns its failure message. Open the app’s settings, confirm the flow is enabled, and confirm a Run As user is configured.
Every Serval API call runs as the Run As user assigned on the app. That user’s profile and permission sets determine which objects and fields your workflows can read or write. If a workflow is blocked from a record or field, adjust the Run As user’s permissions in Salesforce to match what your workflows need.
This integration ships exactly one data action - the generic Salesforce API request. There are no separate “create contact” or “query case” actions. Workflows specify the operation and target themselves, so refer to the Salesforce REST API Developer Guide for what is available.
For security, Serval only allows the connected integration to make outbound calls to Salesforce hosts - domains ending in salesforce.com or force.com (the force.com range covers Experience Cloud, community, and custom domains). Any other host is blocked.

Need help? Contact support@serval.com for assistance with your Salesforce integration.