How it works

Follow these 8 simple steps to send unique discount codes to new Shopify customers automatically

Shopify logo icon

Customer Created

This trigger captures new customer signups the moment accounts are created, enabling immediate discount delivery that capitalizes on peak engagement and conversion intent.
When a new customer account is created in Shopify, this trigger activates the workflow and captures customer details including {{shopify.id}}, {{shopify.phone}}, and {{shopify.email}}. The workflow runs for every new customer created in your store, whether they sign up during checkout or create an account independently.
Time to complete: Auto-configured (0 minutes)

Create Price Rule

Establishes the discount parameters and customer-specific restrictions that ensure each code is unique, single-use, and valid only for the intended recipient, preventing code sharing abuse.
This step creates a Shopify price rule with the title "NEWCUSTOMER {{shopify.id}} {{now | date}}" to ensure uniqueness. The rule is configured with several customizable fields: the discount value (default -20 for 20% off), value_type (percentage or fixed_amount), and ends_at date (default 14 days from creation). The rule is restricted to {{shopify.id}} via prerequisite_customer_ids, making it work only for this specific customer. It's set to once_per_customer to prevent multiple uses and includes a minimum subtotal requirement of $1.0. The created price rule ID is stored as {{shopify_1.id}} for use in subsequent steps.
Time to complete: 3 minutes

Retrieve Price Rule

Fetches the complete price rule details after creation to ensure all parameters were set correctly before generating the discount code, preventing errors in the code creation process.
This step retrieves the full price rule record using {{shopify_1.id}} from the previous step. It confirms the price rule was created successfully and retrieves all its details, storing them as {{shopify_2}}. This verification step ensures data integrity before proceeding to create the actual discount code that customers will use at checkout.
Time to complete: Auto-configured (0 minutes)

Create Price Rule Discount Code

Generates the actual customer-facing discount code that combines uniqueness with memorability, making it easy for customers to use while ensuring it can't be shared or exploited.
This step creates the discount code attached to the price rule using {{shopify_2.id}}. The code format is "NEWCUSTOMER{{shopify.id}}" which creates a unique code like "NEWCUSTOMER123456789" based on the customer's ID. This format ensures every customer gets a distinct code while maintaining a consistent, recognizable prefix. The generated code is stored as {{shopify_3.code}} for use in tagging and messaging steps. You can customize the code format by editing the body.code field—for example, changing it to "WELCOME{{shopify.id}}" or any other prefix you prefer.
Time to complete: 2 minutes

Customer Add Tag

Tags the customer profile with their unique discount code, creating an easily searchable reference for customer service and enabling segmentation of customers who received welcome offers.
This step adds the discount code from {{shopify_3.code}} as a tag to the customer's Shopify profile using {{shopify.id}} as the customer identifier. The tag appears in the customer's admin profile under Tags, making it simple for your team to reference the code if the customer has questions or needs assistance. This also enables filtering and segmentation based on who received discount codes.
Time to complete: Auto-configured (0 minutes)

Retrieve Shop

Fetches your store name to personalize the SMS message, making the communication feel more authentic and branded rather than generic or automated.
This step retrieves your Shopify store information, specifically {{shopify_5.name}}, which contains your store's name as configured in Shopify settings. This store name is used in the SMS message to personalize the greeting and maintain consistent brand messaging.
Time to complete: Auto-configured (0 minutes)

Filter (Phone Number Check)

Acts as a safety check that only allows SMS sending when customers provided phone numbers during signup, preventing workflow errors from attempting to send messages to empty phone fields.
This filter step checks if {{shopify.phone}} is not empty before proceeding to send the SMS. If the customer provided a phone number during account creation, the workflow continues to the SMS step. If no phone number exists, the workflow stops here—the discount code is still created and tagged, but no SMS is sent. This prevents errors and ensures the workflow doesn't fail when customers sign up without phone numbers.
Time to complete: Auto-configured (0 minutes)
sms icon

Send Message

Delivers the unique discount code directly to the customer's phone with clear instructions, maximizing the likelihood they'll use it for their first purchase while the signup intent is fresh.
This step sends an SMS to {{shopify.phone}} containing a personalized message with your store name ({{shopify_5.name}}) and the unique discount code ({{shopify_3.code}}). The default message is "Thank you for shopping with [Store Name]. Take 20% off your next order. Use online code: [CODE]"—you should customize this message to match your discount amount if you changed it from 20%, and adjust the tone to fit your brand voice. Keep messages under 160 characters when possible to ensure single-segment delivery and lower costs.
Time to complete: 3 minutes

Make it your own

Customize this workflow even further:

Send email instead of or in addition to SMS
Add an email step after the discount code creation to send a branded HTML email with the discount code, especially useful for customers who don't provide phone numbers or for markets where email is preferred.
Vary discount amounts based on customer source
Add conditional paths that check where the customer came from (using UTM parameters or referral sources) and create different discount amounts for social media signups versus organic signups.
Set minimum purchase thresholds
Modify the price rule's prerequisite_subtotal_range to require a higher minimum purchase (like $50 instead of $1) to protect margins while still incentivizing meaningful first orders.
Create urgency with shorter expiration windows
Change the ends_at date from 14 days to 48 or 72 hours to create stronger urgency and drive faster conversion while signup excitement is highest.

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.
What is a template?
Templates are pre-made workflows by our team of experts. Instead of building a workflow from scratch, these have all the steps needed to complete the task.
Can I personalize a template?
Yes! Every step can be customized to meet your exact requirements. Additionally, you can even add more steps and make it more sophisticated.
Are templates free?
Yes! Our entire library containing hundreds of templates are free to use and customize to your exact needs.

Ready to send unique discount codes to new Shopify customers automatically?

Join thousands who've automated their work and saved an average of 3.5 hours every week.

Use this template — It's free
7-day free trial • 13 min setup • Cancel anytime