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:

NOTE: 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.

NOTE: Filters on Organization fields will only return results for organizations that have one or more associated (linked) contacts.


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.

NOTE: For filter conditions that return results from a specified last number of days, or a When type condition (in the lastmore thanexactly), 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

NOTE: The has any value filter option will return results that have a value of 0 or "". Learn more about empty values.

  • 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).
  • PersonOrganization 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
    • has not occurred
    • 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).

NOTE:

  • 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)

NOTE:

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

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.


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)
    • 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.
  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.

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.

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.

NOTE: 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.
  4. Use Where to specify an activity attribute (such as campaign type) and the value you want results to match.
  5. Use Match with entry activity attribute to specify an exit activity attribute to match the entry activity attribute (such as a Salesforce opportunity ID).
  6. Click the trash icon to remove a When or Where clause.
  7. Click Done to view the results.

NOTE:

  • For filter conditions that return results from a specified last number of days, or a When type condition (in the lastmore thanexactly), 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.

NOTE:

  • 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).

NOTE:

  • Match with entry activity attribute is only available in journeys, under Occurs.
  • The occurs activity is stored for the length of time that the contact is in the journey (available for more than the default 90-day limit, even if data retention is not enabled for the activity).

Learn more about matching activity attributes in journeys.

Use cases

Using nested conditions can help you find:

  • VIP customers based on their total spend and number of orders placed.
  • People who booked a flight to a specific location for a specific date.
  • People who donated a particular amount in the last 30 days.
  • Salesforce opportunities created for a specific stage in your sales pipeline.
  • People who abandoned a cart before checkout to encourage them to make a purchase.

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.
  • People who are marketable newsletter subscribers.
  • Customers who made multiple purchases from your store.

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 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.
  • Customers who purchased a product in the last 60 days and live near Sydney.
  • People who submitted a form on your website but did not complete your website sign-up.

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.

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.


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.



by clicking on the condition and selecting a value.



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.





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





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





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





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





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





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





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.





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.





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.





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





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





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





by selecting an occurs condition under People enter when.