Segmentation Logic With Negative OR Filters

The OR operator must be used with care, especially when considering:

Using OR

The “OR” operator allows you to create a statement that will evaluate to true if a user meets the criteria for one or more filters in the statement. For example, consider a promotion that is valid for your US and Canadian customers. You want to make sure that only customers in areas where the promotion is valid receive the promotion. You can use the following statement to target your campaign: Country is United States OR Country is Canada


A customer who meets one or more of the country filters will receive your campaign so your campaign will only go to customers whose country is Canada or whose country is United States.

When Not to Apply the OR Operator

In certain circumstances, the “OR” operator should not be used, it is possible to break the logic. For example, let’s say that you have a campaign that is valid in every country EXCEPT for the US and Canada. Inverting our logic from the last scenario leads to a segment that targets all customers: Country is not United States OR Country is not Canada


The above statement will target all customers, because all customers will meet the criteria for one or more of the filters. Canadian customers meet the criteria for “Country is not United states”. US customers meet the criteria for “Country is not Canada”.

The negative targeting criteria “is not” and “does not equal” should not be used with the “OR” operator when two or more filters are referencing the same attribute. If “is not” or “does not equal” is used with the “OR” operator two or more times in a statement, customers will all values for the relevant attribute will be targeted.

When To Apply the AND Operator

If you’d like to include customers with two or more values for a particular attribute, you should use the “AND” operator. Let’s return to our use case - targeting customers from every country except for Canada and the United States.

Country is not United States AND Country is not Canada will only include customers who are not from the United States AND who are not from Canada. Therefore, both United States customers and Canadian customers will be excluded.

Because there are no valid use cases for using “Or” operands with two or more negative filters that have the same attribute, Braze will not allow you to continue creating your campaign or segment if you use this configuration with “does not equal” or “is not” comparisons.


If you received this warning message and aren’t sure how to correct your campaign, Canvas or segment, please get in touch with your Customer Success Manager or write to our support team.

Still need help? Open a support ticket.

New Stuff!