Skip to main content
Question

how/Hide Logic: Apply a filter on Dynamic Block (placed order) to only show products that were from a specific category

  • May 27, 2026
  • 6 replies
  • 64 views

Forum|alt.badge.img+6

I want to create a Product recommendation flow as follows:
Set-up: Client places order - wait 1 year.
If order included product from category X, send her email.
Within that email : “Because you liked X “ (the product she bought) > show item
Follow below with: “We think you’ll love these:” (similar products from new collection)

Question: If client bought items from category X, Y and Z, how can I apply a filter so that I only show the product(s) from Category X that she bought and exclude products from other categories?

Example: She bought a bikini and a one-piece swimsuit, but I only want to recommend new one-piece swimsuits based on her previous purchase. I’ll send her a separate email for bikinis later… I need to only show the one-piece(s) that she bought.

6 replies

Nick
Problem Solver II
Forum|alt.badge.img+4
  • Problem Solver II
  • May 27, 2026

That’s a good use case but right now not out of the box supported within klaviyo (as it would require a logic like, bought out of this category, now show products from this category). 
 

What you could do: 

Option 1: 

  • Have one flow triggering on ordered product and use trigger splits to separate the categories (not sure how many categories we are talking about^^). 
  • After the trigger split you would simply send the mails they way you want them (so trigger split splits everyone who bought a swimsuit you show the newest swimsuit, everyone who bought a bikini gets a different email). 
  • Advantage here: For every product someone bought there would be a separate ordered product event so you could introduce a logic like wait for swimsuits one year, and for bikinis one year and two weeks (so they dont receive emails at the same time even if they bought those two products together). 
  • Disadvantage: You need a mail for every use case (I would recommand trying to do it on categories rather than products). 

Option 2: 

  • Trigger the flow on placed order (could potentially include more products)
  • And then have several dynamic product blocks within that email. One for each category you might want to cross sell 
  • So like you create a product feed for all products in category X, one for category Z etc.
  • You will all have them in that one email and then use the show & hide logic on those product blocks to say for example  'Bikini' in event.Collections to show the product block of all new bikinis to everyone who bought a bikini and ‘Swimsuit' in event.Collections to show all swimsuits etc. 
  • In this scenario there could be more product blocks in one email and you couldn’t separate bikini and swimsuit mails anymore if they were bought together. 

I hope that makes somehow sense^^. You could also probably do a mix out of these two options. It’s really about how many categories you have and if you want to try to do everything in one email or if you are okay with just splitting your top categories and doing separate emails for them. 


Forum|alt.badge.img+6
  • Author
  • Contributor IV
  • May 28, 2026

Let’s see if I understand your suggestions correctly:

Option 1 - Trigger is Ordered product instead of Placed order.
Filter for Ordered product from category X (one-piece), this it would show in the email the product she bought from category X, then I show her the new collection (Product feed A). Do I create a new flow for each Ordered Product (each category), or do I break down within one flow using Conditional splits?


Option 2 - trigger remains Placed Order
Have the filtering within the email with Show/Hide logic
IF order included product Category X show dynamic products from Product feed A. Can I apply a filter to check a metafield? Then farther in the same email - IF order included product Category Z show dynamic products from Product feed B.

Note - I’m definitely building and filtering based on category (Shopify collection), not individual products. I’ve created three product feeds - one-piece black, one-piece solid colour, one-piece print. Therefore if client bought a product from one of those collections, I will show her styles from new product feed 2026 that have the same criteria (black, colour, or print).


Nick
Problem Solver II
Forum|alt.badge.img+4
  • Problem Solver II
  • May 29, 2026

Hi Lorelle, 

regarding: 

“Filter for Ordered product from category X (one-piece), this it would show in the email the product she bought from category X, then I show her the new collection (Product feed A)”

=> Correct. You could use the event data to just show that one product they bought in the past and then show the product feed… and then repeat that logic for every category 

“Do I create a new flow for each Ordered Product (each category), or do I break down within one flow using Conditional splits?”

=> I probably would put everything in one flow as they (can) go through it for each ordered product individiually anyway (so no need to separat into different flows if you want to have it all in one place, if you want different flows, then of course you can separate). 

“IF order included product Category X show dynamic products from Product feed A. Can I apply a filter to check a metafield? Then farther in the same email - IF order included product Category Z show dynamic products from Product feed B.”

=> I am not entirely sure what the use case would be to check a meta field but if there is a specific meta field on the event data you can theoratically use it but sometimes it depends on how “nested” it is within the event structure (If it’s too “deep” you won’t be able to access it for the show/hide logic).

=> What you should always be able to do is a combination of conditions within the show/hide logic (not sure if you meant that with filtering). So you could always say: Show this element if there is a product in category X but no product in category Z (that is mainly for use cases like if there are several products in the placed order event, one in category X, another one in Category z but you only want to show one product feed but not both → not sure if that might be the direction you where going for with the filtering?!). 

I think both approaches have their advantages. Option 1 is more tailored to the one product they might have bought, showing them new products related to that product,  while option 2 is more flexible for several use cases (as it would create an email if there was only one product bought - then it’s mainly what you are getting with option 1 - but also when there are several diffent types of product in that one order - then you might create an email with recommandations to all of those products). 


Forum|alt.badge.img+6
  • Author
  • Contributor IV
  • May 29, 2026

Thank you for the great feedback!

Meta field explanation: I have an ERP that prevents me from using Shopify tags to the fullest extent. Therefore I’ve created smart collections using meta fields that are within each product. So example, some tags are pushed from the ERP to Shopify when product are created. These tags populate all the main menu collections (one-pieces, bikinis, etc), I then created smart collections which will be used as product feeds in Klaviyo (one-piece black, one-piece colour, one-piece print). These product feeds have all products regardless of the year the product was introduced on the website. Therefore in the email I’m programming : if a person bought from category “one-piece colour” then show products from the same category but with the meta field “year = 2026”


Nick
Problem Solver II
Forum|alt.badge.img+4
  • Problem Solver II
  • May 29, 2026

Hmm not entirely sure cause I don’t really know where the information year = 2026 would come up at in klaviyo. If that would be just creating another smart category for like products that where created in 2025, 2026 etc. then you could probably tell the product feed that it should include all categories bikinis but exclude the products in the  categories created 2024, 2025 etc. Then in theory it should only leave products created in 2026 and your bikini category. 

But question is if this would even be necessary as you can just sort the product feed by newest first, which might has the intended outcome?!


Forum|alt.badge.img+6
  • Author
  • Contributor IV
  • May 29, 2026

Oh! Good idea!