You might not have access to this feature!

This feature is only available on our premium and enterprise plans. [Talk to our team](mailto:premium@customer.io) about upgrading your plan.

# Salesforce data-in integration

[PremiumThis feature is available for Premium plans.](/accounts-and-workspaces/plan-features/) [EnterpriseThis feature is available for Enterprise plans.](/accounts-and-workspaces/plan-features/)

The Salesforce source lets you send data from your CRM to destinations where you can activate it. For example, you can send Salesforce data to Customer.io where you can automatically message people—follow up with leads, message contacts when it’s time to renew their contracts, and so on. This makes Salesforce a part of your larger marketing stack without needing developers to write a complicated integration.

## Quick start video[](#quick-start-video)

Here’s a quick overview of the setup process for our incoming Salesforce integration. In this video, we set up Salesforce to send Contacts and Accounts to Customer.io.

## Before you begin[](#before-you-begin)

Before you begin, you should ask yourself how you want to use your Salesforce data. The data that you send to Customer.io—as *People*, *Events*, *Custom Objects*, or *Relationships* between people and objects—may depend on what you want to do with your data in Customer.io and what downstream services you want to send it to. See [Working with Salesforce Data](#working-with-salesforce-data) for help mapping data.

### Working with Salesforce data[](#working-with-salesforce-data)

Unlike Customer.io and other platforms, Salesforce doesn’t have generic concepts like *People* and *Groups*—or things that map easily to those terms. Instead, Salesforce has highly structured data: your leads, contacts, opportunities, accounts, and other things are all separate.

When you send Salesforce data to Customer.io, you’ll have to determine whether each type of data represents *People*, *Events*, *[Custom ObjectsAn object is a non-person entity that you can associate with one or more people—like a company, account, or online course.](/journeys/objects/)*, or *Relationships* between people and objects. In most cases, [this should be easy](/integrations/data-in/connections/salesforce/mapping-to-customerio/#how-do-i-know-if-data-is-a-person-event-or-an-object): contacts are people, because you’ll send them messages; an account is something many people are connected to, so it’s probably a custom object.

On this page, we recommend that you start with *Contacts* because they map to people. For other types of data, see [Using Salesforce with Customer.io Journeys](/integrations/data-in/connections/salesforce/mapping-to-customerio) to learn more about using data with Customer.io specifically, or [Mapping Salesforce data to destinations](/integrations/data-in/connections/salesforce/mapping-data) to learn more about mapping Salesforce data to other destinations.

## Prerequisites[](#prerequisites)

To connect Salesforce to Customer.io, you need:

1.  A Salesforce Data Cloud (sometimes called Sales Cloud) account that is either:
    *   At the *Professional*, *Enterprise*, level or higher.
    *   Includes *Web Services API* access.
2.  A Salesforce user with access to the data you want to send from Salesforce to Customer.io. In general, we suggest that you set up a user specifically for your syncs, making it easy to limit the data Customer.io can access and control your integration independently of your day-to-day Salesforce users.

## Set up your Salesforce integration[](#set-up-your-salesforce-source)

When you set up your integration, you’ll configure your first *Sync*—the type of data that you want send to Customer.io and other destinationsAn integration that sends data *out* of Customer.io—your data’s ultimate *destination*.. We suggest that you start with **Contacts** because it’s the easiest, and most natural thing to send into Customer.io and other services.

You’ll [set up subsequent syncs](#set-up-syncs) after you finish configuring your integration, where each sync brings in a different kind of data (leads, opportunities, and so on).

1.  Go to *Data & Integrations > Integrations*. In the *Directory* tab, pick the *Data In* **Salesforce** integration
    
2.  Set up your Salesforce connection:
    
    1.  Give the integration a friendly *Name* so you’ll recognize it in Customer.io.
    2.  Set up your sync. See [Scheduled syncs](/integrations/data-in/connections/salesforce/syncs) for more information.
    3.  If you’re logging in with your Salesforce Sandbox account, you’ll need to enable the **Sandbox** setting to test your integration.
3.  Click **Connect Salesforce** and log into Salesforce. While you can login with any Salesforce user, you might want to login with an [*integration user*](#integration-user)—an account made specifically for this integration that helps you manage and limit the data available to Customer.io.
    
    When you’ve logged into Salesforce, click **Create Sync**.
    
4.  Create your first sync. This is a type of data that you send through your pipeline.
    
    [![Set up your first Salesforce sync](https://docs.customer.io/images/cdp-salesforce-sync-setup.png)](#36d1534018d27929ce9ecf57f480310e-lightbox)
    
    1.  Give your sync a *Name*—something that describes the data you’re importing and what you’re mapping it to.
        
    2.  In the *Sync* dropdown, pick the kind of Salesforce record you want to send to Customer.io. Again, we suggest starting with **Contacts**.
        
    3.  Click **Edit** next to *Unique identifiers* map your identifier—the field that uniquely identifies each person or object. If you’re using *Contacts*, pick the *Contact ID* as your Contact ID.
        
        [![Set your contact ID to map contact IDs to people](https://docs.customer.io/images/cdp-salesforce-contact-id.png)](#b353f856d4cfd818617c8d8d3eb35e28-lightbox)
        
    4.  Go to the *Fields* tab and pick the fields you want to capture in Customer.io. Salesforce contains a lot of data, not all of which is useful in Customer.io. For example, you don’t need the mailing latitude or longitude to send email.
        
        [![Set a user ID field and turn off fields you don't want to send through your pipeline](https://docs.customer.io/images/cdp-salesforce-sync-contact.png)](#cdec8347a390bd8ab9cd2b0a56b7e8c1-lightbox)
        
    5.  Click **Add optional data filters** if you want to bring a subset of your data into Customer.io. See [Filter incoming data](#filter-incoming-data) for more information.
        
    6.  **If your sync isn’t *Contacts*, check the *Pipelines format***. For popular Salesforce data types, we’ll set these fields for you. For example, if you’re sending *Accounts*, *Data Pipelines Format* is automatically set to *Custom Object* and the *Custom Object Name* is set to *Accounts*.
        
        Otherwise, these fields tell Customer.io how to interpret the data you send—whether your Salesforce data represents people, [custom objectsAn object is a non-person entity that you can associate with one or more people—like a company, account, or online course.](/journeys/objects/), or [relationshipsThe connection between an object and a person in your workspace. For instance, if you have Account objects, people could have relationships to an Account if they’re admins.](/journeys/relationships/). The *Custom Object Name* is an attribute we store so you’ll know which Salesforce data type your Customer.io data originated from.
        
        [![Set the data pipelines format to tell us what kind of data you're sending](https://docs.customer.io/images/cdp-salesforce-pipelines-format.png)](#112091fe7d3b26b4af9d77ee526106dd-lightbox)
        
    7.  Choose how often you want to sync data and when you want to start.
        
5.  Click **Next: choose destinations** and select places you want to connect your Salesforce data to. The destinations you connect to might depend on how you model your data! See [Mapping data to destinations](/integrations/data-in/connections/salesforce/mapping-data) for more information.
    
    [![Select the destinations you want to connect to your salesforce integration](https://docs.customer.io/images/cdp-salesforce-setup-destination.png)](#9d4cf213e2d5b460521df70e3e0e8769-lightbox)
    
6.  If your *Data Pipelines format* is set to *Custom Object* or *Relationship*, you need to map them to a [custom objectAn object is a non-person entity that you can associate with one or more people—like a company, account, or online course.](/journeys/objects/) in Customer.io. In most cases, this is the same name as the Salesforce object you want to sync (or relate people to). If you’re mapping something like *Accounts* to Customer.io, and *Accounts* don’t already exist, click **New Object Type** and set the singular and plural forms—like *Account* and *Accounts*.
    
    [![Map your custom object to a destination](https://docs.customer.io/images/cdp-salesforce-create-object.png)](#2663f127370343fde2d294ccc5c7d951-lightbox)
    
7.  Click **Enable Salesforce**.
    
8.  [Approve Customer.io as a “Connected App” in Salesforce](#approve-customerio-as-a-connected-app-in-salesforce). You must do this before data will begin syncing to Customer.io.
    

Now that you’ve created a sync for one type of Salesforce data, you may also want to [create syncs](#set-up-syncs) for other kinds of data you want to import from Salesforce.

The **Syncs** tab will show the status of your sync and note that we’re processing your Salesforce data. If you go into , you should begin seeing your Salesforce data—though it may take a few minutes to populate all your people, especially if you have millions of records.

### Approve Customer.io as a “Connected App” in Salesforce[](#approve-customerio-as-a-connected-app-in-salesforce)

Salesforce is removing support for “Connected Apps” in Salesforce in 2026—and that’s how our integration is currently built. We’re working on updates to our integration to support their “External App” framework, but, in the meantime, you’ll need to approve Customer.io as a “Connected App” in Salesforce before you can sync data from Salesforce to Customer.io.

1.  Go to Salesforce, click the *Setup* icon and then click **Setup**.
    
    [![click the setup icon in Salesforce and select setup](https://docs.customer.io/images/cdp-salesforce-setup-menu.png)](#a49f1472a7f3433197c11e42f9ff9150-lightbox)
    
2.  Under *Platform Tools* go to **Apps > Connected Apps > Connected Apps OAuth Usage**.
3.  Click **Install** next to *Customer.io Data Pipelines* and follow the instructions to approve Customer.io as a “Connected App” in Salesforce.
    
    [![click install next to Customer.io Data Pipelines and follow the instructions to approve Customer.io as a connected app in Salesforce](https://docs.customer.io/images/cdp-salesforce-install-connected-app.png)](#88c2a4ab47cdc2acef322d4e905a0052-lightbox)
    

## Set up additional syncs[](#set-up-additional-syncs)

During the [initial setup](#set-up-your-salesforce-source) you’ll create a single sync when you set up your Salesforce integration. After that, you can set up additional syncs to import other kinds of data from Salesforce. To learn more about whether your data types are people, objects, or events, see [Mapping Salesforce data to destinations](/integrations/data-in/connections/salesforce/mapping-data).

1.  Go to your Salesforce integration’s *Syncs* tab and click **Add Sync**.
    
2.  Give your sync a *Name*—something that describes the data you’re importing and what you’re mapping it to.
    
3.  Pick the kind of Salesforce record you want to send to Customer.io. If you’ve already synced contacts, you might want to sync the *Accounts* they’re connected to.
    
    [![Set up your first Salesforce sync](https://docs.customer.io/images/cdp-salesforce-account-setup.png)](#597a85fe6f5f0596e61d9f7243f6d23d-lightbox)
    
4.  Click **Edit** next to *Unique identifiers* map your identifier—the field that uniquely identifies each person or object. For *Accounts*, this is usually the **Account ID**.
    
5.  Go to the **Fields** tab and select the fields you want to capture for that data type and then click **Save Changes**.
    
    [![Set a user ID field and turn off fields you don't want to send through your pipeline](https://docs.customer.io/images/cdp-salesforce-account-fields.png)](#d866eeef5cbfc9d21c683a0147735945-lightbox)
    
6.  **If your sync isn’t *Contacts*, check the *Data Pipelines format***. For popular Salesforce data types, we’ll set these fields for you. For example, if you’re sending *Accounts*, *Data Pipelines Format* is automatically set to *Custom Object* and the *Custom Object Name* is set to *Accounts*. For more information about the data pipelines format, see [Mapping Salesforce data to Customer.io](/integrations/data-in/connections/salesforce/mapping-to-customerio/).
    
    Otherwise, these fields tell Customer.io how to interpret the data you send—whether your Salesforce data represents people, [custom objectsAn object is a non-person entity that you can associate with one or more people—like a company, account, or online course.](/journeys/objects/), or relationships. The *Custom Object Name* is an attribute we store so that you’ll know which Salesforce data type your Customer.io data originated from.
    
    [![Set the data pipelines format to tell us what kind of data you're sending](https://docs.customer.io/images/cdp-salesforce-pipelines-format.png)](#112091fe7d3b26b4af9d77ee526106dd-lightbox)
    
7.  Click **Add optional data filters** to add filters to the data you want to bring into Customer.io. See [Filter incoming data](#filter-incoming-data) for more information. If you don’t add any filters, we’ll bring all data of the selected type from Salesforce.
    
8.  Choose how often you want to sync data, when you want to start, and then click **Configure Destinations**.
    
9.  If your *Data Pipelines format* is set to *Custom Object* or *Relationship*, you need to map them to a [custom objectAn object is a non-person entity that you can associate with one or more people—like a company, account, or online course.](/journeys/objects/) in Customer.io. In most cases, this is the same name as the Salesforce object you want to sync (or relate people to). If you’re mapping something like *Accounts* to Customer.io, and *Accounts* don’t already exist, click **New Object Type** and set the singular and plural forms—like *Account* and *Accounts*.
    
    [![click new object type to create a new object](https://docs.customer.io/images/cdp-salesforce-create-object-new.png)](#6c3e6dbec9c6c930635bccbe361f7a2f-lightbox)
    
10.  Click **Enable Sync**
    

When you finish setting up your sync, the **Syncs** tab will show the status of your new sync and note that we’re processing your Salesforce data. If you go into the Journeys tab , you should begin seeing your Salesforce data—though it may take a few minutes to populate all your people, especially if you have millions of records

### Filter incoming data[](#filter-incoming-data)

When you set up a sync, we bring all data of the selected type from Salesforce by default. For example, if you sync your Salesforce contacts, we’ll bring *all* your contacts into Customer.io. But you might not want all of your contacts—maybe you qualify your contacts or you only want to bring in contacts who meet certain thresholds.

That’s what the *Add optional data filters* button does: it lets you provide criteria for data you want to bring into Customer.io.

[![add optional data filters to filter your data](https://docs.customer.io/images/cdp-salesforce-sync-filter.png)](#f17a947f37043d1df1a099d043543dd6-lightbox)

If you’re not comfortable writing your own query, you can use AI to generate a filter for you! Provide a plain-text description of the data you want to capture or exclude, and we’ll try to generate a filter for you.

If you write your own query, note that you don’t have to write the `SELECT`, `FROM`, or `WHERE` clauses. The filter acts as criteria for the `WHERE` clause of a [Salesforce SOQL](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_conditionexpression.htm) query, and the other sync settings cover the `SELECT` and `FROM` clauses. For example, if you only want to bring contacts into Customer.io if they have an email address, you could write a filter like this:

```sql
Email != null
```

 Salesforce capitalizes field names

When you write your filter, remember that Salesforce uses *pascal case* field names (like `FirstName`). While you can change field names when you bring them into Customer.io, you’ll use the original field name from Salesforce for your filter.

### What data is captured in each sync?[](#what-data-is-captured-in-each-sync)

Your first sync captures all your current Salesforce data of the specified type. Subsequent syncs capture records that changed since the previous sync. This means that your first sync may take longer than subsequent syncs, as we gather all your Salesforce data with the initial sync.

For example, if you sync contacts, your first sync will send *all* of the current contacts in your Salesforce environment. The next sync will gather all changes to contacts—all your new contacts, updates, and deleted contacts—since the first sync.

 We handle deletions differently from create and update operations!

When you delete records in Salesforce, we send events to record the deleted items. Customer.io handles these events automatically. But you may need to set up actionsThe source event and data that triggers an API call to your destination. For example, an incoming `identify` event from your sources *adds or updates a person* in our Customer.io Journeys destination. to [delete data](/integrations/data-in/connections/salesforce/delete/)!

### Updating syncs[](#updating-syncs)

When you update a sync to add or remove fields, your updates take affect at the next sync interval. This means that your changes don’t affect data that you’ve already sent from Salesforce (or any syncs in progress).

To update *all* data you’ve passed from Salesforce to Customer.io (and other places you send your Salesforce data to), you can **Resync all data**. This sends all of your corresponding Salesforce data through Customer.io again, updating all of your records with the changes you made to your sync.

On the **Syncs** tab, click next to the sync you updated and click **Resync all data**.

[![resync all data if you make changes to a sync](https://docs.customer.io/images/cdp-salesforce-resync-all-data.png)](#fc15baeb524ea09a9b7568f97dd2e6a5-lightbox)

## Manage access to Salesforce data with an “Integration User”[](#integration-user)

When you connect to Salesforce, you don’t need to use your own credentials. You can set up an *Integration User* in Salesforce with limited access to the data you want to send to Customer.io. This helps you secure and limit the data that you expose to Customer.io—both the types of data you can sync and the fields within each data type that Customer.io can access.

See [Salesforce’s documentation](https://admin.salesforce.com/blog/2023/best-practices-for-configuring-your-integration-user) for more about *Integration Users*.