Skip to main content

I have an email with a discount code that I want to send every time a customer orders a specific product.

I’ve set up a flow (see below) which works but is inconsistent.

 

 

The flow trigger works correctly when the trigger product (the ‘Gift Card’) is shown as ordered after the ‘Voucher’ product. See below:

 

“your store credit” email correctly triggered

 

The purchase order is always the same in Shopify (Voucher first, Gift Card second).

But sometimes the ‘Gift Card’ is shown as ordered before the ‘Voucher’, even though it was purchased after the ‘voucher’.

When this happens, no email is sent.

 

No “your store credit” email triggered

 

Its seems like because the orders are purchased so close together, the chronological order is sometimes incorrect and I’m not sure I’ll be able to a fix this.

But I’m confused why the email isn’t triggered when the ‘Gift Card’ is shown as purchased first. It doesn’t seem like there is anything in the flow that would prevent the email from sending?

 

 

The 2nd issue is that when the flow sends the email, customers receive the same dynamic coupon code (eg {% coupon_code ‘Discount’ %} ) each time.

Is there any logic (either in the flow, or (ideally) in the email template) to count how many times the customers has purchased the trigger product or completed the flow and display the correct coupon code eg. {% coupon_code ‘Discount_1’ %} for the first order, {% coupon_code ‘Discount_2’ %} for the 2nd order etc.

 

Hey @TheSuburbs 

Thank you so much for such great questions! 

Let’s start with your last question about the coupon codes. At this time our logic does not track how many times someone goes through the same flow or receives that unique coupon code. Once your customer receives their unique coupon code it become a profile property until it is used or expires, Only when they have used it or it expires will a new coupon code code generate if they enter the flow again. So the # of times in the flow may or may not be the same # of times they received the discount code depending on how you have your coupons set up.. 


Reply