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

# Agent webhook guide

## Connect Salesforce to Dovetail

Give chat and Agents live access to Salesforce through its hosted MCP server. (Separate from Salesforce Service Cloud case sync.

<Tooltip tip="Add tooltip text">You need Salesforce System Admin access, one-time per org. Connected Apps aren't supported—hosted MCP requires an External Client App.</Tooltip>

## 1. Build the MCP server (optional)

Skip this step if you're using a standard server like `sobject-all`.

If the standard servers give more or less than you want, you can curate your own instead — combining tools from multiple standard servers, or adding tools backed by your own Apex, Flows, or APIs.

1. Go to **Setup → Quick Find → API Catalog → MCP Servers**.
2. Click **Create Salesforce MCP Server**.
3. Enter a unique label, name, and description → **Create**.
4. Make sure the server is deactivated, then click **Add Server Assets → Add Tools** to map in Apex actions, Apex REST/AuraEnabled APIs, Flows, Named Query APIs, or Agentforce agents.

Scope custom servers to a persona (e.g. a "sales rep" server or "data hygiene" server) rather than exposing everything in one place — clients tend to pick tools less reliably once there are more than a few dozen to choose from.

## 2. Enable the hosted MCP server (Salesforce)

Servers are off by default; an admin turns them on.

1. Go to **Setup → Quick Find → MCP Servers** (under API Catalog) → open **Salesforce Servers** (or your custom server from step 1).
2. Toggle on the server(s) you need. Common standard ones:
   * `sobject-all` — full read/write/query across standard & custom objects (still bound by the user's FLS, object perms, and sharing rules).
   * `salesforce-api-context` — object metadata / API context.
   * `metadata-experts` — metadata generation (Beta).

<Tooltip tip="Add tooltip text">Activation takes \~2 min.</Tooltip>

## 3. Create the External Client App (Salesforce)

1. Go to **Setup → Quick Find → External Client App Manager → New External Client App**.
2. Fill in **Basic Information**, expand **API (Enable OAuth Settings)**, check **Enable OAuth**.
3. Set the **Callback URL**:
   ```text theme={null}
   https://dovetail.com/account/integration/oauth/mcp
   ```
4. Under **Selected OAuth Scopes**, add only:
   * Access MCP servers (`mcp_api`)
   * Perform requests at any time (`refresh_token`)
5. **Check**:
   * Require Proof Key for Code Exchange (PKCE) Extension for Supported Authorization Flows
   * Issue JSON Web Token (JWT)-based access tokens for named users
6. **Leave unchecked**:
   * Enable Authorization Code and Credentials Flow
   * Enable Client Credentials Flow
   * Require Secret for Web Server Flow
   * Require Secret for Refresh Token Flow
7. **Save**.

<Tooltip tip="Add tooltip text">The External Client App can take up to \~30 min to become usable after saving. </Tooltip>

## 4. Copy two values

* **Consumer Key** — the app → **Settings → OAuth Settings → Consumer Key and Secret** (enter the emailed verification code).
* **MCP server URL** — from the MCP Servers connection details.

## 5. Connect from Dovetail

1. In an agent, go to **External tools → Salesforce → Connect** (or use the connector picker in chat).
2. Paste the **MCP server URL** and **Consumer Key**.
3. Approve the Salesforce popup.
4. Toggle Salesforce on per agent.

<Tooltip tip="Add tooltip text">Connection is per-person. </Tooltip>
