Skip to main content
Solved

Show/Hide Syntax Based on Item Purchased

  • September 7, 2022
  • 1 reply
  • 184 views

Forum|alt.badge.img+2

Hello,

I’m updating our “Order Confirmation” transactional email in Klaviyo and need help building a dynamic content block that only appears when someone has purchased a specific item in their order. What syntax am I supposed to use? 

Use case: Someone purchases our Match Beauty Bundle Subscription and we want to display a disclaimer that tells them that the price will decrease during their second month. 

Thanks in advance! 

John

Best answer by Dov

Hi @John Parker,

Thanks for sharing this question with our community.

You’ll want to use the item name i.e. Match Beauty Bundle Subscription followed by “in” and then the tag that represents the item array in the template.

So the tag will look something like this:

"NAME OF ITEM" in event.Items

You can find out the tag that represents the item array in the template by clicking on the name of the item in the Preview mode in the editor. That will read event.Items or something similar. We have an article on this here.

There’s an example of this in the community thread below using Collections - the same principle applies for item name:

I hope that’s helpful.

View original
Did this topic or the replies in the thread help you find an answer to your question?

1 reply

Dov
Forum|alt.badge.img+61
  • Klaviyo Alum
  • 1493 replies
  • Answer
  • September 8, 2022

Hi @John Parker,

Thanks for sharing this question with our community.

You’ll want to use the item name i.e. Match Beauty Bundle Subscription followed by “in” and then the tag that represents the item array in the template.

So the tag will look something like this:

"NAME OF ITEM" in event.Items

You can find out the tag that represents the item array in the template by clicking on the name of the item in the Preview mode in the editor. That will read event.Items or something similar. We have an article on this here.

There’s an example of this in the community thread below using Collections - the same principle applies for item name:

I hope that’s helpful.