Using AND/OR operators

The default operator between filter conditions is AND. You can broaden your filter matches by changing AND to OR by clicking on AND between the conditions (and change back to AND by clicking OR).

Using OR will return people who match at least one of the filter conditions, and will return a longer list of results than using AND, because results only have to match one or some of the conditions, not all of them.

For nested conditions, the operators between the Where clauses will all be AND or OR; they cannot be mixed. Changing one clause operator will change all other clause operators to match.

For separate conditions and condition groups, the operators can be mixed to achieve different results.

When creating a condition group:

  • Linking conditions with AND will result in the conditions being read together (as a group), rather than separately.
  • Linking conditions with OR will result in the conditions being read separately, rather than together.

TIP: When creating a group of negative conditions (conditions with terms like "has not" or "is not", e.g. "Status is not Active"), you will usually want to link the conditions with AND (instead of OR).

This is because the filter will read each of the conditions linked by AND together, and each of the conditions linked by OR separately. When using OR, if a person matches one condition ("does not contain A") but does not match the other ("does not contain B"), they will be included in the filter (2 negatives = positive).

For example, you have a journey designed for people who are not existing customers and who are not currently trialing your product. If this journey’s entry criteria looks like the following example, it will cause people who are existing customers or trialists to enter the journey — which is not the result you want!

Example filter with negative conditions linked by OR

In the example filter, a person who is an existing customer would match "Status is not In trial" but not match "Status is not Active", and they will be entered into the journey because they matched one of the conditions. The solution to this is to change OR to AND so the filter can assess whether a person matches all of the conditions in the group.

Use cases

Mixing AND/OR operators can help you find:

  • People who have been shown a widget and have clicked on a widget, or people who have been shown a widget and have reacted to a widget.
  • People who are located in Australia or New Zealand and have a website session duration of more than 30 minutes.