Compound Mail List Filters

From NewHaven Software Wiki

Jump to: navigation, search

We’re often asked how to create filters that combine multiple filters and/or how to include some criteria while excluding others. This can be done with the compound filter option in the Mail List Filters section. Creating a compound filter is as simple as clicking on the + button to create a new filter and then the Compound Mode checkbox in the upper right-hand corner of the Customer Filter screen.

To illustrate this let’s look at an example where we'd want our filter to INCLUDE based on some criteria and EXCLUDE on others.

  1. Start by creating filter(s) for the criteria you want to include customers based on.
  2. Now create a filter selecting the criteria to exclude on. (Note: Do NOT check the box for ‘Use to Exclude’) Examples might be 'No email advertising', 'Undeliverable', customer description codes you use to indicate a bad customer, etc.
  3. Now create a new filter. Click on the Compound Mode checkbox and give the new compound filter a name.
  4. Select the first filter from the right combo box (next to NOT) and then click Add to Definition. (this moves it to the box below)
  5. If you have another filter you wish to include, select AND or OR from the left combo box and then the name of the second filter in the right combo box. (click Add to Definition again to add it to the list below) Note: AND tells CMS to only include customer who qualify for both filters. OR will select anyone who matches either filter.
  6. Once the inclusions are complete, select AND, check the box next to NOT, and then choose the filter with the criteria you want to exclude customer based on.

The resulting compound filter would look like:

Filter 1
AND Filter 2
AND NOT Filter 3

Note that the ‘AND NOT’ (or any other Boolean) does not appear on its own line, it is always on a line with a filter. You could go on to add additional exclusions by adding additional ‘AND NOT’ statements which would then look like:

Filter 1
AND Filter 2
AND NOT Filter 3
AND NOT Filter 4

While the multiple AND NOT statements work fine as shown, when you are combining multiple includes (AND or OR) with excludes (AND NOT's) you should surround the includes with parentheses. This tells CMS how to group the includes and then, from that group, what then to exclude based on your 'AND NOT's':

(Filter 1
OR Filter 2
OR Filter 3)
AND NOT Filter 4
AND NOT Filter 5

The parentheses have corresponding checkboxes and are selected when creating that line. If you’ve forgotten them or wish to go back and add them later you can click on the line you wish to edit in the bottom box and then click Edit Line to modify. When the modifications are complete, click Add to Definition to add it back to the filter and then save.

Due to the many possible variations with filters, the Booleans, and the parentheses; there is more than one way to create a compound filter. As with any filter, we strongly recommend you run Quick Counts on each individual filter so when you combine them you have some idea what the resulting count should be…even if it is only higher or lower than X. This way, when you run a quick count on your compound filter you’ll have some sense of if you’ve combined them correctly. After your compound filter passes the Quick Count test, spot check some records to make sure those that should be included are and those that should not be included are not.

Related Articles

Alt search terms: Mail Filters, Custom Filters

Personal tools