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

# Salesforce

> Let your AI agent respond to Salesforce cases, or escalate conversations by creating a case for your team

## Overview

Chatbase provides a quick and easy way to add an AI agent to your Salesforce organization. In just a few minutes, you can make an AI agent available across your company's Salesforce org, where it responds to users' cases and helps your workspace provide round-the-clock automated support.

> **What you can do:**
>
> Have the AI agent answer Salesforce cases on its own, draft replies for a human to review, or open a case the moment a chat conversation needs a person.

## Available capabilities

| Capability | What it does |
| - | - |
| [AI case responses in Salesforce](#ai-case-responses-in-salesforce) | The AI agent replies to Salesforce cases, or drafts a reply for a human to review |
| [Human escalation via case creation](#human-escalation-via-case-creation) | The AI agent opens a Salesforce case when a chat conversation needs a person |

> [!NOTE]
>
> For connecting customers to a human agent in Salesforce in real time, see the [Salesforce Live Chat action](https://chatbase.co/docs/user-guides/chatbot/actions/salesforce-actions.md#2-live-chat), which needs additional Salesforce org configuration.

## Before you start

* A Chatbase account with an AI agent. If you haven't built one yet, [create a Chatbase account](https://www.chatbase.co/auth/signup) and follow [Your first AI agent](https://chatbase.co/docs/user-guides/quick-start/your-first-agent.md).
* A Salesforce account you can authorize the integration with.

## AI case responses in Salesforce

### How to connect Salesforce

**1. Open your Chatbase AI agent**

Head to your [dashboard](https://www.chatbase.co/dashboard/) and click the AI agent you wish to integrate with Salesforce.

**2. Find the Salesforce integration**

Click the **Channels** tab from the sidebar, find the **Salesforce** integration, and click **Connect**.

**3. Authorize the integration**

A new tab will open, asking you to log in to your Salesforce account to authorize the integration.

**4. Configure the integration**

Click **Manage** on the Salesforce integration card. You can then:

* Select the Salesforce user that the AI agent will reply as.
* Choose to either sync the AI agent's Salesforce instructions with the global instructions, or write a different instructions prompt. This is useful if you want to instruct the AI agent to escalate the case to a human in certain cases, for example if the customer asks for a refund.

Then click **Save**.

### Generate Draft Response

Don't want the AI agent to respond directly? Enable **Generate Draft Response** to review and edit the AI-generated response before it's sent.

**1. Open the page editor**

Navigate to any of your cases, click the gear icon at the top right, then select **Edit Page**.

![Opening the Salesforce page editor from a case](https://mintcdn.com/chatbase/vmwTr3IRMjk1rVuy/user-guides/integrations/images/salesforce/salesforce-3.png?fit=max\&auto=format\&n=vmwTr3IRMjk1rVuy\&q=85\&s=29ce842caa3932a49e526ecba8c5cb92)

**2. Add the action to the layout**

Select the section where you want the button to appear, for example the Highlights Panel. Click **Add Action**, search for **Chatbase AI Draft Response**, and add it to the layout.

![Adding the Chatbase AI Draft Response action to the layout](https://mintcdn.com/chatbase/vmwTr3IRMjk1rVuy/user-guides/integrations/images/salesforce/salesforce-4.png?fit=max\&auto=format\&n=vmwTr3IRMjk1rVuy\&q=85\&s=75908952063e5346d1f027a4c4b0e107)

The **Generate Draft Response** button is then available across all cases, so AI agents can generate responses whenever they need one.

***

## Human escalation via case creation

**1. Connect Salesforce**

Choose **Integrations**, then connect your Salesforce account to authorize access.

**2. Create the Escalations action**

Configure your Escalations action to route tickets to Salesforce. Follow the [Escalations action guide](https://chatbase.co/docs/user-guides/chatbot/actions/escalate-to-human.md) to set it up.

> [!TIP]
>
> Test the integration by asking your AI agent to speak to a human, and confirm a case appears in Salesforce with the conversation summary attached.

## Next steps

> **[Escalations action](https://chatbase.co/docs/user-guides/chatbot/actions/escalate-to-human.md)**
>
> Configure when your AI agent escalates and which details it collects first.

> **[Salesforce Actions](https://chatbase.co/docs/user-guides/chatbot/actions/salesforce-actions.md)**
>
> Create cases and connect customers to live agents in Salesforce from the chat.


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