---
title: "Connecting Salesforce"
description: "Connect an agent to your Salesforce org with your own External Client App, so it can send leads, log conversations, and create support cases."
---

:::note[Plan]
Available on the **Starter** plan and above. Only team **Owners** and **Admins** can connect integrations.
:::

Chatvox connects to Salesforce through an **External Client App** that you create in your own Salesforce org. The app belongs to your org, and Chatvox never sees your Salesforce password.

Salesforce is connected per agent. Once connected, you can add the [Salesforce: Add Lead](/docs/integrations/salesforce/add-leads) and [Salesforce: Create Ticket](/docs/integrations/salesforce/create-tickets) actions.

## Connect Salesforce

1. **Open the connection window**

    In your agent, go to **Build** > **Integrations**. Next to **Salesforce**, select **Connect**. Keep this window open; you'll copy the **callback URL** from it.

2. **Create the app in Salesforce**

    In Salesforce, go to **Setup → App Manager** and create a **New Local External Client App**. Fill in a name and contact email.

3. **Turn on OAuth**

    Enable OAuth and add these scopes:

    - **Manage user data via APIs (api)**
    - **Perform requests at any time (refresh_token, offline_access)**

    Turn on **Require Secret for Web Server Flow**, and paste the callback URL from Chatvox.

4. **Copy the consumer key and secret**

    Save the app, then open **Settings → OAuth Settings → Consumer Key and Secret** and copy both. A new app can take up to 10 minutes to become active in Salesforce.

5. **Finish in Chatvox**

    Paste the **Consumer key** and **Consumer secret**, choose the **Login URL**, and select **Continue to Salesforce**. Log in and approve access.

### Login URL

| Your org | Login URL |
| --- | --- |
| Production or Developer Edition | `https://login.salesforce.com` |
| Sandbox | `https://test.salesforce.com` |
| A specific org | Your My Domain URL, such as `https://yourcompany.my.salesforce.com` |

## Troubleshooting

| Problem | What to do |
| --- | --- |
| `redirect_uri_mismatch` | The callback URL in Salesforce doesn't exactly match the one shown in Chatvox. Copy it again. |
| `invalid_client_id` right after creating the app | Salesforce is still activating the app. Wait up to 10 minutes and try again. |
| Status shows **Error** or **Reconnect** | The saved connection stopped working, for example because the app was changed or access was revoked. Select **Reconnect**. |
| Leads or tickets don't appear | Check that the action is turned on, and see [Add Leads](/docs/integrations/salesforce/add-leads#good-to-know) for lead requirements. |

To replace the consumer key or secret, disconnect Salesforce first, then connect again.
