Working with filters

Filtering people enables you to view and use segments of people based on selected categories, fields, and conditions.

When you create a filter on the People page, you can:

You can also filter people when creating an email or SMS campaign to send your campaign to a one off audience that you don’t intend to re-use. Learn more about using filters for campaigns under Using a filter versus creating an audience.

In journeys and playbooks, you’ll use a filter to specify the conditions and criteria by which people start the journey or enter the playbook.

Using a filter versus creating an audience

Using filter results for an email or SMS campaign is recommended one-off campaigns where you don’t intend to re-use the segment as an audience. Sending a campaign using a filter rather than creating a new audience will help prevent the build up of unnecessary assets over time.

Audiences are designed to represent key customer lifecycle stages (such as subscribers) and will provide you with visibility into the growth and engagement of this audience over time. You should only create an audience when you intend to:

  • grow or contract the audience e.g. Customers (grow), Slipping Customers (contract),

  • use the audience as a subscription preference,

  • track a specific group of people over time, and

  • use the same audience in campaigns over and over.

Learn more about audiences in Working with audiences.

Filter categories and fields

The fields within each filter category are described on the following pages:

If you have integrated a data source (such as Shopify), activity fields and a category containing people fields associated with the integration will appear in the filter list.

Filter conditions

The filter conditions available depends on the category (and fields within that category) you choose, which could be based on audience, person, organization (if enabled), a data source integration, or a specific activity a person has been involved with.

The filter conditions available in each category are listed below.

