Solved

Not sure how "contains" works in flow filters

  • 9 March 2022
  • 1 reply
  • 526 views

Badge +2

I’m using a flow filter with the ordered product metric that looks like this:

Ordered Product equals zero times over all time where Categories contains: wallets, belts, watches, necklaces

How is this applied?

Will someone who has ordered a wallet but nothing from the other categories be included?

Or do they have to have ordered nothing from each category to be included?

Thank you in advance for any guidance you can offer!

icon

Best answer by alex.hong 9 March 2022, 19:14

View original

1 reply

Userlevel 7
Badge +58

Hi there @Jtwaddle87,

Welcome to the Community!

You'll actually need to select each individual category that you'd like to be included in the definition (for both Placed Order and Viewed Product). 
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.

We also have a guide that talks about different data types as well!

 

Hope this helped!
Alex

Reply