The Shopify integration allows you to connect your Shopify store to your Cordial account for seamless exporting of customer, product and order data.
Cordial's redesigned Shopify app delivers numerous infrastructure improvements targeted at app performance, stability and availability. This update includes support for AJAX cart calls and the ability to customize Cordial attributes to match default Shopify data fields.
Once the integration is set up, attributes mapped and data synchronized, you will be able to build audiences, trigger messages and personalize message content based on products, customers and order data from your Shopify account.
Install and Setup
Install the Cordial App in Your Shopify Account
- Navigate to https://shopify-integration.cordial.com and enter your Shopify shop URL to install the Cordial app.
- Give permission to install the app in your account.
Enter your API Key and Account Key
- In your Cordial account, create a new API key for the catch-all IP address 0.0.0.0/0. Learn how to generate an API key.
- On the Cordial Administration page in Shopify, enter your API key and click the Test button to check the API connection in your Cordial account.
- Enter your Cordial Account Key. You can find your Account Key on the Account Settings page in the Cordial platform.
- Click Save.
|Custom Event Name||Related Properties|
|browse||url, source, product, category|
|cart||url, source, page|
Custom events (browse, cart, and order) can not be renamed.
t.src value to replace the default track.cordial.io entries. This will ensure that all relevant events are being tracked including order revenue attribution.
Congratulations, your Shopify account is now connected to Cordial! Continue reading below to learn how to map contact attributes and synchronize product, customer and order data.
Map Attributes to Cordial
Once the Cordial app is connected to your account, you can start mapping Shopify customer fields to your contact attributes in Cordial.
Order and product attributes that are unique to Shopify and do not exist in Cordial will be stored as additional properties of the respective Cordial order or product data collections.
- Navigate to the attribute mapping page by choosing Key Mapping from the Main Menu dropdown in the top right of the Cordial Administration page.
- On the Attribute Mapping page, choose a field you wish to map from the dropdown menu. The selected field will automatically be added to the top of the existing list of keys.
- You can select an existing attribute from the drop-down menu or type in a new Cordial attribute to be added to contact attributes collection when mapping is saved.
- You can Test your key mappings to check for errors.
- Once all Shopify customer fields are mapped to their corresponding Cordial contact attributes, click Save. Existing contact attributes will then be mapped and any new contact attributes will be added to your Cordial account.
Note: The Reset to Default Mappings button will reset all key mappings for first name, email and subscribed status fields to their defaults values.
Map to Array Attributes in Cordial
You can map Shopify customer fields to array type contact attributes in Cordial using the
split(,) array modifier.
For example, to map the Shopify customer tags field to the Cordial tags contact attribute, use
tags|split(,) within the Shopify key mapping field. Shopify customer tags will be inserted as an array into the Cordial tags contact attribute.
Synchronize Product, Customer, and Order Data
When synchronizing data from Shopify to Cordial, there are two options: manual synchronization and automated recurring synchronization. Normally, you would use the manual method to perform a one-time syncchronization of historical data, and then set a recurring schedule for all future automated data posts. Note that these data synchronizations use API calls to post data.
Synchronization is a One-Way Post
Note that synchronization is a one-way post of contact, product and order data. Data is posted from Shopify to Cordial and not in reverse. For example, if a contact attribute is updated in Cordial (i.e. first name), it will not be updated in Shopify.
Synchronizing Subscribe Status
The synchronization of subscribe status changes depending on the contact's status in Cordial. Shopify key for email subscribe status is
accepts_marketing: yes/no, which is mapped to Cordial's email subscribe status key of
The table below displays how subscribe status is updated after synchronization:
|Contact exists in Cordial||Subscribe Status in Cordial||Subscribe Status in Shopify||Subscribe Status in Cordial After Synchronization|
|No||N/A||Accepts email marketing||Subscribed|
|No||N/A||Does not accept email marketing||None|
|Yes||None||Accepts email marketing||Subscribed|
|Yes||Subscribed||Does not accept email marketing||Subscribed (Subscribe status is not overwritten)|
|Yes||Unsubscribed||Accepts email marketing||Unsubscribed (Subscribe status is not overwritten)|
Note above that if a contact has unsubscribed from receiving promotional emails in Cordial, it is not possible to change the subscribe status to subscribed as a result of a Shopify synchronization. Also, if a contact is subscribed in Cordial, it is not possible to change subscribe status to none as a result of a Shopify synchronization.
Manually Synchronize Historical Data
After mapping attributes to your Cordial account, you should synchronize all desired historical data from Shopify. This will ensure that your Cordial account is up to date with product, customer and order data from your Shopify account.
Navigate to the Cordial Admin page from the Main Menu dropdown.
On the Cordial Administration page, locate the Jobs section and click Run Now for the desired data collections under the Sync All heading. Doing so will synchronize all historical data in the selected collection, regardless of creation date.
Automatically Synchronize Data on a Recurring Schedule
Once you have manually synchronized your data, you can set a recurring interval to automatically synchronize any new and updated data moving forward.
In the Jobs section of the main Cordial Administration page, enter the recurring synchronization interval in minutes (2 minute minimum) for each data collection and click Enable. To disable a running synchronization, click the corresponding Enabled button.
Check For Synchronization Errors
API call errors can cause data not to post successfully to your Cordial account. Navigate to the Job Logs page where API errors will be listed, along with past synchronization jobs.
The Job Logs page will list the last 100 jobs. Use the Refresh button in case your recent jobs are not listed immediately.
Congratulations! Your Shopify account is now configured and synchronized with your Cordial account. You'll now be able to build audiences and trigger messages based on data collected from your Shopify store.