Conditional Visibility based on products ordered

  • 30 May 2023
  • 2 replies

Badge +1



I’ve been stuck on this for a few hours — I’m looking for ways to show custom content blocks based on products recently purchased.


Each content block links to a “How to use PRODUCT” article on the website.


Therefore, if customer purchases a product that contains the word “Spray” in the title, they get shown the relevant content block which links to the correct article.


Here’s the formats I’ve tried:

‘Spray’ in event.Items
"Spray" in sellers

'Spray' in event|lookup:Items
"SPRAY" in event.ITEMS
{{ event.Items|default:Stick }}
'Spray' in person|lookup:Item



Best answer by stephen.trumble 31 May 2023, 18:24

View original

2 replies

Userlevel 7
Badge +60

Hey @Lucasusername 

Welcome to the community and congrats on your first post!

If you have a specific product you want it to look for, you can manually apply a custom property to the profiles. What you can do is, set up a segment that is like this:

What someone has done > ordered product > at least once over all time > where SKU equals > 'SKU'

You don't have to use SKU, you can use other identifier in that section of the segment as well to target the specific product. 

Then, you can set up a segment triggered flow, and in that flow, use an update property action step, to update the property of everyone with a specific custom property. 


Then, you can use this property to show/hide specific content in your placed order email. You can set up the conditional logic like this - 

person|lookup:'NewProperty' == 'NewPropertyValue'

I know this is a bit detailed and long, but wanted to provide the work around for you that way you didn't have to export then import the profiles but instead can use our flows to set that custom property in the profile data to use. Now, this would only be used if you wanted to show/hide based on past purchases. 

If you just wanted to show/hide a block based on the order that triggered them into the flow, we can do that, by using the event data. This guide has more details on that as well - - this community post also goes through this in more detail -

Hope this helps!

Badge +1

Hi @stephen.trumble, thanks for this!


I followed your instructions and it seems to be working.


Can it only add in 1 custom property at a time? With the current setup, that property gets overridden for each product: