Automate Shopify-Zendesk customer data sync: A step-by-step guide with Cloudhooks
Transform manual customer updates into a seamless automated flow between Shopify and Zendesk in just 30 minutes, ensuring your support team always has the latest data.
While Zendesk offers powerful customer support features, keeping information synchronized across both platforms can be challenging without the right automation tools. By combining Zendesk with Cloudhooks, you can create automated workflows that keep customer data perfectly synchronized.
Time to complete: ~30 minutes Difficulty level: Intermediate
What you’ll build
In this tutorial, you'll create an automation that:
Monitors your Shopify store for customer profile updates
Automatically updates or creates corresponding user profiles in Zendesk
Maintains custom field mappings for Shopify-specific data
Prerequisites:
A Shopify store with Cloudhooks installed
Access to both Shopify and Zendesk admin panels
Basic understanding of API authentication
While this tutorial demonstrates a basic implementation, you can extend it with custom business logic to transform and map data according to your specific needs.
Configure user fields
Zendesk includes basic user fields by default (name, email, phone), but its flexible custom fields system allows you to store additional Shopify-specific data. We'll create custom fields to store important customer information from your Shopify store.
First, let's set up the necessary custom fields in Zendesk:
3) Enable token access (preferred over username/password)
4) Click "Add API token":
5) In the token creation pane:
Give your token a descriptive name (e.g., "Cloudhooks Integration")
Click "Copy" to save the token
Store the token securely (it won't be shown again)
⚠️ Security note: Store your API token in a secure password manager. If your token is ever compromised, generate a new one immediately and update your hook configuration.
Set up Cloudhooks
Prepare your API credentials
Zendesk's API uses HTTP Basic authentication, requiring a base64-encoded credential string. Let's prepare this string for our hook:
1) Create your authentication string in this format:
your.user@example.com/token:YOUR_API_TOKEN
2) Encode this string using base64:
For macOS/Linux Run the following command in the terminal:
💡 Tip: Replace your.email@example.com with the email address associated with your Zendesk user.
Save the resulting encoded string—you'll need it when configuring the hook.
Determine the Zendesk subdomain
Your Zendesk instance has a unique subdomain (e.g., mystore.zendesk.com). You'll need this subdomain for the hook configuration:
Note the subdomain portion of your Zendesk URL
Save it without the .zendesk.com par
Configure the hook
1) From your Cloudhooks dashboard, click "Create hook":
2) In the "Trigger" tab:
Select "A customer is updated" as your trigger event
This event fires for both new and existing customer updates
Click "Select trigger" to confirm:
3) Navigate to the "Hook" tab and add your code:
Copy the template code from the end of this article
Update the configuration constants at the beginning of the code with your credentials:
const API_TOKEN = 'YOUR_API_TOKEN';
const ZENDESK_SUBDOMAIN = 'YOUR_ZENDESK_SUBDOMAIN';
// Hook business logic starts here
4) Configure hook settings:
Go to the "Settings" tab
Set name: "Sync Shopify customers to Zendesk"
Enable the hook by toggling "Status" to "Active"
Click "Save"
💡 Best Practice: Choose descriptive names that clearly indicate both the trigger event and the action being performed.
5) Verify activation:
Return to the dashboard
Confirm the hook shows as "Active"
Testing your integration
Before deploying to production, it's crucial to thoroughly test your integration. We'll explore two testing methods to ensure everything works as expected.
Method 1: Test payload simulation
This approach lets you test the integration without modifying real customer data in Shopify:
1) Open your hook configuration and go to the "Hook" tab
2) Locate the test payload panel on the right
3) Modify the following properties of the test data:
⚠️ Important: Always test in a development environment first before enabling the hook in production.
Hook code
Below is the complete hook code that synchronizes customer data between Shopify and Zendesk. Copy this code into your hook's code editor and update the configuration constants with your values: