Shopify to Intercom: Easy Steps to Move Your Data

on Data Integration, Tutorials • September 16th, 2020 • Write for Hevo

Introduction

Are you looking to move your data from Shopify to Intercom? You are in the right place!
Shopify is a completely managed cloud-based eCommerce software. Shopify enables organizations to set up an eCommerce experience without having to manage the hosting or infrastructure. Companies can customize the Shopify interface to suit their branding and provide a unique experience to their customers. Using such services keep the time to market low for companies in the fiercely competitive world of the internet age. 

Intercom is a messenger and customer relationship management software that can be integrated quickly to websites. Intercom provides automated workflows that can manage customers and leads. Such a service is quite useful in lead generation, management, and conversion. Intercom’s automated workflows allow customers to perform various purchase-related activities like checking the status of their orders, confirming orders, raising support tickets, etc.

With most companies skipping custom website development and depending on eCommerce software services like Shopify, there is an obvious need for integrating messaging apps like Intercom to these services. It is also beneficial to have the customer data from Shopify to Intercom since both the software are two ends of the same customer journey. This post is about the steps involved in connecting Shopify to Intercom

Pre-requisites 

  • A Shopify admin account
  • Intercom admin account

You will be looking at the following:

Hevo Activate: Migrate Data Seamlessly

Hevo Activate helps you directly transfer data from Shopify and various other sources to applications such as Intercom, data warehouses and a lot more, in a completely hassle-free & automated manner. Hevo Activate is fully-managed and completely automates the process of not only loading data from your desired source but also enriching the data and transforming it into an analysis-ready form without having to write a single line of code. Its fault-tolerant architecture ensures that the data is handled in a secure, consistent manner with zero data loss.

Hevo Activate takes care of all your data pre-processing needs and lets you focus on key business activities and draw a much powerful insight on how to generate more leads, retain customers and take your business to new heights of profitability. It provides a consistent & reliable solution to manage data in real-time and always have analysis-ready data in your desired destination. 

Check out what makes Hevo Activate amazing:

  • Real-Time Data Transfer: Hevo Activate with its strong integration with 100+ sources, allows you to transfer data quickly & efficiently. This ensures efficient utilization of bandwidth on both ends.
  • Data Transformation: It provides a simple interface to perfect, modify, and enrich the data you want to transfer. 
  • Secure: Hevo Activate has a fault-tolerant architecture that ensures that the data is handled in a secure, consistent manner with zero data loss.
  • Tremendous Connector Availability: Hevo Activate houses a large variety of connectors and lets you bring in data from numerous marketing & SaaS applications, databases, etc. such as Asana, JIRA, Hubspot, Marketo, MongoDB, Oracle, Salesforce, Redshift, etc. in an integrated and analysis-ready form.
  • Simplicity: Using Hevo Activate is easy and intuitive, ensuring that your data is exported in just a few clicks. 
  • Completely Managed Platform: Hevo Activate is fully managed. You need not invest time and effort to maintain or monitor the infrastructure involved in executing codes.
  • Live Support: The Hevo Activate team is available round the clock to extend exceptional support to its customers through chat, email, and support calls.

Sign up for a 14-day free trial today!

Connecting Shopify to Intercom

Connecting Shopify to Intercom is usually done to synchronize data between the two services. Having a customer created in Intercom automatically as soon as Shopify login allows in seamless customer management. Data flow in the opposite direction is also a nice to have feature. Connecting Shopify to Intercom can be done in three ways.

  • Using Shopify Integration in Intercom 
  • Custom script using Shopify and Intercom REST APIs
  • A No-code approach using Hevo.

Using Shopify Integration in Intercom

Shopify Integration in Intercom allows accomplishing two things

  • Using Intercom messenger in Shopify
  • Syncing data to Intercom every time a user is created in Shopify

This can be accomplished completely through the Intercom user interface.

  1. Head to the Intercom app store and install the Shopify app
Shopify to Intercom
  1. Add the details of your Shopify installation
  1. Allow access to Shopify and Intercom to use each other’s data.
Shopify to Intercom
Shopify to Intercom

That concludes the operation. Customers in your Shopify website will now be able to use Intercom. All Shopify user data will be imported to Intercom as well.

An obvious disadvantage to this approach is that the complete data import will work as Intercom has defined and you will not be able to make any changes to the way your user data is imported to Intercom. You also do not have any control over any specific data you want to import to Intercom other than the user data. This method also does not help you in case you want data to flow from Intercom to Shopify based on events in Intercom. 

If you have specific requirements that cannot be solved because of the downsides mentioned above, you can consider using the REST APIs offered by Shopify and Intercom. You will now learn to use to REST APIs to import data from Shopify to Intercom

Custom Script Using Shopify and Intercom REST APIs

Shopify REST APIs are accessed via keys and passwords that are available in the admin section. Here you will try to load customer data from Shopify to Intercom. The same approach can be used in loading any kind of data from Shopify to Intercom as long as you have an idea on Shopify and Intercom object structures and mapping. You will begin this execution by noting down the key and password from the admin sections of Shopify. 

  1. Using the key and password, execute the below command to get the customers.
curl --user:password GET https://shop.myshopify.com/admin/api/2020-07/customers.json >> shopify_customer.json 
  1. Execute the below command using jq to format the obtained JSON file to CSV.
cat shopify_customer.json | jq -r '.customers[] | [.id,.first_name,.last_name,.email] | @csv' |sed 's/"//g' >> shopify_customers.csv
  1. You will now write a short script to parse the above CSV file and create customers in Intercom. 
export IFS=","
cat shopify_customers.csv | while read a b c d;  
do  
curl https://api.intercom.io/contacts 
-X POST 
-H 'Authorization:Bearer <Your access token>' 
-H 'Accept:application/json' 
-H 'Content-Type: application/json' 
-d '{  "role":"user", "email":"'$d'" }'
done

Note that the above script requires an authorization token. This token can be obtained from the Intercom developer hub by creating an application there. The script processes each row in CSV and calls the Intercom contacts API.

Executing the above script will ensure that the customer data exported from Shopify is imported to Intercom. As you may have already guessed by now, this is a tedious process and requires engineering effort. Beyond this, there are other drawbacks with an approach like this.

  1. This can at best be executed as a batch process and hence realtime sync is not possible. For realtime sync, it is better to go for a webhook based approach, but that requires you to have access to your won webserver.
  2. This only addresses one direction of the data flow and a single API. In reality, you will need to work with both directions of the data flow and all the API provided by Shopify and Intercom
  3. There is no scope for the transformation of data in this approach. 

If all the above drawbacks feel to be too steep a curve, you should take a look at Hevo. 

Conclusion

This article introduces you to the steps required to connect Shopify to Intercom. It also provides in-depth knowledge about the concepts behind every step to help you understand and implement them efficiently. These methods, however, can be challenging especially for a beginner & this is where Hevo Activate saves the day. Hevo Activate helps you directly transfer data from a source of your choice to a data warehouse or any SaaS application, CRMs, etc. in a fully-automated and secure manner without having to write the code repeatedly. Hevo Activate with its strong integration with 100+ sources & BI tools, allows you to not only export & load data but also transform & enrich your data & make it analysis-ready in a jiffy.

https://www.youtube.com/watch?v=p0XGLDgvCo8

Sign up for a 14-day risk-free trial with Hevo and experience a seamless data migration from Shopify to Intercom.

No-Code Data Pipeline for Shopify