SegmentAudiencesOperators Reference

Operators Reference

This page documents all comparison operators available in the audience filter builder. Each operator is listed with its supported data types, behavior, and examples.

Operator Summary

OperatorStringNumberBooleanDate / TimestampDescription
EqualsYesYesYesYesExact match
Not EqualsYesYesYesYesInverse of equals
ContainsYesSubstring match
Not ContainsYesInverse of contains
Starts WithYesPrefix match
Not Starts WithYesInverse of starts with
Ends WithYesSuffix match
Not Ends WithYesInverse of ends with
Greater ThanYesYesStrict greater than
Greater Than or EqualYesYesGreater than or equal
Less ThanYesYesStrict less than
Less Than or EqualYesYesLess than or equal
BetweenYesYesInclusive range
Not BetweenYesYesOutside inclusive range
InYesYesMatch any value in a list
Not InYesYesMatch no value in a list
Is NullYesYesYesYesValue is null
Is Not NullYesYesYesYesValue is not null
Is TrueYesBoolean is true
Is FalseYesBoolean is false

String Operators

Equals

Exact match comparison. Case-sensitive by default.

FieldOperatorValueMatches
countryEquals"US"Entities where country is exactly "US"

SQL: country = 'US'

Not Equals

Inverse of equals. Matches entities where the field does not have the specified value.

FieldOperatorValueMatches
statusNot Equals"churned"Entities where status is anything except "churned"

SQL: status != 'churned'

Not Equals does not match null values. If status is null, the entity will not be included. To include nulls, combine with an OR Is Null condition.

Contains

Substring match. Returns entities where the field value contains the specified text anywhere within it.

FieldOperatorValueMatches
emailContains"@company.com"All emails containing "@company.com"

SQL: email LIKE '%@company.com%'

Not Contains

Inverse of contains. Matches entities where the field value does not contain the specified text.

FieldOperatorValueMatches
emailNot Contains"test"All emails that do not contain "test"

SQL: email NOT LIKE '%test%'

Starts With

Prefix match. Returns entities where the field value begins with the specified text.

FieldOperatorValueMatches
phoneStarts With"+1"All phone numbers starting with "+1"

SQL: phone LIKE '+1%'

Not Starts With

Inverse of starts with. Matches entities where the field value does not begin with the specified text.

Ends With

Suffix match. Returns entities where the field value ends with the specified text.

FieldOperatorValueMatches
emailEnds With"@gmail.com"All Gmail addresses

SQL: email LIKE '%@gmail.com'

Not Ends With

Inverse of ends with. Matches entities where the field value does not end with the specified text.

Numeric Operators

Equals / Not Equals

Exact numeric match. Same semantics as string equals/not equals.

FieldOperatorValueMatches
order_countEquals0Entities with exactly zero orders

Greater Than

Strict greater than comparison.

FieldOperatorValueMatches
lifetime_valueGreater Than1000Entities with lifetime value above 1000

SQL: lifetime_value > 1000

Greater Than or Equal

Greater than or equal comparison.

FieldOperatorValueMatches
order_countGreater Than or Equal5Entities with 5 or more orders

SQL: order_count >= 5

Less Than

Strict less than comparison.

FieldOperatorValueMatches
days_since_last_purchaseLess Than30Entities who purchased within the last 30 days

SQL: days_since_last_purchase < 30

Less Than or Equal

Less than or equal comparison.

FieldOperatorValueMatches
avg_session_minutesLess Than or Equal2Entities with average session 2 minutes or less

SQL: avg_session_minutes <= 2

Between

Inclusive range comparison. Matches entities where the field value is between the lower and upper bounds (inclusive of both bounds).

FieldOperatorLowerUpperMatches
lifetime_valueBetween100500Entities with lifetime value from 100 to 500

SQL: lifetime_value BETWEEN 100 AND 500

Not Between

Inverse of between. Matches entities where the field value is outside the specified range.

FieldOperatorLowerUpperMatches
ageNot Between1865Entities younger than 18 or older than 65

SQL: age NOT BETWEEN 18 AND 65

Boolean Operators

Is True

Matches entities where the boolean field is true.

FieldOperatorMatches
is_enterpriseIs TrueAll enterprise entities

SQL: is_enterprise = TRUE

Is False

Matches entities where the boolean field is false.

FieldOperatorMatches
has_opted_outIs FalseAll entities that have not opted out

SQL: has_opted_out = FALSE

Equals / Not Equals

Boolean fields also support equals and not equals with explicit true or false values. Functionally equivalent to Is True / Is False.

Date and Timestamp Operators

Date and timestamp fields support the same comparison operators as numeric fields (equals, not equals, greater than, less than, between), plus relative date values.

Absolute Dates

Enter a specific date or timestamp value:

FieldOperatorValueMatches
created_atGreater Than2025-01-01Entities created after January 1, 2025

Relative Dates

The filter builder supports relative date expressions that are computed at evaluation time:

ExpressionDescription
todayCurrent date
N days agoN days before today
N weeks agoN weeks before today
N months agoN months before today
N years agoN years before today

Example:

FieldOperatorValueMatches
last_purchase_dateGreater Than30 days agoEntities who purchased within the last 30 days
created_atBetween1 year ago / todayEntities created in the last year

Relative dates are re-computed on each audience evaluation, so the audience membership stays current as time passes.

List Operators

In

Matches entities where the field value is any one of the specified values. Enter values as a comma-separated list.

FieldOperatorValuesMatches
plan_typeIn"free", "trial"Entities on free or trial plans
countryIn"US", "UK", "CA", "AU"Entities in English-speaking countries

SQL: plan_type IN ('free', 'trial')

Not In

Inverse of In. Matches entities where the field value is not any of the specified values.

FieldOperatorValuesMatches
statusNot In"deleted", "banned"All active entities

SQL: status NOT IN ('deleted', 'banned')

Null Operators

Is Null

Matches entities where the field value is null (not set).

FieldOperatorMatches
phoneIs NullEntities with no phone number

SQL: phone IS NULL

Is Not Null

Matches entities where the field value is not null (has a value).

FieldOperatorMatches
emailIs Not NullEntities with an email address

SQL: email IS NOT NULL

⚠️

Null handling is important in audience definitions. Most comparison operators (equals, greater than, contains, etc.) return false when the field value is null. If you want to explicitly include or exclude null values, use the Is Null / Is Not Null operators.

Operator Behavior by Data Type

This matrix summarizes which operators are available for each data type:

OperatorStringNumberBooleanDateTimestamp
EqualsYesYesYesYesYes
Not EqualsYesYesYesYesYes
ContainsYes
Not ContainsYes
Starts WithYes
Not Starts WithYes
Ends WithYes
Not Ends WithYes
Greater ThanYesYesYes
Greater Than or EqualYesYesYes
Less ThanYesYesYes
Less Than or EqualYesYesYes
BetweenYesYesYes
Not BetweenYesYesYes
InYesYes
Not InYesYes
Is NullYesYesYesYesYes
Is Not NullYesYesYesYesYes
Is TrueYes
Is FalseYes

Next Steps