Skip to main content

How filters work in Spoks

What a filter is, the six operator profiles, how behavioral filters work, and how to combine filters with filter groups.

Written by David Isak Hansen

Filters control who a message reaches, both when building a segment and inside a flow. This article explains how filters are built and how they behave. For the full list of available fields, see the Contact filter reference. For how filters behave inside flows, see Using filters in flows.

How a filter is built

Most filters are a single condition with three parts:

  1. Field — the contact attribute or behavior being tested (for example, Total orders).

  2. Operator — how the field is compared (for example, equals, is greater than, is before).

  3. Value — what it's compared against (for example, 3, Subscribed, or a date).

Read together, a filter is a sentence: "Total orders is greater than 3" or "Email marketing consent equals Subscribed." Behavioral filters work differently and are covered below.

Operator profiles

Every field belongs to one of six profiles. The profile determines which operators the field offers. The Contact filter reference lists the profile for every field.

Text

Free-text fields; you type the value.

Operators: contains, doesn't contain, equals, does not equal, starts with, ends with, is not set, is set.

List selection

Pick one or more options from a list (such as your tags or forms).

Operators: contains, doesn't contain, is not set, is set.

Predefined selection

Fields with a fixed set of possible values (such as a consent status or a country).

Operators: equals, does not equal, is not set, is set.

Number

Numeric and currency fields; you enter a number.

Operators: equals, does not equal, is greater than, is less than, is greater than or equal to, is less than or equal to.

Date

Date fields. The value input changes with the operator:

  • is after / is before → a single date & time

  • is between → a relative range, e.g. between 1 and 30 days ago

  • is between dates → two calendar dates

  • more than / less than → a number + unit ago, where unit is days, weeks, months, or years

  • is not set / is set → no value

Behavioral

For activity that happens over time (purchases, opens, clicks, product views). Instead of one operator, these count how often an event happened. See the next section.

Behavioral filters

A behavioral filter has three parts:

  1. Frequency — how many times the event happened: at least once, equals, does not equal, is greater than, is less than, is at least, is at most (with a count).

  2. Timeframe — the window the count applies to: after, before, between, between dates, more than, less than, or over all time.

  3. Where (optional) — one or more sub-conditions that narrow the event. The available sub-fields depend on the event, and each sub-field uses whichever base profile fits it — Email Subject and URL use Text, Product Price uses Number, Product Tags uses a selection.

Example: Opened email — at least once — over all time — where Email Subject contains "welcome" matches contacts who have opened an email whose subject contained "welcome." The fields that use behavioral filters, and their Where sub-fields, are listed in the Contact filter reference.

Combining filters: filter groups

Filters are combined using filter groups:

  • Conditions within the same group must all be true (AND).

  • A new filter group is an alternative set — a contact qualifies if they match any group (OR).

Use the Add filter group button to add a group.

Next

Did this answer your question?