> For the complete documentation index, see [llms.txt](https://docs.eesel.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eesel.ai/integrations/helpdesks/salesforce.md).

# Salesforce

Connect Salesforce so your agent reads cases, contacts, accounts and opportunities for context when it answers, and creates or updates records on your instructions.

Salesforce holds the customer record. Customers rarely write in through Salesforce, so eesel mostly uses it to look up context: which plan the account is on, what is still open, and what your team already told them. Your AI teammate reads cases, contacts, accounts and knowledge articles, and works with the record in front of it. It can create and update records too, so a conversation ends with Salesforce in the right state instead of a note for someone else to type up later.

You stay in control the whole way. Nothing runs until you create an automation. For each action you then choose: run on its own, ask you first, or stay off.

In this example the agent read the case, looked up the account, searched twelve other cases, and posted a private case comment.

<figure><img src="https://3732419023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xXO0947TYoPIhGoBgSE%2Fuploads%2Fgit-blob-5afda0594cca611c70ec0d254d8c9b4c5e1d4459%2Fsalesforce-hero.png?alt=media" alt="A Salesforce case about scanners failing after a firmware update, with eesel AI posting a private case comment after reading the case, looking up the account and searching twelve other cases"><figcaption><p>Your agent works the case with the record in front of it, looking up the account and past cases before it says anything.</p></figcaption></figure>

{% hint style="info" %}
**Connecting Salesforce has one extra step.** eesel's package has to be installed in your Salesforce org before you authorize the connection. Your agent gives you the install link, then the authorization link. The steps below walk through both.
{% endhint %}

## Quick start

{% stepper %}
{% step %}

### Ask your agent to connect Salesforce

Open the chat in your dashboard and ask it to connect Salesforce. It replies with two steps. First install the eesel AI package in your Salesforce org, because Salesforce needs the package before it allows the connection. The agent gives you an **Install eesel AI package** link. Prefer to click? **Integrations** in the left sidebar has the same option.

<figure><img src="https://3732419023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xXO0947TYoPIhGoBgSE%2Fuploads%2Fgit-blob-55bb45976a73d62183addbea321575eb1da73053%2Fsalesforce-connect-chat.png?alt=media" alt="The dashboard chat where the user asks to connect Salesforce and the agent explains the package must be installed first, with an Install eesel AI package link"><figcaption><p>The agent posts the package install link in the chat.</p></figcaption></figure>
{% endstep %}

{% step %}

### Install the eesel AI package in Salesforce

Open the link as a Salesforce admin. If you are not signed in, Salesforce asks you to sign in first.

<figure><img src="https://3732419023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xXO0947TYoPIhGoBgSE%2Fuploads%2Fgit-blob-0b1ae8572d960b022750b248fd14df89685eb5ae%2Fsalesforce-sign-in.png?alt=media" alt="The Salesforce login page, asking the user to log in before the install page opens"><figcaption><p>Salesforce asks you to sign in before it opens the install page.</p></figcaption></figure>

The install page then opens. Choose who gets the package: admins only, all users, or specific profiles, whichever fits your team. Tick the box to acknowledge the app, then click **Install**.

<figure><img src="https://3732419023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xXO0947TYoPIhGoBgSE%2Fuploads%2Fgit-blob-0ff207a77e47fe200d1a0eeb369c2916cad30983%2Fsalesforce-install-package.png?alt=media" alt="The Salesforce Install eesel AI page, with Install for Admins Only selected, the acknowledgement box ticked, and the Install button"><figcaption><p>The Salesforce install page for the eesel AI package.</p></figcaption></figure>

Salesforce then asks you to approve the site the package talks to. That site is `oracle.eesel.app`, which is eesel. Tick **Yes, grant access to these third-party web sites** and click **Continue**.

<figure><img src="https://3732419023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xXO0947TYoPIhGoBgSE%2Fuploads%2Fgit-blob-6839f2cf812e55634894022bac868cea0db0af8c%2Fsalesforce-approve-third-party.png?alt=media" alt="The Salesforce Approve Third-Party Access dialog listing oracle.eesel.app, with the grant access box ticked and a Continue button"><figcaption><p>Salesforce asks you to allow the package to reach eesel.</p></figcaption></figure>

Salesforce confirms when the install is done. The page shows the package name eesel AI and its version. Click **Done**.

<figure><img src="https://3732419023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xXO0947TYoPIhGoBgSE%2Fuploads%2Fgit-blob-707fa9a637d908b753bdecf9f6c903a3db273100%2Fsalesforce-install-complete.png?alt=media" alt="The Salesforce install page showing Installation Complete for the eesel AI package, version 0.2, with a Done button"><figcaption><p>The package is installed in your org.</p></figcaption></figure>
{% endstep %}

{% step %}

### Authorize the connection

Go back to the chat and tell your agent the package is installed. It gives you a **Connect Salesforce** link. Open it and approve the connection in Salesforce. You need permission in Salesforce to authorize a connected app.

<figure><img src="https://3732419023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xXO0947TYoPIhGoBgSE%2Fuploads%2Fgit-blob-393245c613f1c29a971b07acd3edb769a32dc590%2Fsalesforce-authorize.png?alt=media" alt="The dashboard chat where the user says the package is installed and the agent posts a Connect Salesforce authorization link"><figcaption><p>The agent posts the authorization link once the package is in.</p></figcaption></figure>

Your agent only sees what the Salesforce user you authorized can see. Object and field permissions in Salesforce are the real limit, so set them there rather than relying on the instructions you give your agent.

This approval is the one step a person has to do in the browser. If an AI agent is doing the setup for you, it hands you the link and waits.
{% endstep %}

{% step %}

### Confirm the connection

Back in the chat, your agent notices the connection on its own. It names your org, checks the connection is healthy, and starts reading your records.

<figure><img src="https://3732419023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xXO0947TYoPIhGoBgSE%2Fuploads%2Fgit-blob-c7502bafb7fd2a99e040b2a02d7111c3ac722608%2Fsalesforce-connected.png?alt=media" alt="The dashboard chat confirming Salesforce is connected and healthy, naming the org and the number of documents already indexed"><figcaption><p>The chat confirms Salesforce is connected and healthy.</p></figcaption></figure>
{% endstep %}

{% step %}

### Check what it can read

**Integrations > Salesforce** in the left sidebar shows the connection and its sources. Each source has its own toggle, and shows a document count once its sync is done. From a terminal, `eesel status` lists the integration as connected with its source counts.

<figure><img src="https://3732419023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xXO0947TYoPIhGoBgSE%2Fuploads%2Fgit-blob-5d32cf6ee13a999c59d7ba7beb109c9f15063547%2Fsalesforce-integration-page.png?alt=media" alt="The connected Salesforce integration page in eesel, listing Cases, Contacts, Accounts and Knowledge Articles as sources with document counts and toggles"><figcaption><p>Each source has its own toggle and its own document count.</p></figcaption></figure>

A synced source is a snapshot from the last sync. That is what the agent knows going in. The lookup actions read Salesforce live, which is how it checks one record mid-conversation.
{% endstep %}

{% step %}

### Create your first automation

Connecting alone does not start your agent. It needs an automation first. Tell it what to handle and it creates an [automation](/automations-and-schedules/automations-and-schedules.md). An automation is a Salesforce trigger plus instructions. In the instructions you describe which cases it should handle and what to do with them. It leaves the rest alone.

<figure><img src="https://3732419023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xXO0947TYoPIhGoBgSE%2Fuploads%2Fgit-blob-431a47a011200fa9ac08512fdd362846ae373fe6%2Fsalesforce-automation-chat.png?alt=media" alt="The dashboard chat where the user asks for an internal case comment with a reply draft on every new case, and the agent reports the new case trigger it enabled"><figcaption><p>Ask in chat for the automation you want, and the agent builds it.</p></figcaption></figure>

It shows up on your Automations page, switched on and ready. From a terminal, `eesel automations` lists it as on.

<figure><img src="https://3732419023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xXO0947TYoPIhGoBgSE%2Fuploads%2Fgit-blob-5173ec3247659a47ddba08d9b8057591e80e6c99%2Fsalesforce-automation-live.png?alt=media" alt="The Automations page in eesel with the A new Case is created rule listed and toggled on"><figcaption><p>The new automation on your Automations page, switched on.</p></figcaption></figure>

Open the automation to see or change what it does. This one runs on **A new Case is created** and tells the agent to read the case, draft a reply, and add it as an internal case comment. The trigger event is fixed when the automation is created. So a new automation is required for each different trigger event.

<figure><img src="https://3732419023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xXO0947TYoPIhGoBgSE%2Fuploads%2Fgit-blob-80e05663b4ea5e882ac8ed359bbdbe1e287ced03%2Fsalesforce-automation-editor.png?alt=media" alt="The automation editor showing the name A new Case is created, the Salesforce event it runs on, and the instructions telling the agent to draft a reply and add it as an internal case comment"><figcaption><p>The automation editor, where you change the instructions it follows.</p></figcaption></figure>
{% endstep %}

{% step %}

### Check automation work in Salesforce

Open Salesforce and look at the next case that comes in to see what the automation did there. In this example a customer emailed in about a charge, Salesforce turned the email into a case, and the agent added its drafted reply as an internal case comment for a teammate to review and send.

<figure><img src="https://3732419023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xXO0947TYoPIhGoBgSE%2Fuploads%2Fgit-blob-b59c6b4bd513782340054d6bdbab975a8975a14c%2Fsalesforce-case-comment.png?alt=media" alt="A Salesforce case created from a customer email, with eesel AI&#x27;s drafted reply added below it as an internal case comment"><figcaption><p>The customer email, with the drafted reply under it as an internal case comment.</p></figcaption></figure>
{% endstep %}
{% endstepper %}

{% hint style="info" %}
**From Claude Code, Cursor or a terminal.** The same setup works as commands: `eesel login`, then `eesel integrations connect salesforce` (a person approves it in the browser; if the receipt has no link, ask `eesel chat` for one), `eesel integrations download start` to copy your sources in, and `eesel automations` to see and switch on the automations. Trigger keys for this page are in the Triggers table below. Full command reference: [The eesel CLI](/apis-and-developer-resources/cli.md). Step-by-step: [Set up from Claude Code or the terminal](/getting-started/set-up-from-a-coding-agent.md). From an MCP client: [Claude Code and MCP clients](/apis-and-developer-resources/claude-code-and-mcp-clients.md).
{% endhint %}

## Sources, triggers and actions

### Sources

Sources are what it learns from. Toggle each one on or off from the Salesforce page under Integrations:

| Source                 | Description                    |
| ---------------------- | ------------------------------ |
| **Cases**              | Your Salesforce support cases  |
| **Contacts**           | Your Salesforce contacts       |
| **Accounts**           | Your Salesforce accounts       |
| **Knowledge Articles** | Your Salesforce Knowledge base |

Every other integration on the agent is also a source. Salesforce answers "what is true for this account" and your help center answers "how does this work", so connect both. See [Integrations](/integrations/overview.md).

### Triggers

Triggers are the Salesforce events an automation can run on:

| Trigger                      | Fires when                            | Best for                                                         | Key                          |
| ---------------------------- | ------------------------------------- | ---------------------------------------------------------------- | ---------------------------- |
| **A new Case is created**    | A case is added, however it got there | Picking up new cases, including ones created from customer email | `salesforce_new_case`        |
| **A Case is updated**        | An existing case is modified          | Following a case through its lifecycle                           | `salesforce_case_updated`    |
| **A new Lead is created**    | A lead is added                       | Picking up new leads                                             | `salesforce_new_lead`        |
| **A Lead is updated**        | An existing lead is modified          | Reacting to a change on a lead                                   | `salesforce_lead_updated`    |
| **A new Contact is created** | A contact is added                    | Picking up new contacts                                          | `salesforce_new_contact`     |
| **A Contact is updated**     | An existing contact is modified       | Reacting to a change on a contact                                | `salesforce_contact_updated` |
| **A new Account is created** | An account is added                   | Picking up new accounts                                          | `salesforce_new_account`     |
| **An Account is updated**    | An existing account is modified       | Reacting to a change on an account                               | `salesforce_account_updated` |

Each kind of record has its own trigger, and the Salesforce page under Integrations lists the ones your connection offers. One trigger watches one kind of record, so a case automation and a lead automation are two separate automations. The same goes for which records it takes: describe the records you want in the instructions and the agent skips the rest, recording what it passed over on the agent's Activity page.

### Actions

Actions are what it can do, each set to run on its own, ask you first, or stay off:

|             | Action                            | What it does                                                                                                       |
| ----------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| **Respond** | Add case comment                  | Adds a comment on a case. Mark it internal and only your team sees it. Start here: the agent drafts, a human sends |
|             | Send email                        | Sends an email from Salesforce. This one reaches the customer                                                      |
| **Manage**  | Create or update a case           | Creates a case, updates its fields, or closes it                                                                   |
|             | Create or update a record         | Creates or updates a contact, account, lead, opportunity, task or note                                             |
| **Look up** | Read case / Search cases          | Reads a case in full and finds cases by subject, contact or id                                                     |
|             | Look up contact / Look up account | Finds a contact or an account and reads it live from Salesforce                                                    |

The lookup actions only read, so they cannot change your data. A write can create a duplicate contact or lead by mistake, so tell the agent to search before it creates. Sending email reaches outside your team, so it is the first action most people put behind approval.

## Troubleshooting

<details>

<summary>Connection didn't complete?</summary>

Check the eesel AI package is installed in your Salesforce org, because the authorization step fails without it. Check you have permission in Salesforce to authorize a connected app. Then complete every prompt: closing the flow partway leaves the connection incomplete. Start the connection again from the chat or from **Integrations** in the left sidebar.

</details>

<details>

<summary>Agent isn't using Salesforce data?</summary>

Check the source is toggled on under Integrations, and that the record type is within what the authorized Salesforce user can see. Also check your [Instructions](/instructions-and-memory/instructions-and-memory.md) tell it when to look a record up, for example "before answering a billing question, look up the account by the customer's email". A record the lookups cannot find usually does not exist, or is not visible to the authorized user, so check its sharing and field permissions in Salesforce.

</details>

<details>

<summary>Trigger not firing?</summary>

Check the automation watches the kind of record you expect. A case automation does not fire on a new lead. Then confirm the automation is enabled on your agent's **Automations** page, and that at least one action is enabled.

</details>

<details>

<summary>Actions failing?</summary>

The eesel AI package has to stay installed in your Salesforce org. If it was removed, the actions stop working. Install it again, then re-authorize from the integration's page.

</details>

## FAQ

<details>

<summary>Which way of connecting do I use?</summary>

Follow the steps on this page. Your agent gives you the install link for the eesel AI package, and once it is installed, the authorization link.

</details>

<details>

<summary>What is the eesel AI managed package?</summary>

It is an app you install in your Salesforce org. Salesforce needs it in place before it allows the connection. Installing it asks you to approve one site, `oracle.eesel.app`, which is eesel. If you uninstall it, the connection stops working.

</details>

<details>

<summary>Can it draft or send replies on a case?</summary>

It can draft the reply and add it as an internal case comment, which is what the steps above set up. That comment stays inside your team. It does not go to the customer, so a person reviews and sends. To have the agent answer customers itself, connect the helpdesk they write into and let Salesforce supply the account context. The **Send email** action sends from Salesforce, which is a different thing and worth keeping behind approval.

</details>

<details>

<summary>How do I keep a human in the loop?</summary>

Two ways, and you can use both. Have the agent add an internal case comment instead of sending email, so your team reads, edits and sends. Or set an action to ask you first, so the agent shows you exactly what it wants to do and waits. Most teams start with every write on approval and only the lookups running freely. When an action is set to ask you first, the prepared reply shows up in the dashboard with three buttons: Approve runs it once, Always allow stops asking for that action, and Deny discards it.

</details>

<details>

<summary>Does connecting Salesforce start acting on my cases automatically?</summary>

No. Connecting only gives your agent access to your sources. It does nothing until you create an automation and enable an action, so you can test with a human in the loop first.

</details>

<details>

<summary>How is this billed?</summary>

Pay-as-you-go: a case your agent handles is one task, however many lookups and updates happen on it, and chats you run yourself from the eesel dashboard are free. There is no separate charge for connecting Salesforce. See [Pricing](/pricing/overview.md) for rates, the annual commitment, and Enterprise.

</details>

<details>

<summary>How do I disconnect?</summary>

Open Salesforce under Integrations in the left sidebar and remove the connection. If you installed the eesel AI managed package, also uninstall it from your Salesforce org to fully revoke access.

</details>

## Related pages

* [Helpdesk](/use-cases/helpdesk.md) for the job your teammate takes on in a ticket queue
* [Automations and Schedules](/automations-and-schedules/automations-and-schedules.md) for triggers, instructions and schedules
* [Actions and Approvals](/instructions-and-memory/actions-and-approvals.md) for setting each action to run on its own, ask you first, or stay off
* [Integrations overview](/integrations/overview.md) for how sources, triggers and actions fit together
* [Set up from Claude Code or the terminal](/getting-started/set-up-from-a-coding-agent.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.eesel.ai/integrations/helpdesks/salesforce.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
