If you're using a Shopify store connected to Dotdigital with our Shopify connector, you can create individual and one-time use dynamic coupon codes to send to your contacts in email campaigns.
Shopify API rate limits
Please be mindful of your Shopify API rate limit. API calls are made to obtain the coupon code. Sends can become cancelled if the limit is exceeded. Consider throttling your sends.
Learn more in Shopify API rate limits and Throttle the sending of an email campaign.
Before you start
Things you need to know:
You must have a Shopify store connected to Dotdigital using our Shopify connector.
You need to create or edit a campaign in Dotdigital to add the coupon code block.
There's a Shopify limit of 20 million unique coupon codes for each store, and every coupon code sent in a campaign deducts from this quota. If you reach this limit, and want to create more, you must delete coupon codes from your Shopify admin.
Learn more in the Shopify article Considerations for creating discount codes.
Add Shopify coupon codes to an email campaign
Go to Campaigns > Email, and then either select NEW CAMPAIGN to start a new campaign, or select an existing campaign to edit it.
You can also use the Quick create icon to jump straight to creating a new campaign.
In EasyEditor, drag the Coupon code block onto your campaign canvas. You can find the Coupon code block under the Ecommerce header of the EasyEditor building blocks.
Select the Coupon code block to open the Edit coupon code side panel.
In the Coupon prefix field, enter some text to personalise your coupon. For example, SUMMER2020, SAVE10, or BLACKFRIDAY.
Expand the Discount type drop-down menu and choose from:
Percentage - a given percentage of the order cost
Fixed amount - a static monetary amount
Free shipping - remove cost of shipping from the order total
In the Amount field, enter the amount of discount you want to give. For example, if you selected Percentage for the Discount type, you might enter 20 to add a 20% discount to the coupon. If you selected Fixed amount for the Discount type, an Amount of 20 would give a £20 discount (in the applicable currency for your account).
If you want the coupon code to only work on orders above a certain cost, enter a minimum value amount in the Minimum order value box. Enter 0 if you don’t want to use a minimum order value.
To make the coupon only valid for certain product collections, enter the collection ID into the Eligible collections box. To add multiple collections, separate the IDs using commas (,). To find the collection ID in your Shopify admin, go to Product > Collections and select the collection you want to use. You can find the ID at the end of the URL in the address bar.
To set an expiry time for your coupon, enter a number in days into the Expires after (days) field. By default, this is set to 30 days.
Select APPLY.
You’ve now finished setting up the dynamic coupon code in your email campaign. Once you complete and send your campaign, all your contacts receive a unique coupon code in their email.
You can’t preview a dynamic coupon code
When previewing or testing the campaign, you only see a placeholder for the campaign and the unique code is not entered. This is because coupon codes are generated and inserted only when sending a real campaign.