Segment Criteria and Conditions
The Segment Builder allows you to define a set of contacts based on a variety of dimensions, using logical AND or OR conditions. These segments are used to target your marketing efforts to specific groups of customers.
Segment criteria
Segment conditions come from fields in your Snowflake tables. These conditions are defined using the following qualifier types:
The format of each condition depends on the content of the field - some common examples are date ranges, status is/isn’t active/cancelled/expired (i.e. subscription), and numeric value entry (i.e. average order value).
Dates
All dates and times in Simon are UTC (Universal Time Coordinated).
Dates can be qualified in the following ways:
Operator | Description |
---|---|
is | Refers to a specific calendar date, 12:00AM-11:59PM UTC |
is before | This is relative, referring to an event taking place earlier than number of days or weeks, ago or from now (example: ‘Last login date is before 2 weeks ago’ would populate contacts who have not logged in to their account in the last 2 weeks) |
is before date | This refers to an event taking place before a specific date |
is after | Refers to an event taking place some time period after a date. The date is defined relative to now using a number of days or weeks, ago or from now (example: ‘Last order date is after 5 days from now’ would populate contacts 5 days after they place an order) |
is after date | Refers to an event taking place after a specific date |
is between | Between two time periods, inclusive of the first and exclusive of the second. Note, the left bound must be longer ago than the right. For example if you're looking to confirm purchases between two and eight months ago you need to included the created date/time in the segment editor as "is between 8 months ago and 2 months ago." Including it with 2 months first will result in an empty window. |
is between dates | Refers to an event taking place between two specific dates, inclusive of the first and exclusive of the second |
is null | Contains no value |
is not null | Contains a value |
Note, when qualifying a date by a number of months, the actual number of days in each month is taken into account.
Numbers
Numbers can be conditioned in the following ways:
Operator | Description |
---|---|
equals | = |
is not equal to | != |
greater than | > |
greater than or equal to | >= |
less than | < |
less than or equal to | <= |
is between | Between to numbers, inclusive of the first and exclusive of the second |
is null | Contains no value |
is not null | Contains a value |
Strings
Strings are single text values.
Strings are very versatile; they can be qualified in many ways, including:
Operator | Description |
---|---|
is | Requires an exact match between the criteria and the data field |
is not | Populates any records that are not an exact match |
contains | Populates records that have the criteria found anywhere in the string |
does not contain | Populates records in which the search criteria is not found |
begins with | Populates records that begin with a specific character |
does not begin with | Populates records that don't begin with a specific character |
ends with | Populates records that end with a specific character |
does not end with | Populates records that don't end with a specific character |
like | Populates records that are similar to the specified character(s) |
is not null | Contains a record |
null | Contains no record |
Booleans
Booleans are a true/false flag. They can also be nulls.
Operator | Description |
---|---|
is true | equals TRUE |
is false | equals FALSE |
is null | Contains no value |
is not null | Contains a value |
Arrays
Arrays are groups, or lists, of related strings.
Operator | Description |
---|---|
includes | Populates records that exactly match the search criteria |
does not include | Populates records that exclude the exact search criteria |
is available | Arrays are considered available if they're present and have more than 0 elements |
is not available | Arrays are considered not available if they're not present or have 0 elements |
Condition groups
When adding many conditions and mixing AND with OR, it might be necessary to use multiple groups to clarify logic. For example:
Note, nested segmentation is on our roadmap for future updates.
Updated 5 months ago