> ## 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 enrich them and route findings to each owner.

Connect Salesforce to Sixtyfour to import a saved Account list into a workflow, then enrich 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

* You need to be a Sixtyfour team admin to connect or disconnect Salesforce. Otherwise, ask a team admin to complete the setup.
* 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 imports supported saved Account list views. Some views in the list view picker on the Salesforce **Accounts** tab may not appear in Sixtyfour or may not support importing.

![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)

## 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. Salesforce may show a security warning above the request. Check that the page says **Sixtyfour is asking to** and that you started from **Connect Salesforce**, then click **Allow**. 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 enrichment and output blocks**

Each account becomes one Company row, so any company block can follow. A common pattern enriches 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 enrich 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** and click **Disconnect** next to the connection.
* 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 |
| - | - |
| 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 used up its API requests for now. Run the workflow again later. |
| 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.