Filtering data

Filters let you narrow down data outputs by customer attributes, event attributes, and time ranges. You'll use them across analyses and campaigns—in reports, metrics, segmentations, and audience definitions.

📘

Note

You can also filter customers at the project level using the Email list hygiene filter.

Filter types

There are 3 filter types available across all Bloomreach features:

Filter typeWhat it does
Date filtersLimits results to events within a specific time range.
Customer filtersFilters based on customer attributes or event history.
Event filtersFilters events based on their attributes.

1794

All three filter types as they appear when creating a metric.

Customer filters

Customer filters let you define which customers are included in a result set. They can be based on customer attributes or on event history (Funnels). You can combine multiple customer filters using AND and OR logic.

Filter typeHow it works
Based on attributesUses static attributes (for example, email, name) or derived attributes (for example, segmentations, expressions) to match customers.
Based on funnelsUses a customer's event history to determine a match. The global date filter in reports doesn't apply to events inside these funnels.
837

This filter matches customers who have a first_session event in their history AND have an age attribute equal to 15.

Customer filter templates

You can save a set of customer filter conditions as a reusable template. Templates pre-fill filter conditions wherever customer filters appear, saving time when working with complex or frequently repeated logic.

Common uses include:

  • Saving a high-value customer segment definition and reusing it in multiple campaign audience filters.
  • Saving a complex set of scenario condition node filters so you don't need to duplicate an entire scenario.
  • Creating shared company-wide filters. For example, customers who purchased today, or customers to exclude from all campaigns.

🚧

Important

Templates are an assistant feature—not a live reference. If you update a template, existing places where it was used are not updated automatically. For live references, use segmentations instead.

Templates are saved under Data manager > Definitions.

Customer filter templates stored in **Data manager** > **Definitions**.

Customer filter templates stored in Data manager > Definitions.

Customer filter templates are available in:

  • Scenarios (condition node)
  • Email campaigns
  • Data & Assets > Customers

Event filters

Event filters let you filter by the attributes of a specific event. Multiple attribute conditions are combined with AND logic—the result must satisfy all conditions defined.

1614

This event filter counts only purchases where the value is greater than 1,000.

Customer filters vs. event filters

Choosing the wrong filter type is one of the most common mistakes. Here's an example to illustrate the difference.

Goal: Count how many times products with a price greater than 100 were viewed.

1980

Correct — an event filter that counts only product views where price > 100.

1956

Incorrect — a customer filter that counts all product views by customers who ever viewed a product priced > 100.

The first approach (event filter) is correct. It counts only the specific product views where the price attribute is greater than 100.

The second approach (customer filter) is incorrect. It counts all product views by any customer who has ever viewed a product priced over 100—regardless of which product was viewed in each event. A customer who viewed a €200 product and a €30 product would have both events counted. A customer who only viewed €40 and €50 products would have none counted.

Operators

Operators define the conditions inside a filter. For example, equals, greater than, or is true. They work in both customer and event filters. All operators are case-insensitive.

The operator dropdown in a Bloomreach filter.

The operator dropdown in a Bloomreach filter.

You can compare against a static value or against another attribute using the π button.

Compare a filter value to a static input or to another attribute.

Compare a filter value to a static input or to another attribute.

Special operators

OperatorBehavior
is setTrue if the attribute has any value, including an empty string.
is not setTrue if the attribute has no value at all (null).
has valueTrue if the attribute has a non-empty value (string length > 0).
has no valueTrue if the attribute is empty or null.

String operators

OperatorBehavior
equalsExact match to the specified string.
does not equalMust be set, but different from the specified string.
inMust match one value from a list. Maximum 5,000 values.
not inMust be set, but different from all values in a list. Maximum 5,000 values.
containsThe specified value must appear within the attribute.
does not containThe specified value must not appear within the attribute.
starts withMust match the opening characters of the string.
ends withMust match the closing characters of the string.
matches regexpMust match a regular expression. Uses RE2 syntax. Not case-sensitive by default — use the (?-i) flag to enable case sensitivity, for example (?-i)._[a-z].

📘

List data types

When filtering a list attribute using all_items, empty lists will match because "all items equal X" evaluates as true for an empty list. To exclude empty lists, add a has value condition.

Number operators

OperatorBehavior
equalsExact numeric match.
in betweenIncludes both boundary values.
less thanExcludes the boundary value itself.
more thanExcludes the boundary value itself.

🚧

Important

If one segment uses age is less than 18 and another uses age is more than 18, customers who are exactly 18 fall into neither segment. Use in between carefully for the same reason—if you define 0–50 and 50–100, the value 50 appears in both segments.

Boolean operators

Boolean operators match true/false values and also 1/0. Attributes with no value or a different value type won't match either operator.

  • is true
  • is false

Date operators

These operators compare attributes in the date format to the current time. To better understand how to work with these operators, see the examples section.

more thanA relative time period further in the past or future than the specified distance.
less thanA relative time period closer in the past or future than the specified distance.
matches rangeAny date within a specified absolute date range.
matches current dayDay of the month matches the current day.
matches current monthMonth matches the current month.
matches current yearYear matches the current year.
second matchesEvent occurred in a given second of a minute (1–60).
minute matchesEvent occurred in a given minute of an hour (1–60).
hour matchesEvent occurred in a given hour of a day (1–24).
weekday matchesEvent occurred on a given day of the week (1–7, where 1 = Monday).
day matchesEvent occurred on a given day of the month (1–31).
month matchesEvent occurred in a given month (1–12).
year matchesEvent occurred in a given year (enter the full year, for example 2019).

Supported operators for catalogs: more than, less than, matches range, matches current year.

Supported time formats: UNIX timestamp, Y-M-D, D-M-Y, M/D/Y, D.M.Y — with optional H:M or H:M:S.

List operators

List operators extend any standard operator with a scope condition: whether all items in the list must meet the condition, or whether at least one item must meet it.

List operator scope options — all items or at least one item.

List operator scope options — all items or at least one item.

Negation

There are two ways to negate a filter, and they behave differently.

Option 1: Negate within the filter condition

Select a negating operator (for example, does not contain) from the dropdown. This matches only customers who have the attribute set but where the value doesn't meet the condition. Customers without the attribute set at all are excluded.

946

Option 2: Negate the entire filter

Click the N button on the right side of the filter. This inverts the entire condition and includes customers who don't meet it — including those who have no value set for the attribute at all. This returns a broader result set than option 1.

2310

Whole-filter negation using the N button — includes customers without the attribute.

Filtering logic

Bloomreach filtering is based on De Morgan's laws. When combining conditions with AND and NOT, follow this pattern:

  • Goal: Find customers who have marketing consent AND did not buy product_123 AND did not buy product_456.
  • Use: A AND (NOT B OR NOT C)

This correctly excludes anyone who bought either product, in line with De Morgan's laws.

that explain the boolean logic behind the operators OR and AND in terms of negotiation. Let's give you an example scenario: You would like to filter customers who had marketing consent AND who did NOT buy product_123 AND did NOT buy product_456. So you would like to exclude all users that bought product_123 and product_456. In the filtering, you should therefore use this filter logic: A AND (NOT B OR NOT C) as it agrees with De Morgan's laws.

📘

Condition limit

A single filter can contain a maximum of 26 conditions (A–Z).