Understanding the end-to-end Salesforce integration

Connecting your Salesforce data to Customer.io is relatively easy. But getting the right data into Journeys and sending data back into Salesforce can be a bit more complex. We’ll help you connect Salesforce to Customer.io Journeys and send data from Customer.io back to Salesforce—a true, end-to-end integration between your CRM and your messaging platform.

How it works

In this recipe, we’ll walk through a very common use case: syncing accounts and contacts from Salesforce into Customer.io Journeys, and feeding data back into Salesforce. You’ll be able to send data from your Customer.io environment, based on logic inside Customer.io, back into Salesforce.

While this recipe and our examples focus on Contacts and Accounts (people and objects), the same principles apply to all your other Salesforce data, like Opportunities, Leads, and so on.

When pulling data out of Salesforce, you’ll set up three syncs. Salesforce stores data and relationships separately, so you’ll have syncs for Accounts, Contacts, and a third sync for Account-Contact Relationships.

When sending data from Customer.io back into Salesforce, you have a couple of options. We’ll show you how to do both:

  • Engagement data: data about how contacts interact with your messages. You might use this data to update the Last Activity Date in Salesforce.
  • Behavioral data/updates from inside Customer.io (advanced): update your Salesforce data as a part of your messaging campaigns. This lets you use your campaign and Customer.io logic—whether people belong to particular segments, do things in a campaign, and so on—to update Salesforce records.

Engagement data is easy to send back into Salesforce. We already have a built-in integration to send data into Salesforce when someone opens an email, clicks a link, and so on! But sending behavioral data back into Salesforce is more complex. You’ll need to set up webhooks to make an API call to Salesforce when a contact does something in a campaign.

 You can send data directly from your sources to Customer.io and Salesforce

The processes above send data from Customer.io to Salesforce. But you can send data from your customer-facing sources, like your website, mobile apps, and servers, into both Customer.io and Salesforce. By sending the same data to both destinations, you’re effectively syncing your data between the two platforms.

What you’ll do

  1. Set up a Salesforce source in Customer.io
  2. Set up syncs for Accounts, Contacts, and relationships between the two.
  3. Connect your Customer.io data back to Salesforce: pick one or both of the following:
    • Connect your Journeys Message Metrics to Salesforce
    • Set up webhooks to send data back to Salesforce

Relationships: a third sync for two types of data

Salesforce treats Accounts, Contacts, and relationships between the two as discrete pieces of information. So, when you sync accounts and contacts to Customer.io Journeys, you’ll also need to sync Account Contact Relationship information to capture relationships between your contacts and accounts.

The same applies to any other relationships you want to use from Salesforce. In Customer.io, you’ll map most of your Salesforce data to People or Custom Objects. But wherever you need to capture a relationship between people and a group—like opportunities, companies, etc—you’ll need to set up a relationship sync to maintain those relationships.

Dates and times

Customer.io and Salesforce use different formats for dates and times! When you sync data between the two platforms, you’ll need to convert your dates and times to the right format. We’ll show you how to do that, but, if you see an error, just know that date and time formatting is a common issue.

Customer.io Journeys uses Unix timestamps in seconds, while Salesforce uses ISO 8601 formatted dates and times.

  • Customer.io Example: 1616425200 is March 22, 2021, at 10:00:00 AM UTC
  • Salesforce Example: 2021-03-22T10:00:00Z is March 22, 2021, at 10:00:00 AM UTC

When you send data from Salesforce to Customer.io, you’ll need to go to the Customer.io destination’s Actions tab and set each action'sThe 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. Convert dates to Unix timestamps setting to true.

the convert timestamps setting for customer.io destination actions
the convert timestamps setting for customer.io destination actions

When you send data back from Customer.io to Salesforce, you’ll need to convert timestamps back to the ISO 8601 format, typically using liquidA syntax that supports variables, letting you personalize messages for your audience. For example, if you want to reference a person’s first name, you might use the variable {{customer.first_name}}..

Copied to clipboard!
  Contents
Is this page helpful?