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

# Salesforce agent functions

> Salesforce tools for Retell AI agents: look up callers by phone, read opportunities and cases, create leads and tasks, and update records mid-call.

A [connected Salesforce org](/integrations/salesforce) gives your agents live Salesforce tools: look up the caller, read their opportunities and cases, and create leads and tasks. Tools run during a conversation or [before and after it](/integrations/overview#run-tools-before-or-after-the-call-or-chat), and no [contact sync](/integrations/salesforce-contact-sync) is required.

## Available tools

Once connected, these tools appear in your agent's function menu. Every tool call runs as the [Run As user](/integrations/salesforce#step-4-set-the-run-as-user), so its permissions decide what each tool can reach. See [use integration tools in an agent](/integrations/overview#use-integration-tools-in-an-agent) for how to add and configure them.

| Tool                                             | What it does                                                                                                      |
| ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
| **Search Contact**                               | Find a Contact by phone number — typically the caller's number, to identify who's calling                         |
| **Get Contact** / **Update Contact**             | Fetch a Contact by record Id, or update fields the caller confirms or corrects                                    |
| **Get Lead** / **Create Lead** / **Update Lead** | Fetch a Lead, create one for a new prospect, or update it                                                         |
| **Get Account** / **Update Account**             | Fetch an Account by record Id, or update its fields                                                               |
| **List Account Opportunities**                   | List an Account's Opportunities (up to 50), most recent first, when the conversation turns to the account's deals |
| **Get Opportunity**                              | Fetch an Opportunity, for example the deal the caller is asking about                                             |
| **Get Case**                                     | Fetch a Case, for example a support case the caller references                                                    |
| **Get Custom Object** / **Update Custom Object** | Fetch or update a record of a custom object you pick when configuring the tool                                    |
| **Create Task**                                  | Create a Task on a Contact or Lead when a follow-up is agreed                                                     |
| **Create Note**                                  | Attach a Note to a Contact or Lead with a summary of what was discussed                                           |

## Required permissions

The [Run As user](/integrations/salesforce#step-4-set-the-run-as-user) always needs **API Enabled**; each tool then needs the matching object permission on the user's profile or permission sets:

| Tool                                        | Run As permission                                                                            |
| ------------------------------------------- | -------------------------------------------------------------------------------------------- |
| Search Contact, Get Contact                 | **Read** on Contact                                                                          |
| Update Contact                              | **Edit** on Contact                                                                          |
| Get Lead                                    | **Read** on Lead                                                                             |
| Create Lead                                 | **Create** on Lead                                                                           |
| Update Lead                                 | **Edit** on Lead                                                                             |
| Get Account                                 | **Read** on Account                                                                          |
| Update Account                              | **Edit** on Account                                                                          |
| List Account Opportunities, Get Opportunity | **Read** on Opportunity                                                                      |
| Get Case                                    | **Read** on Case                                                                             |
| Create Task                                 | **Create** on Task                                                                           |
| Create Note                                 | **Edit** on the record the Note attaches to (Notes take their access from the parent record) |
| Get Custom Object                           | **Read** on the custom object you configure the tool for                                     |
| Update Custom Object                        | **Edit** on the custom object you configure the tool for                                     |

Field-level security applies on top: reads return only fields the user can see, and updates need **Edit** on each field they change. A missing permission doesn't flag the connection; that one tool fails.

## FAQ

<AccordionGroup>
  <Accordion title="Do the integration tools require contact sync?">
    No. Tools work as soon as the connection is made, and each tool is bound to the specific connection you pick when configuring it. Contact sync, analysis mapping, and automatic activity logging are separate features you opt into.
  </Accordion>

  <Accordion title="Can the tools reach custom objects?">
    Yes. The custom object tools work with any custom object you configure them for, as long as the [Run As user](/integrations/salesforce#step-4-set-the-run-as-user) has permissions on it. [Contact sync](/integrations/salesforce-contact-sync) is separate and reads only `Contact`.
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Integration tools for prompt agents" icon="wand-magic-sparkles" href="/build/single-multi-prompt/integration-tools">
    Add Salesforce tools to a single- or multi-prompt agent and test them with live requests.
  </Card>

  <Card title="Integration tools in conversation flow" icon="diagram-project" href="/build/conversation-flow/integration-tools">
    Call Salesforce tools from a function node and branch on the result.
  </Card>

  <Card title="Salesforce contact sync" icon="rotate" href="/integrations/salesforce-contact-sync">
    Import your Contacts, write analysis results back, and log conversations as Tasks.
  </Card>

  <Card title="Dynamic variables" icon="code" href="/build/dynamic-variables">
    Map tool responses to variables your agent can use later in the conversation.
  </Card>
</CardGroup>
