Create Unique Discount Codes for New Shopify Customers
Build customer loyalty and boost repeat sales with automated discount codes for new Shopify customers. This MESA workflow generates a unique 20% off code for first-time buyers and sends it via SMS, valid for 14 days. Welcoming new customers with a tailored incentive helps boost conversions and keeps them coming back to your store.
Trusted by 1,000+ Shopify merchants — from solo operators to scaling brands.

How it works
8 steps to send unique discount codes to new Shopify 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 Shop
Retrieve Shop
Filter (Phone Number Check)
Filter (Phone Number Check)
Send Message
Send Message
Ready to send unique discount codes to new Shopify customers automatically
Get setup in 13 minutes.
Frequently asked questions
What happens if a customer signs up without a phone number?
The discount code is still created and tagged to their customer profile, but no SMS is sent. The filter step prevents the workflow from failing when phone numbers are missing. Consider adding an email step as a fallback to ensure all customers receive their codes regardless of whether they provided phone numbers.
Can customers share these codes with others?
No, the price rule is restricted to the specific customer ID via prerequisite_customer_ids, so the code will only work when that exact customer uses it at checkout. If someone else tries to use the code, Shopify will reject it as invalid for that customer.
How do I change the discount from 20% to a fixed dollar amount?
In the "Create Price Rule" step, change the value field from -20 to your desired dollar amount (like -10 for $10 off), and change the value_type field from "percentage" to "fixed_amount". Don't forget to update the SMS message to reflect the new discount type and amount.
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 send unique discount codes to new Shopify customers automatically?
7-day free trial • 13 min setup • Cancel anytime
Need help? Our automation experts will help you personalize this workflow for free. Contact support