Logical Operators
More complex queries will require that multiple filters be chained together as is the case for constructing:
- All who did/have any of these events/properties ...
- All who did/have all of these events/properties ...
- All who did/have all of these events/properties in order ...
Here's how we break the above queries down into filter attributes:
| English | Filter Code |
|---|---|
| All who did/have | |
| any of these | type: "or" |
| all of these | type: "and" |
| all of these in order | type: "then" |
| events/properties ... | operands: [...] |
It should be noted that date ranges within "then"-type Logical Operators are ignored.
Logical Operators Example
{
"type": "and",
"operands": [
{
"type": "event",
"negate": false,
"event": 123,
"frequency_occurrence": "at_least",
"frequency_value": 1
}
],
"date_range": {
"date_range_id": "last_7_days"
}
}Logical Operators Attributes
| Attribute | required/optional | value |
|---|---|---|
| type | required | "and", "or", "then" |
| operands | required | Array of Filter Objects |
| date_range | optional | Date Range Object |
