Generate Unique Discount Codes for New Shopify Customers on Specific Products
Drive repeat purchases by offering new customers a unique discount code for a specific product. This MESA workflow template automatically generates a 20% off discount code when a new customer is created in Shopify, sending it to them via SMS for use within 14 days. Customize the discount and target product to create urgency and turn first-time buyers into loyal customers, enhancing customer retention and driving future sales.
Trusted by 1,000+ Shopify merchants — from solo operators to scaling brands.

How it works
9 steps to start generating unique product discount codes for new customers automatically
Customer Created
Customer Created
Create Price Rule
Create Price Rule
Retrieve Price Rule
Retrieve Price Rule
Create Price Rule Discount Code
Create Price Rule Discount Code
Customer Add Tag
Customer Add Tag
Retrieve Product
Retrieve Product
Retrieve Shop
Retrieve Shop
Filter: Phone Number Check
Filter: Phone Number Check
Send Message
Send Message
Ready to start generating unique product discount codes for new customers automatically
Get setup in 17 minutes.
Frequently asked questions
Can customers share their discount codes?
No, the price rule is restricted to the specific customer's ID (prerequisite_customer_ids). Even if someone else obtains the code, it won't work for them. Only the customer who received it can use it.
What happens if a customer creates an account but doesn't provide a phone number?
They still receive the discount code and customer tag, they just won't get the SMS notification. Consider adding an email step to notify customers without phone numbers, or display the code on the post-signup page.
Can I change which product the discount applies to without recreating the workflow?
You'll need to update the configuration in the "Create Price Rule" step. Edit the entitled_product_ids field with the new product ID, and update the SMS message to reference the new product name.
Make this template your own!
Customize this workflow even further:
You're in good company
"MESA has been a game changer for us. And, if you ever get stuck, their support team is always super helpful."
"It's like Zapier but exactly designed for Shopify. I have been able to complete all the workflows that I've needed."
"The MESA team has been amazing at helping us set up our automations. We would highly recommend this app!"
Ready to start generating unique product discount codes for new customers automatically?
7-day free trial • 17 min setup • Cancel anytime
Need help? Our automation experts will help you personalize this workflow for free. Contact support