From b2be9989d9810a84c44bf2b0bab8080848e57b3f Mon Sep 17 00:00:00 2001 From: "will.i.am" <110120307+wilwong-segment@users.noreply.github.com> Date: Fri, 27 Jun 2025 16:02:03 -0700 Subject: [PATCH 1/2] Update to audience trait operators --- src/engage/audiences/index.md | 39 +++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/src/engage/audiences/index.md b/src/engage/audiences/index.md index 86259525b9..e4ef132ede 100644 --- a/src/engage/audiences/index.md +++ b/src/engage/audiences/index.md @@ -68,18 +68,31 @@ When you build an audience based on audience membership, you use existing audien To see which audiences reference a particular audience in their definitions, select the **Consumers** tab when viewing a classic or linked audience. This tab lists all dependent audiences, to help you understand and manage relationships between your audience segments. -### Time comparison - -You can use the following time comparison operators in your audience definition: -- `before date` -- `after date` -- `within last` -- `within next` -- `before last` -- `after next` - -Only ISO timestamps can be used with these operators. Additionally, these time comparison operators exclusively apply to custom traits. -If the timestamp is not a valid ISO timestamp (for example, a trailing `Z` is missing), Segment won't process the audience in real-time. Learn more about [real-time compute compared to batch](/docs/engage/audiences/#real-time-compute-compared-to-batch). +### Trait operators + +| Operator | Description | +|--------------------------- |---------------------------------------| +| equals | Matches exact value. | +| not equals | Does not match exact value. | +| less than | Value is less than specified. | +| greater than | Value is greater than specified. | +| less than or equal to | Value is less than or equal to specified. | +| grater than or equal to | Value is greater than or equal to specified. | +| contains any of | Includes any of specified values. | +| contains | Includes specified substring or value. | +| does not contain | Excludes specified substring or value. | +| starts with | Begins with specified substring. | +| ends with | Ends with specified substring. | +| exists | Value is present (not null). | +| not exists | Value is absent (null). | +| before date | Dates before specified date. | +| after date | Dates after specified date. | +| within last | Dates between X days ago and today. | +| within next | Dates between today and X days from now. | +| before last | All dates older than X days from today. | +| after next | All dates beyond X days from today. | + +Only ISO timestamps can be used with time comparison operators. If the timestamp is not a valid ISO timestamp (for example, a trailing `Z` is missing), Segment won't process the audience in real-time. Learn more about [real-time compute compared to batch](/docs/engage/audiences/#real-time-compute-compared-to-batch). **Note**: Timezones seen in the UI are based on your local timezone, but are converted to UTC on the backend. @@ -409,4 +422,4 @@ This error occurs when creating audiences that reference each other, meaning aud No. Traits located in the `context.traits` object of a Track event aren’t available in the Event Properties section of the Audience Builder. You can only use top-level event properties to define event-based audience conditions. ### How does the historical data flag work? -The **Include Historical Event Data** option lets you take past event data into account and control how much of it is considered when creating real-time audiences. You can set a lookback window (for example, the “last 90 days”) to limit the processed event data, or disable it entirely to use only data arriving after creation. For batch audiences, Segment includes historical data by default. \ No newline at end of file +The **Include Historical Event Data** option lets you take past event data into account and control how much of it is considered when creating real-time audiences. You can set a lookback window (for example, the “last 90 days”) to limit the processed event data, or disable it entirely to use only data arriving after creation. For batch audiences, Segment includes historical data by default. From 4abf113f4ebef6592919f705e3bc3e0f5395b35c Mon Sep 17 00:00:00 2001 From: "will.i.am" <110120307+wilwong-segment@users.noreply.github.com> Date: Fri, 27 Jun 2025 16:12:50 -0700 Subject: [PATCH 2/2] Update index.md --- src/engage/audiences/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/engage/audiences/index.md b/src/engage/audiences/index.md index e4ef132ede..acf8ea6025 100644 --- a/src/engage/audiences/index.md +++ b/src/engage/audiences/index.md @@ -78,6 +78,7 @@ To see which audiences reference a particular audience in their definitions, sel | greater than | Value is greater than specified. | | less than or equal to | Value is less than or equal to specified. | | grater than or equal to | Value is greater than or equal to specified. | +| equals any of | Matches any of specified values. | | contains any of | Includes any of specified values. | | contains | Includes specified substring or value. | | does not contain | Excludes specified substring or value. |