Command · Connector setup
Set up the Salesforce Connector with Client Credentials
Connect raia Command to Salesforce using the OAuth 2.0 Client Credentials flow. Salesforce runs all imports as one configured Run As user.
Video walkthrough is available in English.
Overview
Client Credentials provides a server-to-server Salesforce connection.
No Salesforce user needs to sign in when the connection is created or when future imports run.
Instead, Salesforce executes API requests as one configured Run As user.
The Run As user's Salesforce permissions determine what raia Command can access.
Open the Salesforce connector
Log in to raia Command.
- 01
Open Connectors from the left-hand menu.
- 02
Select Salesforce.
- 03
Expand the Setup instructions.
The setup instructions show the Salesforce OAuth requirements and callback URL.
Create an External Client App in Salesforce
Sign in to Salesforce.
- 01
Click Setup.
- 02
Open Apps.
- 03
Select App Manager.
- 04
Click New External Client App.
Enter the basic application information. For example:
- External Client App Name:
raia Command Client Credentials - API Name: use the automatically generated value or enter a unique API name
- Contact Email: enter the Salesforce administrator's email
- Distribution State:
Local
The remaining basic information fields are optional.
Enable OAuth
Scroll to the API or OAuth settings and enable OAuth.
Salesforce may require a callback URL even though Client Credentials does not normally use a browser redirect during authentication.
Use the raia Command callback URL:
https://spqueahmobhaqgipqkyo.supabase.co/functions/v1/salesforce-oauth-callbackUnder OAuth scopes, add:
- Manage user data via APIs
This is the api scope.
Do not add refresh_token or offline_access for Client Credentials.
Enable Client Credentials Flow
Under Flow Enablement:
- 01
Enable Client Credentials Flow.
- 02
Review the Salesforce security message.
- 03
Confirm the setting.
Protect the Consumer Key and Secret
Create or save the External Client App.
Configure the Run As user
Open the app's Policies tab.
- 01
Expand OAuth Policies.
- 02
Click Edit.
- 03
Enable Client Credentials Flow under OAuth Flows and External Client App Enhancements.
- 04
Locate Run As (Username).
- 05
Enter the exact Salesforce Username.
- 06
Click Save.
Use the Salesforce Username
All imports will run with the permissions of this Run As user.
Copy the Consumer Key and Consumer Secret
Open the External Client App's Settings and locate Consumer Key and Secret.
Salesforce may send a verification code by email before displaying the credentials.
Copy:
Consumer KeyConsumer Secret
The Consumer Key will be used as the Client ID. The Consumer Secret will be used as the Client Secret.
Add the Client Credentials connection in raia Command
Return to the Salesforce connector and click Add connection.
Under Grant type, select: Client Credentials (server-to-server, Run-As user)
Enter a descriptive label.
Next, enter the Salesforce My Domain base URL in the Token URL field. The URL should end in .my.salesforce.com
Use only the base URL. raia Command will append the required OAuth token path.
Then enter:
- Client ID, using the Consumer Key
- Client Secret, using the Consumer Secret
Click Connect.
Test the connection
Once the connection is created, click Test.
The expected result is: Connection OK
Create Salesforce imports
Before creating imports, create the required destination folders under the appropriate project in raia Command.
Click New import. Available import types include:
- Accounts
- Knowledge Articles
- Cases with comments
Select the destination project and folder.
Click Start import.
Import Cases with comments
For Cases with comments, select the appropriate time window:
- 3 months
- 6 months
- 12 months
You can also optionally narrow the import using available Salesforce Case fields.
Case import limits
Verify the connection
Confirm that:
- 01
The Salesforce connection displays as Client Credentials.
- 02
Test returns Connection OK.
- 03
The correct Run As user is configured in Salesforce.
- 04
Accounts, Knowledge Articles, or Cases can be selected.
- 05
Imports complete successfully.
- 06
Imported content appears in the selected raia Command folders.
Related
Salesforce User OAuth setup
Sign in as a Salesforce user and import with that user's permissions.
Command Connectors
How authentication, scheduling, and Sync History work.
Projects and folders
Organize imported content into projects and destination folders.
Vector Stores
How imported content is processed and indexed for retrieval.