Skip to content
← Back to Command · Connectors

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.

01

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.

02

Open the Salesforce connector

Log in to raia Command.

  1. 01

    Open Connectors from the left-hand menu.

  2. 02

    Select Salesforce.

  3. 03

    Expand the Setup instructions.

The setup instructions show the Salesforce OAuth requirements and callback URL.

03

Create an External Client App in Salesforce

Sign in to Salesforce.

  1. 01

    Click Setup.

  2. 02

    Open Apps.

  3. 03

    Select App Manager.

  4. 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.

04

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-callback

Under OAuth scopes, add:

  • Manage user data via APIs

This is the api scope.

Do not add refresh_token or offline_access for Client Credentials.

05

Enable Client Credentials Flow

Under Flow Enablement:

  1. 01

    Enable Client Credentials Flow.

  2. 02

    Review the Salesforce security message.

  3. 03

    Confirm the setting.

Protect the Consumer Key and Secret

The Client Credentials flow allows the application to act as the configured Run As user. Store the Consumer Key and Consumer Secret securely.

Create or save the External Client App.

06

Configure the Run As user

Open the app's Policies tab.

  1. 01

    Expand OAuth Policies.

  2. 02

    Click Edit.

  3. 03

    Enable Client Credentials Flow under OAuth Flows and External Client App Enhancements.

  4. 04

    Locate Run As (Username).

  5. 05

    Enter the exact Salesforce Username.

  6. 06

    Click Save.

Use the Salesforce Username

Do not enter the user's display name. The Salesforce Username may also be different from the person's email address. Open the Salesforce user record and copy the exact value shown in the Username field.

All imports will run with the permissions of this Run As user.

07

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 Key
  • Consumer Secret

The Consumer Key will be used as the Client ID. The Consumer Secret will be used as the Client Secret.

08

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.

09

Test the connection

Once the connection is created, click Test.

The expected result is: Connection OK

10

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.

11

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

Only closed cases are imported. Imports are capped at 2,000 records per sync.
12

Verify the connection

Confirm that:

  1. 01

    The Salesforce connection displays as Client Credentials.

  2. 02

    Test returns Connection OK.

  3. 03

    The correct Run As user is configured in Salesforce.

  4. 04

    Accounts, Knowledge Articles, or Cases can be selected.

  5. 05

    Imports complete successfully.

  6. 06

    Imported content appears in the selected raia Command folders.

13

Related