Logical Operator Combinations in Funnel Filters
Know the right combinations of AND and OR operators for effective us of the platform
Funnel filters are used widely in the Bloomreach Engagement platform. You can find them in analytics (reports, segmentations), campaigns (banners, scenario conditions nodes, in-apps, email campaigns), legitimate interest settings, and other places. The funnel filter heavily uses AND and OR logical operators. It is important to understand how they work in order to use funnel filters effectively and get the correct result using Bloomreach Engagement.
The difference between AND and OR is that AND requires both conditions to be true for the overall condition to be true. The OR requires one condition to be true for the overall condition to be true. The following truth table gives all the combinations for these operators.
A | B | A OR B | A AND B |
---|---|---|---|
True | True | True | True |
True | False | True | False |
False | True | True | False |
False | False | False | False |
AND always has a higher priority than OR, such as in the expression a OR b AND c, b AND c has higher priority. So effectively this expression is executed as an OR (b AND c). Therefore, if you need OR to take precedence over AND, use parenthesis to specify this, such as in the expression (an OR b) AND c, the OR will be performed first and then AND.
Note
Filtering logic in Engagement is based on De Morgan's laws ( ≡ means identical to)
Not (a AND b) ≡ Not a OR Not b
Not (an OR b ) ≡ Not a AND Not b
Another example below is a complex expression and the order of logical operations.
Did this article help you?
Please provide your feedback. We would like to know if our help center is effective in solving your queries. You can also leave comments and suggestions on how we can make our help articles better. You can also suggest topics you’d like us to cover.
Updated 12 months ago