Dynamic content: Coupon codes - Magento 2


Setting up coupon codes


Using our coupon codes external dynamic content URL allows you to include unique, single-use coupon codes within any email you want to.

This will allow you to incentivise your contacts with coupon codes without the risk of the codes being shared and abused.

Setting up coupon codes

Firstly you need to create a valid shopping cart price rule in Magento. This can be found in Marketing > Cart Price Rules (under ‘Promotions’).

When creating a new rule, you need to ensure you select that a specific coupon must be used and you want to use auto generation.


Once this is done and you have set up the rule, including the conditions and actions if required, you need to save the rule and then copy its ID. This can be found in Marketing > Cart Price Rules (under ‘Promotions’):


You can then insert the coupon code URL we provide (which is found by going to STORES > Configuration > ENGAGEMENT CLOUD > Dynamic Content) into your Engagement Cloud campaign and replace the part of the URL that says [INSERT ID HERE] with the ID you copied.

You can also set an expiry for the coupon in the URL. This is done by replacing the part of the URL that says [INSERT NUMBER OF DAYS HERE] with a number. Therefore, if you enter the number 30 there, then the coupon code will expire after 30 days and will no longer work if used during checkout after that time. To create a coupon code that doesn't expire, enter 0 days.


The countdown to expiry starts when Magento generates the coupon code. This happens as soon as you send the campaign.


What does the format of the coupon codes look like and can it be changed?

The coupon codes we generate are always in the format of DOT-AAA-AAA-AAA.  The format including the prefix (DOT) can't be changed at this time.

Can I alter the font and style of the coupon codes you generate?

You certainly can - find out more about styling options.

Have more questions? Submit a request