Hello!
I am setting up some dynamic tables inside a flow and am wondering if I can get fancier with the filtering - I read the guides / posts about excluding certain products so I feel I have a good grasp on the beginning of what I want. But I am trying to exclude/include certain products based off of multiple conditions and running into some roadblocks!
Background info: Our users sign up to try promotional items at specific retailers - and they can select which one is their preferred store. This gets passed into the metric ‘AcceptedinCampaign’. An email is then triggered reminding the user to go into that specific store.
The addition I’m looking to add: There are many items on promotion that the user may not have signed up for yet; and some of these may also be at the same retailer. These are currently passed to a custom profile property called ‘products’. What we want to add to the email mentioned above is a second section - if the user has other promotional products at the same retailer they selected, then promote those products so the user is (hopefully) incentivized to pick up more than one thing.
Right now I’ve been able to add these product recommendations using a Dynamic table no problem, but where I run into issue is trying to match and/or filter by specific retailers. An example of what the product recommendations table looks like:
![](https://uploads-us-west-2.insided.com/klaviyo-en/attachment/14c7489a-a007-4276-bf4e-e7c501850908.png)
And if I were to filter by Walmart only, no problem:
![](https://uploads-us-west-2.insided.com/klaviyo-en/attachment/faf890f7-6ca0-484a-9f36-33da1610d613.png)
But when I try to ‘match’ the event preferred retailer {{ event.payload.preferred_location.name }} with the dynamic table products.retailers is where I run into issue. What I originally tried was setting up a few sections that each looked the same, but had a different filter. So the first dynamic block would be Walmart, the next Whole Foods, etc just to keep it “simple”. I tried a few different iterations of the show/hide logic but could not get it to work.
For example in the show/hide logic I tried:
- Walmart in event.payload.preferred_location.name and Walmart in products.retailers
- event.payload.preferred_location.name = ‘Walmart’ and products.retailers = ‘Walmart’
and other iterations switching around use of ‘in’, ‘and’, etc.
If there’s some other method to do this, or any other ideas, I would love to do this! Thank you.
Tiffany