How to create personalized coupons

AutomateWoo can generate a unique coupon from a WooCommerce coupon template and include the code in a workflow email. For example, you can send a welcome discount that expires 14 days after it is generated.

Create a coupon template

↑ Back to top
  1. Go to Marketing > Coupons and select Add coupon.
  2. Enter a recognizable coupon code for the template, such as welcome15-template.
  3. Set the discount type, amount, and any usage restrictions you want generated coupons to inherit.
  4. Set the coupon’s visibility to Private and publish it. The template is used to create new codes; it is not the code you send to customers.

Add a generated coupon to a workflow

↑ Back to top
  1. Open or create an AutomateWoo workflow with a trigger that provides customer data, and add an Email – Send Email action.
  2. In the Variables panel, select customer.generate_coupon. If your workflow provides guest data instead, use guest.generate_coupon when available.
  3. Select the template coupon. To set an expiry relative to when each coupon is generated, enter a number of days in expires, such as 14.
  4. Select Copy to clipboard, then paste the variable into the email content where the code should appear.
  5. Finish configuring the workflow and save it.
The customer.generate_coupon variable with a coupon template and a 14-day expiration selected.
Choose a template and set how many days the generated coupon remains valid.

The variable also lets you set a code prefix and usage limit. By default, generated codes use the prefix aw- and can be used once. If you leave expires blank, the generated coupon inherits the template’s expiry date, if one is set. See AutomateWoo variables for more information.

A unique code is not automatically restricted to the recipient’s email address. Review the template’s restrictions and the generated coupon before using the workflow.

Test the workflow

↑ Back to top

Preview the email and send a test to yourself. A preview shows a placeholder, while sending a test creates a real test coupon marked [test]. Check the coupon’s discount, expiry, and restrictions, then test it at checkout. When the email and coupon work as expected, activate the workflow.

Developer resources

↑ Back to top

Questions and support

↑ Back to top

Something missing from this documentation? Still have questions and need assistance?

  • If you have a question about a specific extension or theme you’d like to purchase, contact us to get answers.
  • If you already purchased this product and need some assistance, get in touch with a Happiness Engineer via our support page and select this product’s name from the Product dropdown.

Related Products

WooCommerce Subscriptions is a WooCommerce extension that lets customers subscribe to your products or...

Offer add-ons like gift wrapping, special messages or other special options for your products.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.