From 018452daf5760a7b51e26c9b4912c858da2a8f16 Mon Sep 17 00:00:00 2001 From: bobbyatsegment <93934274+bobbyatsegment@users.noreply.github.com> Date: Wed, 18 Jan 2023 14:31:44 -0700 Subject: [PATCH 1/2] Update actions.md --- src/connections/destinations/actions.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/connections/destinations/actions.md b/src/connections/destinations/actions.md index 09ab081bfc..09ff27f33b 100644 --- a/src/connections/destinations/actions.md +++ b/src/connections/destinations/actions.md @@ -127,9 +127,16 @@ The following type filters and operators are available to help you build conditi - **Event type** (`is`/`is not`). This allows you to filter by the [event types in the Segment Spec](/docs/connections/spec). - **Event name** (`is`, `is not`, `contains`, `does not contain`, `starts with`, `ends with`). Use these filters to find events that match a specific name, regardless of the event type. -- **Event property** (`is`, `is not`, `less than`, `less than or equal to`, `greater than`, `greater than or equal to`, `contains`, `does not contain`, `starts with`, `ends with`, `exists`, `does not exist`). Use these filters to trigger the action only when an event with a specific property occurs. You can specify nested properties using dot notation, for example `context.app.name`. If the property might appear in more than one format or location, you can use an ANY statement and add conditions for each of those formats. For example, you might filter for both `context.device.type = ios` as well as `context.os.name = "iPhone OS``"` +- **Event property** (`is`, `is not`, `less than`, `less than or equal to`, `greater than`, `greater than or equal to`, `contains`, `does not contain`, `starts with`, `ends with`, `exists`, `does not exist`). Use these filters to trigger the action only when an event with a specific property occurs. You can specify nested properties using dot notation, for example `context.app.name`. If the property might appear in more than one format or location, you can use an ANY statement and add conditions for each of those formats. For example, you might filter for both `context.device.type = ios` as well as `context.os.name = "iPhone OS``"` The `does` `not exist` operator matches both a `null` value or a missing property. +> info "Event property operators and supported data types" +> The following operators only support matching on values with a **string** data type: +> - `is`, `is not`, `contains`, `does not contain`, `starts with`, `ends with` +> Operators that support matching on values with either a **string** or **numeric** data type are as follows: +> - `is less than`, `is less than or equal to`, `is greater than`, `is greater than or equal to` +> `is true`, `is false` operators support matching on values with a **boolean** data type. + You can combine criteria in a single group using **ALL** or **ANY**. Use an ANY to “subscribe” to multiple conditions. Use ALL when you need to filter for very specific conditions. You can only create one group condition per destination action. You cannot created nested conditions. > info "Destination Filters" From 6b64e7275c2624fb520f69df1dbacf5a27860063 Mon Sep 17 00:00:00 2001 From: markzegarelli Date: Thu, 19 Jan 2023 09:35:20 -0800 Subject: [PATCH 2/2] Move data into a table to improve readability --- src/connections/destinations/actions.md | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/connections/destinations/actions.md b/src/connections/destinations/actions.md index 09ff27f33b..2c9b3e2e30 100644 --- a/src/connections/destinations/actions.md +++ b/src/connections/destinations/actions.md @@ -127,15 +127,29 @@ The following type filters and operators are available to help you build conditi - **Event type** (`is`/`is not`). This allows you to filter by the [event types in the Segment Spec](/docs/connections/spec). - **Event name** (`is`, `is not`, `contains`, `does not contain`, `starts with`, `ends with`). Use these filters to find events that match a specific name, regardless of the event type. -- **Event property** (`is`, `is not`, `less than`, `less than or equal to`, `greater than`, `greater than or equal to`, `contains`, `does not contain`, `starts with`, `ends with`, `exists`, `does not exist`). Use these filters to trigger the action only when an event with a specific property occurs. You can specify nested properties using dot notation, for example `context.app.name`. If the property might appear in more than one format or location, you can use an ANY statement and add conditions for each of those formats. For example, you might filter for both `context.device.type = ios` as well as `context.os.name = "iPhone OS``"` - The `does` `not exist` operator matches both a `null` value or a missing property. +- **Event property** (`is`, `is not`, `less than`, `less than or equal to`, `greater than`, `greater than or equal to`, `contains`, `does not contain`, `starts with`, `ends with`, `exists`, `does not exist`). Use these filters to trigger the action only when an event with a specific property occurs. + You can specify nested properties using dot notation, for example `context.app.name`. If the property might appear in more than one format or location, you can use an ANY statement and add conditions for each of those formats. For example, you might filter for both `context.device.type = ios` as well as `context.os.name = "iPhone OS``"` + The `does` `not exist` operator matches both a `null` value or a missing property. +{% comment %} > info "Event property operators and supported data types" -> The following operators only support matching on values with a **string** data type: +> Operators support matching on values with a **string** data type: > - `is`, `is not`, `contains`, `does not contain`, `starts with`, `ends with` -> Operators that support matching on values with either a **string** or **numeric** data type are as follows: +> +> Operators that support matching on values with either a **string** or **numeric** data type: > - `is less than`, `is less than or equal to`, `is greater than`, `is greater than or equal to` -> `is true`, `is false` operators support matching on values with a **boolean** data type. +> +> Operators that support matching on values with a **boolean** data type: +> - `is true`, `is false` +{% endcomment %} + +The available operators depend on the property's data type: + +| Data Type | Supported Operators | +| ----------------- | -------------------------------------------------------------------------------------------- | +| string | `is`, `is not`, `contains`, `does not contain`, `starts with`, `ends with` | +| string or numeric | `is less than`, `is less than or equal to`, `is greater than`, `is greater than or equal to` | +| boolean | `is true`, `is false` | You can combine criteria in a single group using **ALL** or **ANY**. Use an ANY to “subscribe” to multiple conditions. Use ALL when you need to filter for very specific conditions. You can only create one group condition per destination action. You cannot created nested conditions.