Syncing Intercom user data into Salesforce

×

REQUEST FREE TRIAL

Share A Little Information To Request Free Trial

Created with Sketch.
REQUEST FREE TRIAL

Our Intercom/Salesforce pre-built templates available in the  Library are some of the most powerful integrations that you can run on tray.io. 

However, with great power comes a little complexity, so we've written up this article to discuss what the integration does, how it works, and what you'll need to do to get up and running. We'll also discuss ways that you can customize things to you! 


What the integration does

On the Intercom page of the tray.io library, there are quite a few Intercom/Salesforce templates available. This article specifically looks at the Intercom > Salesforce sync templates, which enable you to sync Intercom data over to leads and contacts in Salesforce, like so:

As you can see above, Intercom user parameters including the URL, segments, and last seen date are being passed to a Salesforce Lead, saved to custom fields.

This data is synced over to Salesforce from Intercom in near real-time.


How the integration works

As mentioned previously, with great power comes a little complexity. As such, we've built out four different workflow templates (you'll need at least three of them) to enable the syncing of Intercom data into Salesforce.

Here's an explanation of each:

1) Sync Intercom data to Salesforce as soon as a lead is saved

Link: https://tray.io/library/view/enrich-salesforce-leads-with-intercom-data-real-time

This workflow allows leads to be enriched with Intercom data as soon as they're created or updated. This ensures that any new leads you add into your Salesforce have Intercom user data attached to them as soon as possible - no sync delay! 

2) Sync Intercom data to Salesforce as soon as a contact is saved

Link: https://tray.io/library/view/enrich-salesforce-contacts-with-intercom-data-real-time

This one is exactly the same as the above, but for contacts.

3) Sync Intercom data to Salesforce leads & contacts when Intercom users are updated

Link: https://tray.io/library/view/enrich-salesforce-leads-with-intercom-data-when-users-in-intercom-are-updated

The previous two workflows are great for syncing data when leads or contacts are created in Salesforce, but what happens when users are updated in Intercom? That's what this workflow is for.

This workflow checks regularly with Intercom to see if any users have been updated. If they've been updated, sync the user details over to Salesforce, just like above.

4) Bulk sync all your existing leads and contacts

Link: http://tray.io/library/view/bulk-enrich-all-existing-salesforce-leads-contacts-with-intercom-user-data

Tip: you'll only need to run this workflow once.

Workflows 1-3 allow the sync from Intercom into Salesforce to occur in near real-time. However, they only work for new updates that are made in either system. What about all your existing your leads and contacts?

This final workflow is a one-off bulk sync, that goes through all of your existing Salesforce leads and contacts, and syncs the Intercom user details over to the corresponding leads and contacts.


Frequently Asked Questions (FAQs)

How do you link leads or contacts in Salesforce with users in Intercom?

Using the email address. If a lead or contact doesn't have an email address, we won't be able to sync them. As soon as you add an email, we'll sync the details across. (Workflow 1 & 2)

How long will the bulk sync take?

It entirely depends on how many leads and contacts you have in your system. If you have over 1,000 expect it to take under an hour. If you have 10x that number, it will take 10x as long. 

Is it possible to also pass our own Intercom custom attributes into Salesforce? 

Yes. You'll need to configure each of the workflows individually to do this. (Detailed later in this article)


How to get set up

As mentioned previously in this article, each of the above workflows have been pre-packaged as templates in our Library, so you can install them in just a few clicks.

However, before we get to that, you'll need to create a number of custom fields in Salesforce. You'll need to be a Salesforce admin to do this. If you're not an admin, send this section of this article to them.

By the way, we know that asking you to create all these fields is a big ask. We'll allow you to upload them all using a "package" soon, but unfortunately this Salesforce bug is stopping us :(.

1) Create Lead custom fields

Please create the following custom fields in your Salesforce account for the Lead object.

Tip: the field keys are specified explicitly below, but Salesforce will auto generate each for you if you use the label we've provided.

