Solved

Hide block if someone purchased a certain item

  • 21 July 2021
  • 3 replies
  • 235 views

Badge +2

I’m trying to build an upsell block for a Placed Order triggered post purchase email. I want the block NOT to show if they purchased this particular item, and SHOW if they did not purchase this item. This is what I tried and it doesn’t seem to be working. Please help! Thanks!

 

icon

Best answer by Dov 21 July 2021, 21:30

View original

3 replies

Userlevel 7
Badge +61

Hi @KristaJoy,

Thanks for your reply.

You can use “and” or “or” conditions to add multiples rules to the conditional hide/show statement. If you use “and”, you will require that the user meets both criteria. For example, using “HOUSE” as another collection:

not "PONYTALE" in event.Collections and not "HOUSE" in event.Collections
Badge +2

Thanks @dov.derin that did the trick! Now, how would you go about adding multiple rules? Say exclusing another collection?

Userlevel 7
Badge +61

Hi @KristaJoy,

Thanks for sharing this with the Klaviyo Community.

You’ll need to use the syntax for event variables using the hide/show feature. Using your example, with the collection name of PONYTALE. You’d want the statement to look like the following:

not "PONYTALE" in event.Collections

This will only display the block if PONYTALE is not a part of the collection(s) they purchased. If it is part of the collection they purchased, the block will hide.

Reply