Combining Rules - Complex Filter Examples

When combining rules to create a filter, you need to consider how contacts move through the rules. The following examples illustrate the path taken for:

Tip: think of a filter as a vertical path with the goal being to get from top to bottom. Rules act like gates, and contacts may take any path where they meet the rule criteria.

AND and OR

An AND and OR combination will select contacts who meet:

  • the two rules defined in the AND relationship, e.g. a student AND from London, OR

  • the rule defined in the OR rule, e.g. on the London students mailing list.

In this example:

  • A student from Birmingham who is not on the London students mailing list would not meet rules two and three and would be removed from the selection. Note: the contact would remain in your database.

  • A teacher from Birmingham who is on the London students mailing list would meet rule three and be included in the selection.

  • A student from London who is not on the London students mailing list would meet rules one and two and be included in the selection.

Compare these results with the results of the OR and AND example to better understand the importance of the order you apply your rules.

OR and AND

An OR and AND combination will select contacts who meet:

  • Either of the two rules defined in the OR relationship, e.g. a student OR on the London students mailing list, AND

  • the rule defined in the AND rule, e.g. from London.

In this example:

  • A student from Birmingham who is not on the London students mailing list would not meet rule three and would be removed from the selection. Note: the contact would remain in your database.

  • A teacher from Birmingham who is on the London students mailing list would not meet rule three and be removed from the selection. Note: the contact would remain in your database.

  • A student from London who is not on the London students mailing list would meet rules one and three and be included in the selection.

Compare these results with the results of the AND and OR example to better understand the importance of the order you apply your rules.

OR with a single NOT

When you select the negate rule checkbox during a rule's creation, you invert the rule logic and introduce a NOT relationship, e.g. select contacts who are not from UK.

When used with an OR rule, the negate rule function works in a similar way, e.g. select everyone who is a student or not from the UK.

In this example:

  • A student from the UK would meet rule one and be included in the selection.

  • A teacher from the UK would not meet either rule and would be removed from the selection. Note: the contact would remain in your database.

  • A student from France would meet both rules and be included in the selection.

Note: if the intent of the filter was to select students from outside the UK for an international funding email update at a UK university, this filter would not achieve its intent since:

  • All students can pass through the equal to student rule.

  • Some non-students can pass through the not equal to UK rule.

If the intent was to remove all UK-based non-students from the filtered group, the filter would achieve its intent.

Tip: to achieve the first intent example, i.e. select students from outside the UK, you would need to combine these rules in an AND relationship, i.e. equal to student AND NOT equal to UK.

OR with double NOT

If you negate both rules in your OR relationship, a contact will be selected if they do not meet either rule, e.g. select contacts who are not students or contacts who are not in the UK.

In this example:

  • A student from the UK would not meet either rule and would be removed from the selection. Note: the contact would remain in your database.

  • A teacher from the UK would meet rule one and be included in the selection.

  • A student from France would meet rule two and be included in the selection.

Note: if the intent of the filter was to select non-students from outside the UK for a recruitment email at a UK university, this filter would not achieve its intent since:

  • Some students can pass through the not equal to UK rule.

  • Some UK citizens can pass through the not equal to student rule.

If the intent was to remove all UK students from the filtered group, the filter would achieve its intent.

Tip: to achieve the first intent example, i.e. select non-students from outside the UK, you would need to combine these rules in an AND relationship, i.e. NOT equal to student AND NOT equal to UK.

OR with double NOT - incorrect usage

Although NOT rules are useful, e.g. selecting contacts not from the UK is easier than creating a list of OR rules for every other country, they can create problems if used incorrectly.

Assume you want to create a list without any students or teachers in it. It would be tempting to create a filter using the logic that the job title is NOT equal to student OR teacher.

However, in this example:

  • Teachers would meet the not a student rule, and

  • Students would meet the not a teacher rule.

As such, this filter removes nobody from your selected contacts, i.e. everyone in your database is selected.

The correct approach for this example would be to create an AND relationship, i.e. the logic for the filter should be:

I do NOT want to include any students AND I do NOT want to include any teachers in my list.

Following the top to bottom path:

  • All students would be removed from your selection by the first rule, AND

  • All teachers would be removed from your selection by the second rule.

Note: no students pass through the second rule as they did not reach the second rule of the filter.