Field Label Field Key Field Type
Intercom City Intercom_City Text
Intercom Country Intercom_Country Text
Intercom First Seen Date Intercom_First_Seen_Date Date
Intercom Last Seen Date Intercom_Last_Seen_Date Date
Intercom Signed Up Date Intercom_Signed_Up_Date Date
Intercom Tags Intercom_Tags Long Text
Intercom Companies Intercom_Companies Long Text
Intercom Segments Intercom_Segments Long Text
Intercom Unsubscribed? Intercom_Unsubscribed Checkbox
Intercom URL Intercom_URL URL
Intercom User ID Intercom_User_ID Text
Intercom Web Sessions Intercom_Web_Sessions Number

2) Create Contact custom fields

Please create the following custom fields in your Salesforce account for the Contact object. (These are currently the same as those for leads) 

Field Label Field Key Field Type
Intercom City Intercom_City Text
Intercom Country Intercom_Country Text
Intercom First Seen Date Intercom_First_Seen_Date Date
Intercom Last Seen Date Intercom_Last_Seen_Date Date
Intercom Signed Up Date Intercom_Signed_Up_Date Date
Intercom Tags Intercom_Tags Long Text
Intercom Companies Intercom_Companies Long Text
Intercom Segments Intercom_Segments Long Text
Intercom Unsubscribed? Intercom_Unsubscribed Checkbox
Intercom URL Intercom_URL URL
Intercom User ID Intercom_User_ID Text
Intercom Web Sessions Intercom_Web_Sessions Number

3) Install the templates

Once you've created the above custom fields, it's time to install the pre-built workflow templates! 

We recommend starting with just the real-time templates (not the bulk one), so go ahead and install each of the following, by clicking "Use Template" on the links:

  1. Sync Intercom data to Salesforce as soon as a lead is saved
  2. Sync Intercom data to Salesforce as soon as a contact is saved
  3. Sync Intercom data to Salesforce leads & contacts when Intercom users are updated

If you have any questions in getting set up with these templates, feel free to reach out to us on support.

4) Test the integration

Once you've installed each of the above templates, it's time to test things out! Here's a few things you can try:

Create or update a lead in Salesforce that also exists in Intercom

After you've saved the lead, it should take ~20 seconds for the relevant Intercom user data to be added to their profile.

Create or update a contact in Salesforce that also exists in Intercom

Similar to the above, but this time for contacts. You should see data added here, too. 

Tag a user in Intercom that also exists in Salesforce

This is to ensure data is syncing back from Intercom to Salesforce. Try tagging a user in Intercom. Within a few minutes, that tag should be shown in the "Intercom Tags" field.

5) Installing the bulk sync

Once you're happy with the above tests, you can run the bulk sync to ensure all of your existing leads and contacts in Salesforce have Intercom user details attached to them.

Install  the bulk sync template, and then run it. You'll get an email when it's finished! 


Customizing the integration

Salesforce Page Layouts

When you first add all of the Intercom specific custom fields into your Salesforce, they won't be organized well on the page layout. To make make things more structured, create a new Section, and drag all of the new Intercom fields into it.

Removing fields

If you don't want to show all of the Intercom user fields in Salesforce, we recommend removing them from the page layout. Don't delete the fields - this will make setup a bit more complicated.

Adding fields

If you have some additional fields specified as custom attributes in Intercom that you'd like to sync over to Salesforce, you'll need to configure the "Set lead mappings" and "Set contact mappings" steps in the workflows.

Each field mapping is set up like the below, where "Field A" is the Intercom key, and "Field B" is the Salesforce custom field API Name (they each have __c on the end, as they're custom fields).

If you'd like to map additional custom attributes to fields in Salesforce:

  1. Scroll down to the bottom of the properties panel on the right
  2. Click "Add Mapping"
  3. Specify the custom field attribute in "Field A", starting the field with "custom_attributes.", for example: "custom_attributes.my_attribute"
  4. Add the API name of the Salesforce custom field in "Field B", e.g. "Intercom_My_Attribute__c"

Tip: you'll need to make this change on all four of the workflows.

Last updated 14th April 2017

REQUEST FREE TRIAL

Share A Little Information To Request Free Trial

Created with Sketch.