All things Shopify and commerce
Hi everyone,
I’m trying to set up an automation (which I thought would be straightforward) to achieve the following:
Whenever a customer purchases a specific product, they should automatically receive an email with a unique discount code that can only be used once.
The idea is that this process should repeat every time the product is purchased (even by the same customer), and each code needs to be unique.
I’m currently using Shopify Flow and have generated a batch of unique codes using the Bulk Discount Code Bot app, but I can’t seem to find a way to fully automate the process—such as assigning a unique code dynamically and sending it via email.
Has anyone successfully set this up? Are there apps or workflows that can handle this without manual intervention?
Thanks so much for your insights and help!
Best to you all 😎
Hello there @raganello I suggest you have a look at this article here https://docs.couponcarrier.io/article/90-how-to-deliver-a-unique-code-when-someone-purchases-a-produ... and it should help you in generating the automated discount codes you’re seeking out.
Hi @raganello 👋 if your using a service/app to send customer emails then in flow...
you probably just need two metafields setup:
If your currently not able to send emails to customers an app is needed to bridge that gap
possibly either shopify-email , or an use automation app like mechainic to make something bespoke e.g. https://tasks.mechanic.dev/?q=send%20discount%20code & https://tasks.mechanic.dev/?q=email%20customer
If you need this process setup then contact me for services.
Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
Hi everyone,
Thank you so much for your suggestions—I really appreciate them!
In the meantime, I came up with a slightly different approach. By leveraging flows, tags, and Shopify's email system, I believe I can set it up so the discount is applied automatically, without the need for a discount code. This way, when a user makes a purchase, the discount will automatically apply to their next purchase.
It seems much easier to implement this way.
Hi Raganello, nice job! This is a very wise approach. You'll also be able to have only one discount setup, which is way easier to manage than having many discount codes auto-generated.
Here's a question for you: How are you going to ensure the discount only applies to the next purchase? Automatic discounts don't have the "Once per customer" setting that discount codes do. You might not want the customer to get a discount on every following purchase after buying the trigger item.
If you're not already doing this, I recommend automatically removing the tag from a customer's account once they have used the discount. I have written a tutorial (with video) about this in the past. You can do this with Shopify Flow (screenshot attached):
In short, you'll want to hook into when an order is paid, then check the title of every discount applied to the order. If the title matches your discount, remove the tag. This setup will help prevent potential abuse of your offer.
Hope this helps,
Tobe Osakwe
Founder, Regios Technologies, Inc.
Hi there!
That is exactly what I was aiming to do, so thank you so much for your reply. I’m going to run some tests soon and will publish my solution to share it with anyone else who might be looking for it.
Thanks again!
You're welcome! This is a common question we get from users of Regios Discounts (4.8 stars, 79 reviews, Built for Shopify), so common, that it made sense for me to create a dedicated tutorial. So, I figured it could save you some time getting your offer set up, even if you're not using our app.
If you are ever on the lookout for a discount app, however, I'm here to help.
Best,
Tobe
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025