How to Connect Salesforce and Customer.io
Creating a consistent and tailored experience across channels is what many PLG companies are aiming to do to stand out from the competition. Building the right tech stack is crucial to be able to understand user behavior at various touch points and create a personalized experience for customers at scale.
Product-led or not, choosing a CRM is one of the first things most businesses do to keep track of their contacts, leads, opportunities, and customer records from day one. More than 150,000 businesses like ours use Salesforce CRM.
Choosing a tech stack that integrates with Salesforce can be overwhelming with all the options available. In this blog post, we are going to explain how one of those integrations works.
Customer.io is an automation platform for messaging and is used by Marketing teams to build and run campaigns. Data sync between Salesforce and Customer.io gives go-to-market (GTM) teams the 360° view of their customers.
Connecting Salesforce to Customer.io
There are three ways to sync data between Customer.io and Salesforce.
Using Webhooks
1. In order to establish a link to Salesforce in Customer.io, you must first create a new user and Connected App in your Salesforce account.
2. To create a new user:
- Navigate to Setup > Administer > Manage Users > Users and follow the on-screen instructions to create a new user.
- After creating a new user, follow the steps listed here to reset the security token. This token and the user credentials will be essential for authenticating into Salesforce later.
3. To create a connected app, go to Setup > Build > Create > Apps and follow the instructions to create a new connected app. Also, remember to
- Tick the box for “Enable OAuth Settings”.
- Enter the URL of your website for the “Callback URL”.
- Lastly, select “Full access (full)” in “Available OAuth Scopes” and click the “Add >” button to add it to “Selected OAuth Scopes”.
4. Keep your Consumer Key and Consumer Secret handy after you've created the new Connected App. Visit Setup > Build > Create > Apps, and click the name of the new Connected App and you’ll see the consumer key and consumer secret on the page.
5. To update the Permitted Users settings, go to Administer > Manage Apps > Connected Apps. Click on your Connected App and select the "Edit Policies" button at the top of the page. In the "Permitted Users" dropdown menu, choose "All users may self-authorize" and save.
6. The data synchronization with Salesforce happens through workflows in Customer.io. To create a Customer.io campaign:
- Select the condition that will activate your campaign - a trigger.
- This data sync method requires adding multiple webhook actions in the workflow builder.
- The first webhook pings Salesforce to receive an Authorization token.
- The initial webhook should be set to POST and should use the URL endpoint below.
https://login.salesforce.com/services/oauth2/token?grant_type=password&client_id={{Your Connected Apps Consumer Key}}&client_secret={{Your Connected Apps Consumer Secret}}&username={{Your Username}}&password={{Your Password and Security Token}}
- To create a new attribute against the user in the Response tab, use the following syntax: attribute_name = {{response.access_token}}.
- This will assign the value of {{response.access_token}} to the specified attribute. You will need to use this attribute in the workflow later on.
- Searching and updating records can happen by fetching data through Salesforce API after you have the Authorization token. The following steps show you how to update a user record.
- In Customer.io, you can use the user's email address to ping Salesforce and update the lead record associated with that email address. Create a new webhook action in your campaign, and set the webhook request to PATCH with the following URL endpoint:
https://{{Your Salesforce Instance}}.salesforce.com/services/data/v47.0/sobjects/Lead/Email/{{customer.email}}
- To draw the Authorization token you’ve set up before, include two headers in your webhook – Content-Type set to application/json and Authorization set to Bearer {{customer.salesforce_access_token}}.
- In the body of your webhook, enter the data you would like to update in Salesforce, for example, City.
Using Process Builder and Apex Classes in Salesforce UI
- Create the Apex class.
- Identify the fields you want to sync to Customer.io and define the Salesforce query for the same.
- Create a process for each object you’d like to sync and set up the criteria for running the process from the drop-down list.
Using Third-Party Apps
You can also use third-party applications like Zapier or Integrately to simplify the data sync between your Salesforce and Customer.io accounts.
Before Connecting Salesforce and Customer.io
Ensuring a successful data sync between these two platforms comes with some limitations and challenges.
- Using webhooks to establish a connection between these systems is long and complex.
- Customer.io only supports a very basic hierarchy. So, if you have users on multiple workspaces, duplicate contacts will be created.
- Using third-party apps for the integration definitely simplifies the process but adds a new tool to the mix. This could be expensive and can cause technical issues, sync delays, and data sync errors.
- The more customized your customer records are, the more complex the data field creation and updating will get.
Inflection.io is an alternative to this complexity. We provide native integration with Salesforce so our customers can get a unified view of their users’ product activity and CRM data.
Inflection’s Native Salesforce Integration Built for B2B
You can set up Inflection.io and Salesforce integration in just 3 steps.
- Set up a new connection and name it.
- Login to your Salesforce instance when prompted.
- Choose your sync setting and save. That’s it!
Not only setting up the connection but also operating on data from Salesforce is pretty much DIY on Inflection. Read our full announcement for more details on Inflecion.io and Salesforce integration.
In Summary
By integrating Salesforce and Customer.io, businesses want to streamline their communication processes and gain valuable insights into customer behavior. But, the absence of native integration between the platforms raises a set of challenges for Salesforce users planning to personalize communication at scale and at a fast pace.
Inflection is the alternative for GTM teams in product-led growth (PLG) companies that are looking for a flexible solution without the dependency on engineering and data resources. Watch Inflection in action here.