Working with Filter Logic

A Filter consists of one or more selection criteria, or rules, that define the records you're looking for. Cheetah Digital provides several different options and methods for defining these criteria.

Note: For tips and suggestions on how to build the most efficient Filter possible, see Filter Best Practices.

Types of Filter Components

Filters are built by adding one or more fields or activities, and then assigning a mathematical operator (such as "equals to" or "greater than") to each one. A simple Filter might consist of only one or two components; more complex Filters can consist of many components, organized into groups, and linked with logical operators (see "Logical Operators" below for more details).

You add Filter components by dragging them from the Dynamic Pane on the right-side of the screen, and dropping them into the Workspace. The Dynamic Pane is separated into the following sections:

  • Expression Toolbox: This section contains Fields and Joins.

  • Fields: Fields are the database columns in the source table that you selected when you created the Filter. All active fields can be used in the Filter.

  • Existing Joins: All of the existing joins associated with the source table are listed, allowing you to add a field from a joined table as a selection criteria.

  • Property Joins: A property join is a join that does not already exist within the database. This feature is used to enable filtering on fields in other tables that are not already joined.

  • Activities & Items: This section contains events that are recorded in the database which can be used in your Filter. These events can be system-generated, such as File Import or Sent a Campaign, or they can be user-generated, such as Link Clicks or Share to Social, or even another Filter.

Note: If you're building a Filter off a Load and Send table, some of the options listed above are removed from the Dynamic Pane because those options aren't supported in Load and Send Filters. You can't use joined fields, or any of the Activities & Items in your Filter logic.

Fields

Fields are probably the most common component when building a Filter. Generally speaking, when you use a field as a component in your Filter, you first select the field, then select a mathematical operator. Lastly, you then either select or enter a value, or you select another field against which to compare. These two different methods are each described below.

Field Logic: Values

The Expression Toolbox displays every active field in the Filter's source table. Next to each field name is an icon representing the field's Data Type. The Data Type controls the possible operators and values that you can use when you add this field to your Filter.

Field Logic: Comparison

The Expression Toolbox displays every active field in the Filter's source table. Next to each field name is an icon representing the field's Data Type. The Data Type controls the possible operators and values that you can use when you add this field to your Filter.

Existing Joins

When your marketing database was initially configured, it was designed with various joins between the tables. For example, you might have a Customer table that joins to an Order table, which joins to an Order Item table, which joins to a Product table.

Property Joins

If you need to create a Filter using a field that's not in the source table, and that's not already joined to the source table, you must use the Property Joins feature. This feature allows you to create a join "on the fly" to another table, but only if both tables share the same field (for example, both fields have an Email Address field). When comparing the two joined tables, the system performs a byte-for-byte match on the selected join field in each table. For example, if you set up the join on an Email Address field, the system would look for an exact match on the Email Address value in the source table against the Email Address value in the joined table.

Aggregations

When you add a System Join to a Filter, the platform allows you to perform a mathematical operation, such as a sum or a count, on a field in the joined table.

Top & Sort

The platform allows you to sort the records in your Filter result set, then select a specified quantity of records off the "top" of that sorted result set. This feature is useful if you want to create a Filter of a specific size, or if you want to pick the top records based on a certain field, such as a Score, or Purchase Amount, for example.

Activities and Items

Activities are events that are recorded in the database and that can be used in your Filters. These activities include both system-generated events (such as a File Import) and user-generated events (such as "Link Clicks").

Working with Components

This section describes how to manage the different components that you've added to your Filter.

Logical Operators

If your Filter has only one rule, then the system simply finds all the records that match that rule.

In this example, the user is simply looking for all recipients from Illinois.

Group Components

Filter rules can be grouped together to create more complex logical structures using combinations of AND and OR operators. To group two or more rules together:

Include / Exclude

By default, a Filter will include all of the records that match the criteria and business rules defined within each component of the Filter. In some cases, though, you might want to exclude records that match a Filter component. The system allows you to toggle the component's definition from include to exclude. For example, let's say you want to select all individuals except those who live in California. You could define the Filter by listing out the other 49 states that you want included. However, it might be simpler to define the Filter as exclude California.

Reorder Components

Filters always execute from the top down, meaning the rule that appears at the top of your Workspace will run first, followed by the next rule, and so on. Filter components can be rearranged into a different sequence in order to change the sequence in which the Filter executes. In most cases, you want the Filter component that's most likely to eliminate the most records to run first, in order to improve the Filter's efficiency. For example, if you had a Filter consisting of "find all females in Illinois," your Filter would contain two components ("Gender = Female" and "State = IL"). You would want the State component to run first, as this rule will eliminate more records than the Gender component will.

Remove Components

To remove a component from your Filter: