How to add automatically unique coupon to order email

NFL

New Member
Hi,

I’m looking for a solution to add unique coupon code to the order email, so my customers will automatically get an unique personal coupon for the next order after they purchased.

I hope someone can help me with this.

Thank you!
 

Mrbb922

Member
First create your coupon and code. Second go to your woocommerce setting > emails > and choose either the 'Processing Order' (its sent before the item has shipped while processing payment) or the "Completed Order' (lets customers know the order has been completed and has started shipping) or customer invoice (manually sent <-- probably the one I would use since it can provide tracking information as well) > click manage >'Email Heading' you can add a line after the default (<-- I would change that to also include available placeholders) > Click save.

Your coupon code will be sent to anyone who has completed payment processing and receive the code along with shipment information and order completion confirmation. That being said, make sure your coupon doesn't have an expire date, or use limit other than on 'user per user'.

That's about the only way I would know how to do it. But in reality its going to depend on really how you have things set up. Are you using SMTP service (ex: pepipost, sendinblue, mailchimp, ect)? If so you will most likely have to edit the templates on those services as well / instead.
 
Last edited:

NFL

New Member
Hi,

Thank you for your respond. I am using SMTP. I would like to send my customers a unique code, so each customer a different code. Do you know if that is possible?
 

Mrbb922

Member
So you want to generate a different coupon code for every transaction and then update your templates to insert that code for every order confirmation email? Sorry I don't know how to go about that other than doing it manually each time. Using 1 coupon code would be simple enough as mentioned above but different coupon generation along with inserting it to email notifications automatically is out my reach lol.
 

RexS

New Member
If your reason for having unique codes is to limit the number of times the customer can use the code, then you can set that when you create the coupon. Just set the user limit to 1. That way you don't have to have unique codes for each customer. 1546842377303.png
 
Top