Show/Hide Text Block in an email using Show/Hide Logic (new editor)

  • 2 March 2022
  • 6 replies


I want to include variable data (just a block of text) in a post-purchase flow.

eg, If a customer has purchase certain items, I want to show relevant data. Instructions, directions, extra info, etc. 


I found the Show/Hide logic feature, but it’s just a text-input line. 

I would’ve expected a drop-down showing all of the available variables/syntax and options. I’m really surprised that it’s this open-ended.


Is there a list somewhere of possible variables that I can copy/paste in to ensure that the logic string is entered correctly? 


All of the instructions I can find for this are the older editor, too - and none are for this specific use case. 



Best answer by matt.steinruck 2 March 2022, 23:12

View original

6 replies


Found this!


I see that when you do a Preview of the email itself, all of the personalization variables show up. 


So, if I want this block to only show up for people who have purchased this product, I can paste in 

{{ event.ProductID }} == 7141931974827

in the logic box. 


That is helpful. 


So, actually - Syntax questions:

  • Are there spaces around the == ?
  • Are there quotes around the product ID?
  • Does a comma seperator work for multiple IDs? 
  • Space after the comma?

{{ event.ProductID }} == 6093805486251, 6550791749803   


Is that correct?


Apparently that’s not it - I keep getting this error. 

I’ve tried it a bunch of ways. 

Help, still?



Correct syntax is:


event|lookup:'ProductID' = 6093805486251 or event|lookup:'ProductID' = 6550791749803

Userlevel 7
Badge +48

Hello @matt.steinruck,

Glad to hear you were able to come up with the correct show/hide condition yourself! 

I mention this a lot, but I’m a huge fan of @retention’s How To Set Show/Hide Blocks Based On A Custom Profile Property blog and guidance he offered in the Community post below: 

You’re absolutely correct that through previewing the email, you can reference a list of all the variables that were synced from the event you want to referencing. This is also mentioned in the Show/Hide Conditions and Event Data section of the How to Show or Hide Template Blocks Based on Dynamic Variables Help Center article. 

Thanks for being a part of the Klaviyo Community! I’m sure other members who may be having the same questions will find your comments and solution helpful!



Thanks David - very helpful - I will read up on that, too. 


(In fairness, I had some help to come up with the right syntax here - it was a bit of a trial and error with support as well, but we got it, and Im excited that it’s working!)