Does the Conditional Split 'Contains' condition look at each option individually?
I have a re-engagement flow which is sending comms out to customers that have contacted us about a quote. In this quote we provide a discount, if the quote includes specific brands then they cannot be sent the discount.
I have setup a conditional Split in the flow and used the ‘contains’ condition to list all the brands that are excluded, this should exclude anyone that has one of these brands against their record:
When I look at the customers that ‘pass’ the split, some of them have brands lists in the quote, i.e its not excluding them. Does the ‘contain’ condition require that the quote contain ALL the brands listed for it to work, or will it exclude someone that contains at least 1? Ideally it needs to exclude them if they have 1 or more brands listed.
Thanks!
Page 1 / 1
Hi there @Nick_rackattack ,
Thanks for sharing to the Community!
The reason the filter says 'contains' is because categories and collections are list properties, meaning that each event can contain a product from several collections (like an array). So you're essentially saying, "in the list of collections for this item or order, X category] is one of them".
We must also discuss the different data types that can be applied. First, text inputs could be a favorite color, shopping preferences, or an email address. Below is a signup form that gathers preference information that will be translated into text properties. The logic “contains” used with LIST type of data, element references the Items "List", not the item name. In that sense the List type must contain exactly the word you are looking for.
Usually how this works is if the data type is Text, then contains looks for the data you’ve typed in and adds wildcards to either side of the term you’ve entered --- in other words, what you typed in can exist anywhere in the dimension. However, if the data type if List, then contains looks at each record in the List and checks it against what you typed in. If it doesn’t match to data you typed in then it won’t consider it as a qualifying event.
Here are additional resources for this topic:
Thanks @alex.hong, that info is really helpful.
So to confirm, the conditional split will look at each value in the ‘Contains’ list and exclude any records that contain at least one of them?
Thanks
Correct.
Hi @alex.hong,
I have been monitoring this flow for a few days and it doesn’t look like the ‘contains’ condition is adequately removing customers when it should be. If you see in the original post there is a brand called iKamper included, this should exclude any customer that has this listed as a brand. When looking through the ‘successful’ customers I can see customers that have iKamper in their brand.
Here is a screenshot of the ‘Estimate’ record against a ‘successful’ customer:
In the example above; RhinoRack is not on the list but iKamper is. Because iKamper is on the list, the entire customer should be excluded. Could Klaviyo be getting confused and allowing the customer through because at least 1 brand listed is ok?
Thanks
Hi @Nick_rackattack ,
It should be going down the NO path of a conditional if you are excluding it. In your screenshot it looks like you’re using the “zero times” and because you are using “zero times” it should be excluding any and all people who have any of the items listed.
I assume it also says over all time for time conditionals if not that can affect it as well.
I believe the key question has not been answered here.
When you enter multiple values into the “contains” field for a filter (as per original screenshot), are the “multiple values” treated in an AND or OR manner?
However due to the fact @Nick_rackattack still reports the issue, I believe I know the answer. That would mean Klaviyo treats it like AND.
i.e. you could achieve the same thing, by adding multiple extra AND conditions and only adding 1 Brand into each.
Meaning, for that to trigger then someone has to have not bought buy from ALL of the Brands. If they have purchased from any 1 of the brands before, then they will flow through…. not what you want.
You need to setup it up with multiple OR conditions to get it to work I believe. But what a pain right, as you need to create like 20 OR conditions and Klaviyo don’t make it easy to duplicate them.
I actually thought that the “multiple values into the contains field for a filter” would default to use OR… as I believe that would be the more common usage.
However due to the fact @Nick_rackattack still reports the issue, I believe I know the answer. That would mean Klaviyo treats it like AND.
Sorry, I had that wrong - @Nick_rackattack needs it work line AND, but it is working as OR. (Klaviyo have confirmed this too).
Nick would either need to create multiple blocks, and put each brand in by itself, and use the “Zero Times” option.
However, now I see a much easier solution is simply to change it from “Zero Times” to “At least once” - then simply swap the outcomes around (i.e. what is attached to the YES/NO). That way the OR statement works, can you use the much simpler UI for entering multiple brands into an OR condition.
Thanks @tomgee, that option might work. I will play around with that condition to see if I can get it to work.