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

# Salesforce APIs

> Connect Salesforce to your Vatel agents using JWT Bearer authentication

The **Salesforce APIs** integration lets your agents access and manage records, cases, leads, and other objects in your Salesforce org.

## Prerequisites

* A **Salesforce account** with admin access - [Sign up](https://www.salesforce.com)
* A **Vatel AI organization** and at least **one agent**

## Configuration

### Step 1: Open Salesforce Setup

1. Log in to your Salesforce account.
2. Click the **gear icon** in the top-right corner to open **Setup**.

<img src="https://mintcdn.com/devpro-38b0cd42/Ks5omj2Hy9KwsCSh/images/integrations/salesforce-1.png?fit=max&auto=format&n=Ks5omj2Hy9KwsCSh&q=85&s=094a84bf723a57b4c20d7106a32d9b1d" alt="Salesforce homepage with settings icon" width="1854" height="921" data-path="images/integrations/salesforce-1.png" />

### Step 2: Create an External Client App

1. In the Setup search bar, type **App Manager** and select **External Client App Manager** from the left sidebar results.
2. Click **New External Client App**.
3. Fill in the **Basic Information** fields: give the app a name (e.g. `Vatel`), an API name, and a contact email.

<img src="https://mintcdn.com/devpro-38b0cd42/Ks5omj2Hy9KwsCSh/images/integrations/salesforce-2.png?fit=max&auto=format&n=Ks5omj2Hy9KwsCSh&q=85&s=fd438362733bc399fa04238343de4f84" alt="External Client App Manager setup form" width="1855" height="920" data-path="images/integrations/salesforce-2.png" />

4. Scroll down to the **OAuth Scopes** section and add the scopes your use case requires (e.g. **Full access**).
5. Scroll to the **Flow Enablement** section and check **Enable JWT Bearer Flow**.
6. Under **Certificate Upload**, upload your SSL certificate (`.crt` file). This is the public certificate paired with the private key you will use to sign JWTs.
7. Click **Create**.

<img src="https://mintcdn.com/devpro-38b0cd42/Ks5omj2Hy9KwsCSh/images/integrations/salesforce-3.png?fit=max&auto=format&n=Ks5omj2Hy9KwsCSh&q=85&s=81c7aed573aa657d26291a77c653eca7" alt="Flow Enablement panel with JWT Bearer Flow enabled" width="1853" height="920" data-path="images/integrations/salesforce-3.png" />

### Step 3: Get Your Consumer Key and Generate a Bearer Token

1. After creating the app, open it and click the **Settings** tab.
2. Click **Consumer Key and Secret** to view your credentials. Copy the **Consumer Key** (also called the client ID).

<img src="https://mintcdn.com/devpro-38b0cd42/Ks5omj2Hy9KwsCSh/images/integrations/salesforce-4.png?fit=max&auto=format&n=Ks5omj2Hy9KwsCSh&q=85&s=3a92bf3ab9bdaa11387de8f3ad8abfe3" alt="Consumer Key and Secret button in app settings" width="1856" height="906" data-path="images/integrations/salesforce-4.png" />

3. Use your **Consumer Key**, your Salesforce **username**, and your **private key** to generate a signed JWT and exchange it for an access token. Follow the [Salesforce JWT Bearer Token flow guide](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/generate-token.html) for the full token generation steps.
4. Copy the **access token** returned from the token endpoint. This is the bearer token you will paste into Vatel.

### Step 4: Connect the integration in Vatel

1. In the Vatel sidebar, click **Integrations**.
2. Click **Add Integration** in the top-right.
3. Select **Salesforce APIs**.
4. Set **Credential scope** to **Organization-wide (all agents)** or restrict it to a specific agent.
5. Paste your access token into the **Bearer Token** field.
6. Enter your Salesforce instance URL in the **Base URL** field (e.g. `https://yourorg.my.salesforce.com`).
7. Click **Connect Integration**.

<img src="https://mintcdn.com/devpro-38b0cd42/Ks5omj2Hy9KwsCSh/images/integrations/salesforce-5.png?fit=max&auto=format&n=Ks5omj2Hy9KwsCSh&q=85&s=689db3f08405ae635cb553b86dbed868" alt="Connect Salesforce APIs in Vatel" width="1865" height="921" data-path="images/integrations/salesforce-5.png" />

### Step 5: Use the integration in your agent graph

1. Open an agent and go to its graph editor.
2. In the left sidebar under **Integrations**, you will see **Salesforce APIs** listed. Click it to add it as a node.
3. In the node panel that opens on the right, give the node a **Title**, then select an **Operation** from the dropdown.
4. Fill in any relevant field values or map them from graph variables.
5. Click **Save Changes**.
6. Start a call to test the node in your agent flow.

<img src="https://mintcdn.com/devpro-38b0cd42/Ks5omj2Hy9KwsCSh/images/integrations/salesforce-6.png?fit=max&auto=format&n=Ks5omj2Hy9KwsCSh&q=85&s=88ac21090420240d3a9a487f93dc79da" alt="Salesforce APIs node in agent graph" width="1868" height="924" data-path="images/integrations/salesforce-6.png" />
