Using coupon codes generated by an external dynamic content URL lets you include unique, single-use coupon codes within your email campaigns. It’s a great way to incentivise your contacts to shop on your Adobe Commerce (previously Magento 2) store with coupon codes, without the risk of the codes being shared and abused.
Before you start
Things you need to know:
We advise you only use external dynamic content coupon codes in triggered campaigns with low concurrent sends, such as welcome campaigns.
1. Set up Cart price rules
First you need to set up cart price rules for your coupon code:
In your Adobe Commerce account, go to Marketing > Cart Price Rules, then select Add New Rule.
Under Rule information, enter a Rule name and Description for your rule.
Switch the Active toggle to Yes.
For Websites, choose the websites you want this code to be valid on.
For Customer Groups, choose the customer groups you want to be able to use this code.
Expand the Coupon drop-down menu, then select Specific Coupon.
For Coupon code, select the Use Auto Generation checkbox.
For Uses per Coupon and Uses per Customer, enter 1.
If you have a promotion with a specific end date, choose a From and To date for your code.
If you want the code to expire after so many days, leave this blank, and we can set an expiry later.
Select Save and Continue Edit.
2. Generate a Dotdigital Coupon URL
Next, you generate your coupon code URL to use in your campaign as external dynamic content. You must generate your Coupon code URL in one step. Saving at this point won't save any of your details.
To generate a coupon code URL:
Under Cart price rules, select the rule you created in Step 1.
Expand the Dotdigital Coupon URL Builder settings menu.
Expand the Code Format drop-down menu, then choose Alphanumeric, Alphabetical, or Numeric.
If you want, enter a Code Prefix or Code Suffix.
If you want your code to expire, for Expires After (days), enter the number of days you want your code to expire after.
Expand the Allow Resend drop-down menu, then choose Yes or No.
Yes - allows a Resend using the same code.
No - Generates a new code with a Resend.
If you selected Yes in the previous step, expand the Cancel Send if Used drop-down menu, then choose Yes or No.
Yes - Cancels the send if the coupon code has been used, or regenerates a code if it has expired.
No - The latest generated coupon code is displayed.
Leave your browser tab open and do not Save at this point, or you will lose your settings.
In the Coupon Codes URL box, select the URL to copy it to your clipboard.
Paste and store the URL in notepad or a similar application as you need it in the next step.
3. Add a dynamic coupon code to an email campaign
To add an external dynamic coupon code to your email campaign:
In your Dotdigital account, go to Campaigns > Email.
Edit an existing campaign or create a new campaign.
Learn how in Create, edit, test, and send an email campaign.
In EasyEditor, from the Build > Building blocks > Tools menu, drag the External dynamic content block onto the EasyEditor canvas.
Select the External dynamic content block to open the left-side settings.
For Name, enter a name for the block.
For Address, paste the Coupon Code's URL you generated and copied earlier.
Finish editing your campaign and save ready for sending.
Style your coupon codes
You can customise the font and style of the coupon codes you generate.
4. Test send
We advise you send your dynamic coupon code email to yourself or other members of your team before sending it to your contacts.