You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Syntax |`trait({s: String})` <br> `s` - the name of the the trait to reference |
62
+
| Syntax |`trait({s: String})` <br> `s` - the name of the trait to reference|
63
63
| Return Type |`ScalarExtractor`|
64
64
| Description | Similar to the event operator, the trait operator is used to specify profile trait filter criteria. |
65
-
| Notes | You can reference other audiences by using the audience key as the trait name. |
65
+
| Notes | You can reference other audiences by using the audience key as the trait name. Also note that inclusion of a `.` signifies traversal through nested structures. If the trait name contains a literal dor, it must be escaped using `\\`|
| Syntax |`property({s: String})` <br> `s` - the name of the property to build an extractor for <br> In the context of funnel audiences, you can add a parent prefix to reference the parent event. <br> `property(parent: {s: String})`|
71
79
| Return Type |`ScalarExtractor`|
72
-
| Notes | Only valid within a `where` function or a Reducer. |
80
+
| Notes | Only valid within a `where` function or a Reducer. Also note that inclusion of a `.` signifies traversal through nested structures. If the property name contains a literal dor, it must be escaped using `\\`|
73
81
| Example |`property('total')`|
74
82
75
83
|`context`||
@@ -81,9 +89,10 @@ The following tables list the query languages's available functions.
| Syntax |`literal({a: Any})` <br> `a` - the value to treat as a literal expression |
92
+
| Syntax |`literal({a: Any})` <br> `a` - the value to treat as a literal expression |
85
93
| Operations allowed in call-chain | None allowed; typically used within another function, like a comparison (with syntactic sugar, this would appear on the right side of the comparison). The outer function or comparison dictates the operations allowed in the call-chain. |
86
-
| Example |`literal(100)` <br> |
94
+
| Notes | Literals can be `int`s, `float`s, `string`s, or `timestamp`s, where `timestamp`s follow ISO 8601 format. Note that in general `string` is interchangeable with all other formats, except when used in a `property` chained to an `entity`. In this case, we recommend using `timestamp` over `string` based on the datatype you're targeting. |
95
+
| Example |`literal(100)` or `literal('value')` or `literal(2022-10-17T00:00:00)`|
87
96
88
97
89
98
@@ -269,18 +278,27 @@ The following tables list the query languages's available functions.
269
278
| Syntax |`one_of({a: Array})`<br>`a` - array of possible values |
270
279
| Return Type |`Comparator`|
271
280
| Description | Matches when the value exactly matches one of the values from the parameter array. |
@@ -474,6 +492,30 @@ This example collects all accounts where any associated users performed the `Sho
474
492
ANY event('Shoes Bought').count() >=1
475
493
```
476
494
495
+
#### Associated with Orders that have an association to Order Products
496
+
497
+
This example collects all users which have at least 1 association to an `orders` entity where the `orders` entity has at least 1 association to an `order-products` entity:
This example calculates the most frequent spend value for each user, based on all `Shoes Bought` events performed within the last 30 days. It only considers spend values that have a minimum frequency of `2`:
0 commit comments