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

# Salesforce Integration

> Import Salesforce account lists and their owners into Sixtyfour workflows to research them and route findings to each owner.

Connect Salesforce to Sixtyfour to import a saved Account list into a workflow, then research the accounts and send what you find to each account owner. Sixtyfour only reads from Salesforce. It never changes or writes back to your Salesforce data.

## What Sixtyfour reads

Sixtyfour signs in to Salesforce as the user who connects it and requests the `api`, `refresh_token`, and `openid` scopes. Salesforce applies that user's permissions and sharing rules, so Sixtyfour sees only what the user can see.

| Salesforce data | What Sixtyfour reads |
| - | - |
| Account list views | The names of the saved Account list views the user can open |
| Accounts | ID, name, and website of each account in the chosen list |
| Account owners | The owner's user ID, name, and email |
| Connected user | The user's Salesforce username, shown as the connection's label |

Sixtyfour reads Salesforce only when you connect, open the Import Data block, or run a workflow.

## Before you start

* A Salesforce admin installs Sixtyfour in your Salesforce org once, before anyone can connect. See [Install Sixtyfour in Salesforce](#install-sixtyfour-in-salesforce).
* You need to be a team owner, or an organization admin or owner, in Sixtyfour to connect or disconnect Salesforce. Otherwise, ask one of them to complete the setup. See [Roles & Permissions](https://docs.sixtyfour.ai/guides/roles-and-permissions.md).
* The Salesforce user needs the **API Enabled** permission and read access to Accounts and their owners.
* Sixtyfour imports saved Account list views. Create the list in Salesforce first, with the filters you want, and make sure the connecting user can open it.
* Sixtyfour signs in through `login.salesforce.com`, so connect a production or Developer Edition org. Sandbox orgs are not supported.

Sixtyfour lists only the Account list views that Salesforce's API can query, so some views in the picker on the Salesforce **Accounts** tab don't appear.

![Salesforce Accounts tab with the list view picker open](https://mintcdn.com/sixtyfour/OqitwTstCHo6UGNO/images/salesforce-account-list-views.png?fit=max\&auto=format\&n=OqitwTstCHo6UGNO\&q=85\&s=668798a02ed2b68c8d6550be700c703e)

## Install Sixtyfour in Salesforce

A Salesforce admin does this once for the whole Salesforce org. Until then, connecting stops at a Salesforce page that says the external client app is not installed in this org.

**1. Open the install link**

In Sixtyfour, go to **Settings → Integrations → Salesforce** and click **Install in Salesforce**, or open the [install link](https://login.salesforce.com/packaging/installPackage.apexp?p0=04tbm000000tmwrAAA) directly. If you are not a Salesforce admin, click **Copy link for admin** and send the link to one.

**2. Install the package**

Sign in to Salesforce as an admin, click **Install**, and confirm if Salesforce asks.

After the install, a Sixtyfour team owner or organization admin can connect Salesforce, signing in as any Salesforce user in the org with the **API Enabled** permission.

## Connect Salesforce

**1. Open the Salesforce integration**

In the [Sixtyfour dashboard](https://app.sixtyfour.ai), go to **Settings → Integrations** and select **Salesforce**.

![Sixtyfour Integrations settings page with the Salesforce card highlighted](https://mintcdn.com/sixtyfour/OqitwTstCHo6UGNO/images/salesforce-sixtyfour-integrations.png?fit=max\&auto=format\&n=OqitwTstCHo6UGNO\&q=85\&s=f9b5a8a5f0b4c8660d006b6c3243f8f1)

**2. Click Connect Salesforce**

![Salesforce settings page in Sixtyfour with the Connect Salesforce button highlighted](https://mintcdn.com/sixtyfour/OqitwTstCHo6UGNO/images/salesforce-sixtyfour-connect.png?fit=max\&auto=format\&n=OqitwTstCHo6UGNO\&q=85\&s=14f84168335fadc6dad848f98ece1fd4)

**3. Sign in and allow access**

Sixtyfour opens the Salesforce sign-in page. Sign in as the user whose lists and permissions workflows should use, then click **Allow**. If Salesforce shows a security warning above the request, first check that the page says **Sixtyfour is asking to** and that you started from **Connect Salesforce**. Finish within 10 minutes of clicking **Connect Salesforce**.

![Salesforce Allow Access page for Sixtyfour with the Allow button highlighted](https://mintcdn.com/sixtyfour/OqitwTstCHo6UGNO/images/salesforce-allow-access.png?fit=max\&auto=format\&n=OqitwTstCHo6UGNO\&q=85\&s=f3e2d330ecb87923355ab22aa2e565cf)

Salesforce returns you to Sixtyfour, and the connection shows **Connected** with the user's Salesforce username. Salesforce asks only the first time. Later connections from the same user skip this page.

The connection belongs to your current team. Every workflow in the team can import with it. Sixtyfour encrypts the Salesforce tokens with your organization's own encryption key.

> [!NOTE]
>
> Imports run as the user who connected Salesforce. A list such as **My Accounts** returns that user's accounts, not the accounts of the person running the workflow.

## Import accounts into a workflow

**1. Add an Import Data block**

Open the [Workflow Editor](https://app.sixtyfour.ai/workflows), add an **Import Data** block, and set **Import from** to **Salesforce**.

![Import Data block configured to import a Salesforce account list, with a preview of the accounts](https://mintcdn.com/sixtyfour/OqitwTstCHo6UGNO/images/salesforce-import-data-block.png?fit=max\&auto=format\&n=OqitwTstCHo6UGNO\&q=85\&s=570df896aca50897212cd11f4287780b)

**2. Choose the list**

| Setting | What it does |
| - | - |
| Salesforce account | The team's Salesforce connection to import with. Sixtyfour selects it when the team has only one. |
| Account list | A saved Account list view. Click the refresh icon after you create or share a list in Salesforce. |
| Maximum rows | Caps how many accounts a run imports. Defaults to 1,000, up to 100,000. |

The block previews the first five accounts and shows how many accounts the list holds.

**3. Add Intelligence and output blocks**

Each account becomes one Company row, so any company block can follow. A common pattern researches the accounts and messages each owner in Slack, with **DM email column** in the [Send Slack Message](https://docs.sixtyfour.ai/integrations/slack-integration.md) block set to `owner_email`:

```mermaid theme={null}
flowchart LR
  Salesforce[Import Data: Salesforce] --> Enrich_Company[Enrich Company] --> Slack[Send Slack Message]
```

**4. Run the workflow**

Run the workflow from the editor, or put it on a [schedule](https://docs.sixtyfour.ai/guides/automated-workflows.md). Each run imports the list's current members with its current filters, so a scheduled workflow picks up new accounts as they join the list.

> [!TIP]
>
> The Sixtyfour Agent can set up the block for you. Name the Salesforce list in your request, for example: "Import my Platinum and Gold SLA Customers list from Salesforce and research each account."

### Imported columns

| Column | Description |
| - | - |
| `salesforce_id` | The Salesforce Account ID |
| `name`, `website` | The account's name and website in Salesforce |
| `owner_id` | The Salesforce user ID of the account owner |
| `owner_name`, `owner_email` | The account owner's name and email |
| `salesforce_url` | Link to the account in Salesforce |

## Disconnect Salesforce

* In Sixtyfour, go to **Settings → Integrations → Salesforce**, click the trash icon next to the connection, and confirm **Disconnect**.
* In Salesforce, open your personal settings, go to **Advanced User Details**, and click **Revoke** next to **Sixtyfour** under **OAuth Apps**.

> [!WARNING]
>
> Workflows using a disconnected Salesforce connection stop. If you clicked **Disconnect** in Sixtyfour, connect Salesforce again, select the new connection in each affected **Import Data** block, and save the workflows. If you only revoked access in Salesforce, use **Reconnect** on the existing Sixtyfour connection.

## Troubleshooting

| Message | Fix |
| - | - |
| External client app is not installed in this org | A Salesforce admin hasn't installed Sixtyfour in your Salesforce org yet. See [Install Sixtyfour in Salesforce](#install-sixtyfour-in-salesforce). |
| Invalid OAuth state. Please try connecting again. | More than 10 minutes passed between clicking **Connect Salesforce** and clicking **Allow**. Click **Connect Salesforce** again. |
| Salesforce authorization expired or was revoked | Click **Reconnect** in **Settings → Integrations → Salesforce** and sign in again. |
| Salesforce denied access | The connected user is missing the **API Enabled** permission or read access to Accounts or their owners. Ask your Salesforce admin to grant it, then reconnect. |
| The Salesforce connection this block uses is not connected for the team running this workflow | The block points to a connection that was disconnected or belongs to another team. Select a current connection in the **Import Data** block and save the workflow. |
| No lists found | Create an Account list view in Salesforce, or share one with the connected user, then click the refresh icon next to **Account list**. |
| This Salesforce list is no longer available | The list was deleted or is no longer shared with the connected user. Choose another list. |
| This list cannot be imported | Choose a saved Account list view. |
| Salesforce API quota reached, or rate limit reached | Your Salesforce org reached its API request limit. Run the workflow again after the limit resets. |
| The Salesforce list changed while importing | Accounts were deleted or hidden from the connected user during the run. Run the workflow again. |

## Block reference

| Field | Value |
| - | - |
| Block type | `read_csv` with `specs.source.type` set to `salesforce_accounts` |
| Pipeline position | Source (first block) |
| Requires integration | Yes, the team must have Salesforce connected |
| Output data type | Company |


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