> ## Documentation Index
> Fetch the complete documentation index at: https://koreai-ai-for-process-dev.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuring the Salesforce CRM Action

<Badge icon="arrow-left" color="gray">[Back to Actions Integrations](/ai-for-service/integrations/overview#actions)</Badge>

Connect Salesforce CRM to create, update, search, and delete leads and opportunities. See [Salesforce CRM](https://www.salesforce.com/) for more information.

***

## Authorizations Supported

The XO Platform supports OAuth 2.0 authentication for Salesforce CRM. See [Setting Up Authorization Using OAuth v2](../../../dev-tools/bot-authorization/setting-up-authorization-using-oauth-v2.md) for details.

<Note>Salesforce CRM integration can only be authorized for Developer and Enterprise editions — not Trial. See [Salesforce documentation](https://help.salesforce.com/s/articleView?id=sf.accounts.htm\&type=5) for account types.</Note>

| Authorization Type                       | OAuth - System | OAuth - Custom |
| ---------------------------------------- | -------------- | -------------- |
| Pre-authorize the Integration            | Yes            | Yes            |
| Allow Users to Authorize the Integration | Yes            | Yes            |

***

## Step 1: Enable the Salesforce CRM Action

**Prerequisites:**

* Create a developer account in [Salesforce CRM Help Center](https://help.salesforce.com/s/).
* Copy the Client ID, Client Secret Key, Authorization URL, and Callback URL.

**Steps:**

1. Go to **App Settings** > **Integrations** > **Actions**.
2. Select **Salesforce**.

### Pre-authorize the Integration

**System Authorization**

1. Go to **App Settings** > **Integrations** > **Actions** and select **Salesforce**.

2. In **Configurations**, select the **Authorization** tab.

3. Set **Authorization Type** to **Pre-authorize the Integration** > **OAuth**.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/salesforce-action-img2.png" alt="Auth type - OAuth" />

4. Select the **System** card and click **Authorize**.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/salesforce-action-img3.png" alt="Kore.ai's preconfigured Salesforce app" />

5. You are redirected to `login.salesforce.com`. Enter credentials and click **Allow Access**.

**Custom Authorization**

1. Select **Custom** and click **Select Authorization** > **Create New**.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/salesforce-action-img4.png" alt="Create new auth" />

2. Select **OAuth v2**. See [Setting Up Authorization Using OAuth v2](../../../dev-tools/bot-authorization/setting-up-authorization-using-oauth-v2.md).

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/salesforce-action-img5.png" alt="Auth mechanism - OAuth V2" />

3. Enter the OAuth v2 credentials:

   * Call back URL
   * Identity Provider Name
   * Client ID
   * Client Secret
   * Authorization URL
   * Token Request URL
   * Scope
   * Refresh Token URL

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/salesforce-action-img6.png" alt="Auth credentials" />

4. Click **Save Auth**, then select the new profile.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/salesforce-action-img7.png" alt="Authorize" />

5. Click **Authorize**, enter credentials at `login.salesforce.com`, and click **Allow Access**.

6. Click **Enable**.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/salesforce-action-img8.png" alt="Integration successful" />

<Note>The Salesforce action moves from *Available* to *Configured* after enabling.</Note>

### Allow End User to Authorize

1. Go to **App Settings** > **Integrations** > **Actions** and select **Salesforce**.
2. In **Configurations**, select the **Authorization** tab.
3. Set **Authorization Type** to **Allow Users to Authorize the Integration** > **OAuth**.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/salesforce-action-img9.png" alt="Auth type - OAuth" />

**System Authorization**

1. Select the **System** card.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/salesforce-action-img10.png" alt="Kore.ai's preconfigured Salesforce app" />

2. Click **Enable**. A link is sent to the end user to authorize.

**Custom Authorization**

1. Select **Custom** and click **Select Authorization** > **Create New**, following the Custom Authorization steps above.

2. You can also select an existing profile:

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/salesforce-action-img11.png" alt="Select an existing authorization profile" />

3. Click **Enable**.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/salesforce-action-img12.png" alt="Enable" />

***

## Step 2: Install the Salesforce Action Templates

1. On the **Integration Successful** dialog, click **Explore Templates**.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/salesforce-action-img13.png" alt="Explore templates" />

2. Click **Install** to begin installation.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/salesforce-action-img14.png" alt="Begin installation" />

3. Once installed, click **Go to Dialog**. A dialog task for each template is auto-created.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/salesforce-action-img15.png" alt="Dialog tasks for each template" />

4. Select the desired dialog task and click **Proceed**.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/salesforce-action-img16.png" alt="Select desired dialog task and proceed" />

5. The dialog task is auto-created and the canvas opens with all required entity nodes, service nodes, and message scripts.


Built with [Mintlify](https://mintlify.com).