> ## Documentation Index
> Fetch the complete documentation index at: https://docs.duvo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Salesforce

Salesforce is the leading CRM platform for managing customer relationships across sales, service, and marketing. Connecting Salesforce to Duvo lets your agents query, create, and update CRM records — accounts, contacts, opportunities, and custom objects — so your workflows always operate on live customer data.

## Setup

You connect Salesforce through an External Client App that you register in your own Salesforce org. Salesforce blocks users from approving an app their org has not installed, so an app native to your org is what makes the login work.

<Steps>
  <Step title="Confirm prerequisites" icon="circle-check">
    <Check>A Salesforce edition that includes API access — Enterprise, Unlimited, Performance, or Developer. Professional Edition needs the API add-on.</Check>
    <Check>Permission to create an External Client App in the org you want to connect, or a Salesforce admin who can create one for you.</Check>

    <Warning>
      The Salesforce user you connect with needs the **API Enabled** permission, granted on their profile or through a permission set. Salesforce refuses the login without it, so the connection cannot be created. Ask your Salesforce admin if you are not sure.
    </Warning>
  </Step>

  <Step title="Create an External Client App" icon="plus">
    In the Salesforce org you want to connect — the sandbox itself if you are connecting a sandbox — open **Setup**, then search for and open **External Client App Manager**. Click **New External Client App**. Enter a name (for example `Duvo`), your contact email, and a distribution state of **Local**.
  </Step>

  <Step title="Enable OAuth" icon="key">
    In the **API (Enable OAuth Settings)** section, turn on **Enable OAuth**.
  </Step>

  <Step title="Set the callback URL" icon="link">
    Paste Duvo's callback URL into **Callback URL**:

    ```text theme={"dark"}
    https://platform.duvo.ai/v1/oauth/callback/salesforce
    ```

    The same URL is shown on the Duvo connect form with a copy button — copy it from there so you always register the right one.
  </Step>

  <Step title="Select the scopes" icon="list-check">
    Move these OAuth scopes into **Selected OAuth Scopes**:

    * **Manage user data via APIs** (`api`)
    * **Access the identity URL service** (`id`)
    * **Perform requests at any time** (`refresh_token, offline_access`)

    Leave **Require Proof Key for Code Exchange (PKCE)** on, and turn off **Require secret for Web Server Flow** only if your org policy demands it — Duvo sends the consumer secret either way. Save the app.
  </Step>

  <Step title="Find the consumer key and secret" icon="eye">
    Open the app in **External Client App Manager**, go to the **Settings** tab, expand **OAuth Settings**, and click **Consumer Key and Secret**. Salesforce asks you to verify your identity, then shows both values. Copy them.

    It can take a few minutes before a newly saved app accepts logins.
  </Step>

  <Step title="Connect in Duvo" icon="plug">
    On the [Connections page](https://app.duvo.ai/integrations), click **Enable** next to Salesforce and fill in these fields:

    <ParamField body="Salesforce environment" type="string" required>
      Which org your External Client App lives in — **Production**, **Sandbox**, or **My Domain host**. See **Salesforce environments** below.
    </ParamField>

    <ParamField body="My Domain host" type="string">
      Your org's own login domain, for example `mycompany.my.salesforce.com`. Shown only when you pick **My Domain host**. Enter the host without `https://`.
    </ParamField>

    <ParamField body="Consumer key" type="string" required>
      The consumer key from your External Client App, under **Settings** > **OAuth Settings** > **Consumer Key and Secret**.
    </ParamField>

    <ParamField body="Consumer secret" type="string" required>
      The consumer secret shown on the same screen as the consumer key.
    </ParamField>

    Click **Continue to Salesforce** to log in and approve access.
  </Step>
</Steps>

### Salesforce environments

| Environment | When to pick it |
| - | - |
| **Production** | Your live org. Logs in at `login.salesforce.com`. |
| **Sandbox** | A sandbox org. Logs in at `test.salesforce.com`. |
| **My Domain host** | Your org logs in on its own domain, for example `mycompany.my.salesforce.com`. Enter the host without `https://`. |

<Note>
  Duvo only accepts Salesforce login hosts: `login.salesforce.com`, `test.salesforce.com`, and a My Domain host in one of three shapes — `mycompany.my.salesforce.com`, `mycompany--qa.sandbox.my.salesforce.com`, or `mycompany.develop.my.salesforce.com`. Anything else is rejected, including scratch org hosts ending in `.scratch.my.salesforce.com`.
</Note>

<Warning>
  If you rotate the consumer secret in Salesforce, delete the Duvo connection and connect again with the new secret. Reconnecting reuses the secret you first entered, so it keeps failing until the connection is recreated.
</Warning>

## Capabilities

* **Record management** — Create, read, update, and delete records across standard and custom objects, including accounts, contacts, and opportunities.
* **SOQL queries** — Run Salesforce Object Query Language queries to retrieve and aggregate records matching specific criteria.
* **SOSL search** — Use Salesforce Object Search Language to search across multiple objects at once.
* **Schema exploration** — List all objects in your org and inspect their field metadata to understand your data model.
* **Custom object support** — Work with any SObject in your org, not just standard Salesforce objects.

## Key Benefits

* **Automated CRM hygiene** — Keep account, contact, and opportunity records current without manual data entry.
* **End-to-end sales workflows** — Bridge lead capture, opportunity tracking, and customer communication in a single automated process.
* **Custom object support** — Work with your unique Salesforce configuration, not just standard objects.
* **Full query power** — Use SOQL and SOSL to retrieve exactly the data your workflows need, including cross-object searches and aggregations.

## Works Well With

<CardGroup cols={3}>
  <Card title="Gmail" icon="https://mintcdn.com/duvo-d8027998/O3tlM6eCuFk2uJpN/images/connections/gmail.svg?fit=max&auto=format&n=O3tlM6eCuFk2uJpN&q=85&s=ad4e229283f3fe2f26c0f96a49f28e13" href="/user-guide/connections/available-connections/gmail" width="88" height="66" data-path="images/connections/gmail.svg">
    Send emails to Salesforce contacts and log the communication back to their CRM record automatically.
  </Card>

  <Card title="Microsoft Outlook" icon="https://mintcdn.com/duvo-d8027998/O3tlM6eCuFk2uJpN/images/connections/outlook.svg?fit=max&auto=format&n=O3tlM6eCuFk2uJpN&q=85&s=e29aeb65c8cffce1cd3c83b81289b71f" href="/user-guide/connections/available-connections/microsoft-outlook" width="1831" height="1703" data-path="images/connections/outlook.svg">
    Send emails to Salesforce contacts and log the communication back to their CRM record automatically.
  </Card>

  <Card title="Slack" icon="https://mintcdn.com/duvo-d8027998/O3tlM6eCuFk2uJpN/images/connections/slack.svg?fit=max&auto=format&n=O3tlM6eCuFk2uJpN&q=85&s=8a64bdd1af39e903923e4a273b4a4618" href="/user-guide/connections/available-connections/slack" width="512" height="512" data-path="images/connections/slack.svg">
    Post deal updates, new lead alerts, or stage-change notifications to sales channels.
  </Card>

  <Card title="Microsoft Teams" icon="https://mintcdn.com/duvo-d8027998/O3tlM6eCuFk2uJpN/images/connections/teams.svg?fit=max&auto=format&n=O3tlM6eCuFk2uJpN&q=85&s=6402a90678b560d0b0a4fc3b02c0d3e0" href="/user-guide/connections/available-connections/microsoft-teams" width="2229" height="2073" data-path="images/connections/teams.svg">
    Post deal updates, new lead alerts, or stage-change notifications to sales channels.
  </Card>

  <Card title="Google Sheets" icon="https://mintcdn.com/duvo-d8027998/O3tlM6eCuFk2uJpN/images/connections/google-sheets.svg?fit=max&auto=format&n=O3tlM6eCuFk2uJpN&q=85&s=0ef8d55e05c34e7a4a618933bdf0ceb3" href="/user-guide/connections/available-connections/google-sheets" width="24" height="24" data-path="images/connections/google-sheets.svg">
    Export opportunity or account data into spreadsheets for pipeline analysis and forecasting.
  </Card>

  <Card title="Microsoft Excel" icon="https://mintcdn.com/duvo-d8027998/O3tlM6eCuFk2uJpN/images/connections/excel.svg?fit=max&auto=format&n=O3tlM6eCuFk2uJpN&q=85&s=986599d60d09acee47293fda2b62df99" href="/user-guide/connections/available-connections/microsoft-excel" width="2290" height="2130" data-path="images/connections/excel.svg">
    Export opportunity or account data into spreadsheets for pipeline analysis and forecasting.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.