For filter conditions that return results from a specified last number of days, or a When type condition (in the last, more than, exactly), the time calculated is day-based, not hour-based. For example, in the last 1 day means from 12:00 AM this morning until 11.59 PM tonight, not from 24 hours ago until now.
  • All categories:

    • is

    • is not

    • starts with

    • ends with

    • contains

    • does not contain

    • has no value

    • has any value

  • Person and Organization categories:

    • occurs in less than — returns results for the future (e.g. occurs in less than 2 days). If you choose:

      • 0 or 1 day ago, this includes the current day only.

      • Another number of days, this means from the current day until the specified number of days in the future (e.g. from today until 2 days' time).

    • occurs in — returns results for one specific day in the future (e.g. occurs in 2 days' time). If you choose:

      • 0 days, this includes the current day only.

      • Another number of days, this means for the specified day only in the future (e.g. in exactly 3 days' time).

    • occurs in more than — returns results for the future (e.g. occurs in more than 2 days' time). If you choose:

      • 0 days, this includes the current day and all future days.

      • Another number of days, this means from the specified day and all future days (e.g. in 2 days' time and beyond).

    • anniversary — results match the time frame you specify for the chosen field. For example, if a person was created in your CDP 2 days ago and you choose anniversary will occur in 363 days, that person will show as a match for the filter criteria.

    • age is exactly

    • age is more than

    • age is less than

    • between

    • greater than

    • is true — results match the boolean value of "true", such as if a person has opted-in to receive emails (email permission is true).

    • is false — results match the boolean value of "false", such as people who have not opted-in to receive SMS (SMS permission is false).

  • Person, Organization and activities:

    • after

    • on

    • before

    • more than — returns results from the past (e.g. more than 2 days ago) or how many times an activity occurred (e.g. more than 1 time). If you choose:

      • 0 days ago, this includes the current day and all days prior.

      • Another number of days ago, this means from the specified day and all days prior.

    • less than — returns results from the past (e.g. less than 2 days ago) or how many times an activity occurred (e.g. less than 3 times). If you choose:

      • 0 or 1 day ago, this includes the current day only.

      • Another number of days ago, this means from the specified days ago until and including the current day.

    • exactly — returns results from the past (e.g. exactly 30 days ago) or how many times an activity occurred (e.g. exactly 3 times). If you choose:

      • 0 or 1 day ago, this includes the current day only.

      • Another number of days ago, this means from the specified number of days in the past only (e.g. the 30th day ago).

  • Activities only:

    • has occurred

      • If you select has occurred and do not specify a Where condition, the filter will return matches for all time.

      • If you select has occurred with a Where condition, the filter will return matches from within the last 90 days only (unless you use data retention).

      • Data retention is currently only for business or enterprise users.

    • has not occurred

      • If you select has not occurred and do not specify a Where clause, the filter will return matches for all time (that is, the activity did not occur).

      • If you select has not occurred with a Where clause, the filter will return matches from within the last 90 days only (unless you use data retention). It is possible that the activity occurred, but more than 90 days ago.

      • Data retention is currently only available for users on business or enterprise plans.

    • in the last — results occurred in the specified time frame (e.g. in the last 30 days).

      • 0 or 1 day ago, this includes the current day only.

      • Another number of days ago, this means the current day and the specified number of days prior (e.g. in the last 7 days).

The activity filter conditions are found under the nested condition options:

  • Has or has not occurred

  • First occurred

  • Last occurred

  • Frequency & time

  • Occurs.

Learn more about using nested conditions under Create a filter using nested conditions.

Below are examples of how the time conditions include or exclude the specified days.

date field

Create a filter

The following steps are to create a filter from the People page, but you can follow a similar procedure anywhere you see Filter or Add filter (such as in the email or journey campaign wizard).

  1. On the People page, click Filter.

  2. Choose filter conditions from any of the following categories:

    • Audience

    • Person

    • Organization (if enabled)

    • Filter by activity.

      If you have integrated a data source (such as Help Scout), activity fields and a category containing filter conditions associated with the integration will appear in the filter list.

      filter categories
  3. When you have selected your condition/s, click Done to see the results.

You can create filters using a number of different operators, grouping and nesting methods, depending on the results you want.

For example, the filter query Clicked email has occurred where email name is Thanks for subscribing and device is mobile will return results for one activity. If these are the results you want, you can create a filter using nested conditions.

nested condition

However, the filter query Clicked email has occurred where email name is Thanks for subscribing and Clicked email has occurred where device is mobile may return results for two separate activities, or the same one. If these are the results you want, you can create a filter using separate conditions.

separate conditions

Creating a condition group enables you to query multiple conditions together. You can also change the condition operators from AND to OR to modify your filter results.

Create a filter using nested conditions

Creating a filter of nested conditions ensures that you are capturing criteria related to one activity, rather than multiple activities.

The nested activity conditions begin with:

  • Has or has not occurred,

  • First occurred,

  • Last occurred,

  • Frequency & time, or

  • Occurs.

Occurs is only available in playbooks and journeys as it captures future activities (as opposed to Has or has not occurred which captures activities from the past).

To create a nested condition:

  1. Click Filter.

  2. Click Filter by activity then choose the activity you wish to filter by.

  3. Choose a nested condition, then:

    1. Use When to specify:

      1. how many times an activity occurred, or

      2. how many days ago an activity occurred.

        • For filter conditions that return results from a specified last number of days, or a When type condition (in the last, more than, exactly), the time calculated is day-based, not hour-based. For example, in the last 1 day means from 12:00 AM this morning until 11.59 PM tonight, not from 24 hours ago until now.

        • Occurs does not contain a When clause as it can only capture future activities.

    2. Use Where to specify an activity attribute (such as campaign type) and the value you want results to match.

      • If you select has occurred or has not occurred and do not specify a Where clause, the filter will return matches for all time.

      • If you select has occurred or has not occurred and you do specify a Where clause, the filter will return matches from within the last 90 days only (unless you use data retention).

      • Data retention is currently only available for users on business or enterprise plans.

    3. Use Match with entry activity attribute to specify an exit activity attribute to match the entry activity attribute (such as a Salesforce opportunity ID).

      • Match with entry activity attribute is only available in journeys, under Occurs.

      • This clause is only available if you select the People can be in journey option More than once, and enter multiple times.

  4. Click the trash trash icon to remove a When or Where clause.

  5. Click Done to view the results.

Use cases

Using nested conditions can help you find:

  • VIP customers based on their total spend and number of orders placed.

    nested example
  • People who booked a flight to a specific location for a specific date.

    flight booked
  • People who donated a particular amount in the last 30 days.

    donation
  • Salesforce opportunities created for a specific stage in your sales pipeline.

    salesforce
  • People who abandoned a cart before checkout to encourage them to make a purchase.

    match entry attribute

Create a filter using separate conditions

Adding more than one condition to your filter will enable you to find results that match multiple, discrete activities.

Add separate filter conditions by clicking Add condition. Click Clear to clear all conditions and start again.

Use cases

Using separate or single conditions can help you find:

  • People who have been subscribed for a while and have not yet made a purchase.

    non purchase
  • People who are marketable newsletter subscribers.

    audience track
  • Customers who made multiple purchases from your store.

    purchase repurchase

Create a condition group

Creating a condition group enables you to return results for multiple conditions together.

To create a condition group:

  1. Click Filter.

  2. Select a condition.

  3. Click the add add icon next to the condition and select another condition.

  4. Start a new condition group by clicking Add condition and repeat the preceding step.

Use cases

Using condition groups can help you find:

  • People who are subscribers and have not yet made a purchase, or people who have opened a new subscriber email and not yet made a purchase.

    group condition
  • Customers who purchased a product in the last 60 days and live near Sydney.

    proximity
  • People who submitted a form on your website but did not complete your website sign-up.

    form sign

Use 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.

or conditions

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.

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.

    and or operators
  • People who are located in Australia or New Zealand and have a website session duration of more than 30 minutes.

    and or conditions 2

Filter errors

When creating a filter, if you see a red condition, it means that the condition requires a value or the operator/s you have chosen are not valid. If a condition is red, it has not yet filtered your results.

You may encounter the following error messages when using filters.

General filter errors

Error message Correct this error…​

One of your conditions is empty and requires a value.

one of your conditions

by clicking on the condition and selecting a value.

one of your conditions2

If your filter condition is red with no error message, or the error message doesn’t specify the cause of the error, you should check to see if your condition is missing a value, an operator is invalid, or clear the condition/s and start again.

Errors in playbooks and journeys

Error message Correct this error…​

When using occurs conditions, you must use the "and" operator between condition groups.

when using occurs

by clicking the OR operator between the conditions to change it to AND.

when using occurs2

When mixing occurs and non-occurs conditions within a condition group, you must use the "and" operator.

when mixing occurs

by clicking the OR operator in the condition group to change it to AND.

when mixing occurs2

When your filter contains more than one occurs condition, you must use the "or" operator.

when your filter

by clicking the AND operator in the condition group to change it to OR.

when your filter2

Non-occurs conditions can only be grouped with a single occurs condition.

non occurs

by deleting one of the occurs conditions from the group. You can create a separate condition group, however you cannot select another occurs condition, so you may wish to choose has occurred.

non occurs2

In journeys and playbooks, only one condition group can contain an occurs condition. Should you have a filter that has more than one group with an occurs condition, you will need to delete one of the occurs conditions from one of the groups.

Errors in journeys

Error message Correct this error…​

The entry activity does not have an [attribute name] attribute.

the entry activity

by specifying an activity attribute in the entry criteria that you want the exit criteria to match. You may need to change your chosen entry or exit activity to find matching attributes.

the entry activity2

Matching attributes across activities is only available when 'people can be in the journey' is set to 'more than once, and enter multiple times'.

matching att more than once

by selecting More than once, and enter multiple times under People can be in journey.

matching att more than once2

Matching attributes across activities is only available when using an occurs condition in the entry criteria.

entry occurs

by selecting an occurs condition under People enter when.

entry occurs2