Salesforce may show Connected Apps or External Client Apps depending on your org and Salesforce release. Use the Salesforce app type that supports API OAuth, authorization code flow, callback URLs, scopes, PKCE, a client ID, and an optional client secret.
What Sofie can use
Depending on Salesforce permissions and Sofie configuration, Sofie may help with:- Listing available standard and custom Salesforce objects.
- Describing object fields, picklists, relationships, and supported actions.
- Searching Salesforce records with keyword search.
- Querying Salesforce records with read-only SOQL.
- Reading specific records by object name and record ID.
- Preparing create, update, upsert, or delete actions for review.
- Using Salesforce context in chat or workflow handoff.
Before you start
You need:- Salesforce administrator access.
- Permission to create or manage the Salesforce OAuth app.
- A Salesforce user policy for who can authorize the app.
- The Sofie domain users open in the browser.
- Access to Sofie Organization Settings > Integrations.
- The Integrations feature and Salesforce integration feature enabled in Sofie.
- A decision about production, sandbox, or My Domain login.
Callback URL
Add this callback URL to the Salesforce app:Set up the app in Salesforce
Create the Salesforce app before entering values in Sofie.Open app setup in Salesforce
In Salesforce Setup, open App Manager or the app setup area your org uses for OAuth API integrations.
Create the app
Create a new Salesforce app for Sofie. Use a clear name such as
Sofie Salesforce Integration.Enter contact details
Add the administrator contact email and any required support or policy details for your org.
Enable OAuth API settings
Enable the API or OAuth settings for the app. Choose the authorization code or web server flow when Salesforce asks for the OAuth flow type.
Add the callback URL
Add
https://<your-sofie-domain>/api/integrations/callback/salesforce as a callback URL.Require PKCE when available
Enable Require Proof Key for Code Exchange (PKCE) if your Salesforce app setup offers it. Sofie sends a PKCE code challenge during authorization and a code verifier during token exchange.
Configure OAuth scopes
Sofie requests these Salesforce OAuth scopes:| Scope | Why Sofie needs it |
|---|---|
api | Access Salesforce data through Salesforce APIs according to the connected user’s permissions. |
refresh_token | Keep the connection available after the initial sign-in. |
offline_access | Support continued access where your Salesforce OAuth policy uses this scope name. |
Configure app access in Salesforce
After creating the app, review its Salesforce access policy.- Decide whether all approved users can self-authorize or whether access is limited to assigned profiles or permission sets.
- Confirm connected users have Salesforce API access.
- Confirm object permissions and field-level security for the records Sofie should use.
- Review refresh token policy so users do not need to reconnect too often.
- Review IP, session, SSO, and MFA policies that can affect OAuth sign-in.
Copy Salesforce values
After saving the app, copy these values from Salesforce.| Sofie field | Salesforce value |
|---|---|
| Client ID | Consumer Key. |
| Client Secret | Consumer Secret when your Salesforce policy requires a secret. |
| Auth Base URL | Login host, such as https://login.salesforce.com, https://test.salesforce.com, or your My Domain URL. |
Client Secret is optional for Salesforce in Sofie because Sofie supports PKCE-style authorization. If Salesforce requires a secret for your app policy, enter the consumer secret in Sofie.
Choose the auth base URL
Use the URL that matches the Salesforce org users should connect.| Salesforce environment | Auth base URL |
|---|---|
| Production | https://login.salesforce.com |
| Sandbox | https://test.salesforce.com |
| My Domain | https://<your-domain>.my.salesforce.com |
Add values in Sofie
In Sofie, go to Organization Settings > Integrations and open Salesforce.Choose the OAuth app source
Use the organization OAuth app when your Sofie environment should use your Salesforce app instead of default credentials.
Configure a group override
Use a group override when a specific group should connect to a different Salesforce app, sandbox, production org, or My Domain than the organization default. In Sofie, open the group, configure Salesforce in the group integration settings, and enter:- Client ID.
- Client Secret if required.
- Auth Base URL when the group should use a specific Salesforce login host.
Ask users to connect Salesforce
After the admin setup is saved, users connect their own Salesforce accounts from Sofie Integrations. When a user connects:- Sofie redirects the user to the configured Salesforce auth base URL.
- Salesforce asks the user to authorize the Sofie app.
- Sofie stores the user connection and Salesforce instance details.
- Sofie can only use Salesforce records available to that connected user.
refresh_token or offline_access.
Test the connection
Connect a representative test user
Use a Salesforce user whose permissions match a real target user.
Describe an object
Ask Sofie to describe a known object, such as
Account, Case, or a custom object ending in __c.Search or query known records
Ask Sofie to find a known account, contact, opportunity, case, task, event, order, or custom-object record.
User prompt examples
Troubleshooting
Users cannot connect Salesforce
Users cannot connect Salesforce
Confirm Salesforce is enabled in Sofie, the callback URL matches exactly, the auth base URL points to the right Salesforce org, the app has
api and refresh scopes, and the Salesforce app policy allows the user to authorize the app.Salesforce reports an invalid callback or redirect URI
Salesforce reports an invalid callback or redirect URI
Compare the Salesforce callback URL with the Sofie domain users opened in the browser. The scheme, host, and path must match. Add separate callback URLs for staging, production, and any custom Sofie domains.
Sofie asks users to reconnect Salesforce
Sofie asks users to reconnect Salesforce
The connection is missing
refresh_token or offline_access. Confirm the Salesforce app includes the refresh scope, then ask users to reconnect.Sofie cannot find a record
Sofie cannot find a record
Confirm the connected Salesforce user can see the record directly in Salesforce. Sofie follows the connected account’s object permissions, field-level security, sharing rules, and API access.
A sandbox user reaches production
A sandbox user reaches production
Check Auth Base URL. Use
https://test.salesforce.com or your sandbox My Domain for sandbox testing.Record updates fail
Record updates fail
Check Salesforce object permissions, field-level security, validation rules, required fields, duplicate rules, assignment rules, and whether the app policy allows the requested action.