- Enable the Salesforce action pack for a datasource instance.
- Authenticate with a Salesforce OAuth app.
- Decide which agents and surfaces can use these actions.
Prerequisites
Before enabling Salesforce actions:- The Salesforce datasource must be configured and successfully crawling content.
- You must be able to access the Glean Admin Console.
- A Salesforce admin can create a connected app and grant OAuth scopes.
Setup instructions
Follow these steps to set up the Salesforce action pack:- In Glean, go to Admin → Platform → Actions.
- Click Add.
- From Add pre‑set actions, select Salesforce Actions under Action templates.
-
In the Configuration tab:
- Add the Instance Name.
- Select the connected Datasource Instance to link this action to your Salesforce instance.
- Configure authentication. Salesforce actions use user OAuth so that actions run as the signed‑in user and respect their permissions. You can either use a central Glean‑managed app (recommended) or configure a custom OAuth app in Salesforce.
Using the central Salesforce app for authentication (recommended)
Use the central option if:- Your organization is Glean‑hosted, and
- Central apps are available for Salesforce in your environment.
- Select Central under Authenticate sectionin on the Salesforce Actions setup page.
- Click Save.
Using a custom Salesforce OAuth app for authentication
Use the custom option if:- You are self‑hosted, or
- Your security model requires a customer‑owned Salesforce OAuth app.
- Navigate to Salesforce and login using your credentials.
- Click Setup (top right).
- Go to App Manager (search under Quick Find).
- Click New External Client App. The External Client App Manager page opens up.
-
Under Basic information, add the following mandatory details:
- External Client App Name. Name your app appropriately to indicate that Glean will have access to this data, for example, Glean sales app.
- API Name.
- Contact Email.
-
Distribution State. Based on your requirement, select from either Local or Packaged.
- Local: Use this if the app will only be used in the current Salesforce org. Local apps can not be packaged or distributed to other orgs.
- Packaged: Use this if you plan to include the app in a second-generation (2GP) managed package and distribute it to other Salesforce orgs.
- Select the Enable OAuth.
-
Under App Settings, add the following information:
- Callback URL. Copy the Callback URL from the Glean admin console:
- Navigate to Salesforce actions configuration page on the Glean admin console.
- Select custom under the Authenticate section.
- Copy the Callback URL.
- Callback URL. Copy the Callback URL from the Glean admin console:
-
Add the following OAuth scopes:
- Manage user data via APIs (api)
- Perform requests at anytime (refresh_token, offline_access)
Optionally add Full access (full) scope if you plan to use Salesforce extension actions.
-
Based on your requirement, you can either enable or keep the Introspect all Tokens and Configure ID token options disabled.
- Introspect all Tokens: Allows the app to use token introspection endpoint of Salesforce to validate and inspect access/refresh tokens across the org, returning details such as whether the token is active, its expiry, user, and scopes. If you plan to have your integration check token status through /services/oauth2/introspect, enable this option; otherwise you can leave it disabled.
- Configure ID token: Controls how Salesforce issues OpenID Connect ID tokens for this app. If your integration uses the openid scope, enable this option to configure ID token behavior, including the lifetime of the token (1–720 minutes; default 2 minutes). If you do not use ID tokens and only rely on access/refresh tokens for API calls, you can leave this disabled.
- Uncheck Require Proof Key for Code Exchange (PKCE) extension for Supported Authorization Flows under Security.
- Click Create to create the app.
- Under the Settings tab, go to OAuth Settings.
- Under App Settings, click Consumer Key and Secret.
- Verify your identity. After verification, you are redirected to the External Client App Name page with the consumer key and secret details.
- Copy the Consumer Key and Consumer Secret and keep it safe.
- Under Apps, go to External Client Apps —> External Client Apps Manager.
- Find your app and click on your app.
- Under Policies, click Edit.
- Go to OAuth Policies and set Permitted Users to All users may self-authorize.
- Click Save.
- Navigate to Salesforce actions configuration page on the Glean admin console.
- Select custom under the Authenticate section.
- Add the Client ID and Client secret information.
- Click Save.
- Click Edit settings under Enable Actions section to make actions visible for all or some teammates within Glean Chat and Agents.