Flow that Stops After Someone Uses Static Coupon Code - Issues

  • 26 July 2021
  • 5 replies

Userlevel 1
Badge +2

Hi there,


I’ve read the help pages on how to add additional filters to a flow so that someone who uses a static coupon code will not receive an email. However, although I have magento2, it doesn’t seem to be pulling in my coupon code correctly. 

To test that the flow would work, I attempted to create a segment of people who have used this code over all time. Although in Magento I can see that 222 people have used the code, my segment in Klaviyo says there is no one in the segment. 

I’ve attached a screenshot of my definition below. It matches my coupon code exactly. 

There is one thing -- this coupon code is generated in the “Cart Rules” section of Magento. Does that affect things?

Any help is much appreciated!

Thank you,



Best answer by Dov 27 July 2021, 17:02

View original

5 replies

Userlevel 7
Badge +61

Hello @aereid,

Thanks for sharing this with the Community.

The “Discounted” is only looking to see if someone used a coupon code in general, rather than a specific coupon code name. Can you clarify if this static code would have a unique “CartPriceRuleID”? If so, I recommend using that in the flow/segment definition instead of “Discounted” to isolate the price rule ID associated with this coupon. You can also try searching for this name under “Coupons” in the segment/flow definition.

Userlevel 1
Badge +2

Hey @Dov  --- thank you for your advice! One thing I’m struggling with is the property of “CartPriceRuleID” is not something that seems to come through in Klaviyo. Do you know how I can set this up?

Userlevel 7
Badge +61

Hi @aereid,

Thanks for the follow-up note.

If you click on the word “Discounted” in your segment definition, start typing in “Cart” and “CartPriceRuleID” will populate as one of the options. From there, find the actual Cart Price Rule ID that correlates with the static coupon code and update the segment. That should pull folks who have used that code.


Userlevel 1
Badge +2

Thanks @Dov 


For some reason, my only options for “Discounted” is “True” or “False”. I’ve been trying to solve this all morning -- I found this article, Reviewing Your Magento 2 Data – Klaviyo - Help Center, but I have the feeling something isn’t connected right. While I have 7 metrics listed in my “Analytics” tab, most of the “data available for filtering” is not data I am able to use to segment audiences in my account. 

Do you have any advice for how to check this is syncing correctly?


Thank you!

Userlevel 1
Badge +2

@Dov I’m not sure what the issue was, but I closed out and tried again and suddenly CartPriceRuleID was an option. It seems to be pulling correctly. Thank you for your help!