Skip to main content
You need an administrator profile in your Salesforce org to create an External Client App and set its Run As user.

Create an External Client App

The client credentials flow signs in as a Salesforce user you choose, without a browser sign-in. It needs its own External Client App with that flow turned on.

1

Start the app

Sign in to your Salesforce org, then click the gear icon and select Setup.

  • In the Quick Find box, enter External Client and select External Client App Manager.
  • Click New External Client App.
The Setup sidebar filtered to External Client Apps with External Client App Manager highlighted
2

Fill in the basic information

Complete the Basic Information section.

  • External Client App Name: StackOne Integration
  • API Name: filled in from the app name
  • Contact Email: Your email address
  • Distribution State: Local
The Basic Information section with the app name, API name, contact email and distribution state fields highlighted
3

Add the API scope

Enables actions: Create Business Hours, Create Case, Create Case Comment, Create Email Message, Create Entitlement, Create Knowledge Article, Create Pricebook, Create Record Type, Create Service Contract, Create Social Post, Create Work Order, Delete Case, Delete Case Comment, Delete Entitlement, Delete Knowledge Article, Delete Service Contract, Delete Work Order, Get Case, Get Case Comment, Get Entitlement, Get Knowledge Article, Get Service Contract, Get Work Order, List Activities, List Available Record Types, List Business Hours, List Case Comments, List Cases, List Contacts, List Email Messages, List Email Templates, List Entitlements, List Knowledge Articles, List Outbound Social Accounts, List Pricebooks, List Record Types, List SLA Processes, List Service Contracts, List Social Personas, List Social Posts, List Users, List Work Orders, Publish Knowledge Article, Search Cases, Search Knowledge Articles, Search Work Orders, Update Case, Update Case Comment, Update Entitlement, Update Knowledge Article, Update Service Contract, Update Work Order

Expand API (Enable OAuth Settings) and select Enable OAuth.

  • Callback URL: https://login.salesforce.com/services/oauth2/callback. The form requires a value, but the client credentials flow never redirects to it.
  • Under Available OAuth Scopes, select each scope listed and click the arrow to move it to Selected OAuth Scopes.
The API (Enable OAuth Settings) section with Enable OAuth, the Callback URL field and the selected api scope highlighted
4

Enable the client credentials flow

Under Flow Enablement, select Enable Client Credentials Flow.

  • Click OK to confirm.
  • Click Create.
The Flow Enablement section with Enable Client Credentials Flow selected and the Create button highlighted
5

Set the Run As user

On the new app, open the Policies tab, click Edit, and expand OAuth Policies.

  • Under OAuth Flows and External Client App Enhancements, select Enable Client Credentials Flow.
  • Run As (Username): the username of the Salesforce user the connection acts as. Every action runs with this user’s permissions.
  • IP Relaxation: Relax IP restrictions
  • Click Save.
The OAuth Policies section with Enable Client Credentials Flow selected and the Run As (Username) field highlighted
6

Copy the consumer key and secret

Open the Settings tab, expand OAuth Settings, and click Consumer Key and Secret.

  • Enter the verification code Salesforce emails you.
  • Copy the Consumer Key across.
  • Copy the Consumer Secret across.
The OAuth Settings section with the Consumer Key and Secret button highlighted

Find your My Domain

Your My Domain is your org’s own Salesforce host. The client credentials flow only accepts a token request sent to it.

  • In Setup, enter My Domain in the Quick Find box and select My Domain.
  • Copy the Current My Domain URL across, leaving out the protocol.
  • Format: {name}.my.salesforce.com, or {name}--{sandbox}.sandbox.my.salesforce.com for a sandbox
  • Example: acme.my.salesforce.com
The My Domain Details section with the Current My Domain URL row highlighted
1

Connect

  • Click Connect.
  • If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider’s authorization flow.
  • Once authorization is successful, you will see a confirmation popup.
2

Use Actions

Connect an AI platform to the linked account’s actions. See AI Platforms.Other ways to call actions are listed in Protocols & SDKs.