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

# Salesforce

Manage contacts, leads, and cases in your Salesforce CRM.

{% hint style="info" %}
Available in the **Starter** plan and above.
{% endhint %}

The Salesforce integration lets your agent read from and write to your CRM while it talks to a visitor. Typical use cases:

* **Capture leads** – create a lead the moment a visitor shows interest.
* **Log support cases** – open a case with the details the visitor has already given.
* **Keep records up to date** – update a contact's details or the status of an existing case.
* **Personalise the conversation** – fetch an existing lead, contact, or case and use the data later in the flow.

### Available actions

Each Salesforce block performs one action. Add several blocks if you need more than one.

| Action             | What it does                                  |
| ------------------ | --------------------------------------------- |
| **Create lead**    | Creates a new lead in Salesforce.             |
| **Create contact** | Creates a new contact in Salesforce.          |
| **Create case**    | Creates a new case in Salesforce.             |
| **Update lead**    | Updates an existing lead.                     |
| **Update contact** | Updates an existing contact.                  |
| **Update case**    | Updates an existing case.                     |
| **Fetch lead**     | Retrieves the details of an existing lead.    |
| **Fetch contact**  | Retrieves the details of an existing contact. |
| **Fetch case**     | Retrieves the details of an existing case.    |

### Setting up the Salesforce block

#### 1. Connect your Salesforce account

1. Add the **Salesforce** block to your agent.
2. Click **Add Account**.
3. Log in to Salesforce and approve the requested permissions.

Once authorised, the block shows your Salesforce account as connected. You only need to do this once – the same account can be reused in other Salesforce blocks.

{% hint style="warning" %}
The Salesforce user who connects the account must have permission to create and edit leads, contacts, and cases. Without it, the block will fail when it runs.
{% endhint %}

#### 2. Choose an action

Select the action the block should perform from the list above. The fields shown in the next step depend on the action you choose.

#### 3. Map the fields

Match each Salesforce field to the data it should receive. A field can be filled with either:

* a **variable** captured earlier in the conversation (for example the visitor's name or email), or
* a **static value** that you type in manually (for example a fixed lead source).

All required fields for the selected action must be mapped before the block will run.

{% hint style="info" %}
You can map up to **50 fields** per block.
{% endhint %}

{% hint style="success" %}
**Tip:** Map a *Lead Source* field to a static value such as "ZyndraAI" so you can easily report on how many leads the agent generates.
{% endhint %}
