Send unique discount code when specific product is purchased

Send unique discount code when specific product is purchased

raganello
Visitor
3 0 0

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 😎

Replies 6 (6)

Bundler-Manuel
Trailblazer
681 31 79

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.

Emmanuel
Please let me know if it works by marking it as a solution!
Bundler - Product Bundles app, a great bundle app for Shopify, with glowing user testimonials and a free plan.

PaulNewton
Shopify Partner
7721 678 1620

Hi @raganello 👋 if your using a service/app to send customer emails then in flow...

you probably just need two metafields setup:

  1. a metafield/metaobject that tracks the number of orders/codes-sent
  2. a metafield/metaobject that has the list of codes (as a list,array,or json) which uses each code based on #1's value(s)
  3.  

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


raganello
Visitor
3 0 0

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.

 

tobebuilds
Shopify Partner
527 39 140

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):

 

tobebuilds_0-1738068900263.png

 

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.

 

 

 

Founder, Regios Discounts app (4.8 stars, 81 reviews, Built for Shopify)
- Custom discounts made simple
- "Just about any discount you'll ever need"
- Built by an ex-Google software engineer
raganello
Visitor
3 0 0

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!

tobebuilds
Shopify Partner
527 39 140

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

Founder, Regios Discounts app (4.8 stars, 81 reviews, Built for Shopify)
- Custom discounts made simple
- "Just about any discount you'll ever need"
- Built by an ex-Google software engineer