Defined properties JSON file
[
  {
    "property_name": "Channel",
    "type": "<event|user>",
    "cases": [
      {
        "value": {...}, // Refer to values spec below
        "condition": {...} // Refer to conditions spec below
      }
    ],
    "default_value": {...} // Refer to values spec below. This field is optional
  },
  ...
]

Property values

value in cases and the default_value can be a constant or another non-defined property on the same entity (eg event defined props will only refer to other properties on the event).
{
  "type": "<property|constant>",
  "value": <name of property|constant value>
}

Conditions

Each case produces a value for the defined property if the conditions evaluate to true. Notes:
  • Case statements are evaluated in order, so if the cases aren’t mutually exclusive, the value of the defined property will come from the first case to evaluate to true.
  • We currently only support 1 level of condition nesting beyond the top level, but this format can support more than that.
  • The conditions can be traversed to represent the logic in another format just as SQL case statements.
{  
  "clause_combinator": "<and|or>",
  "clauses": [...]  // Refer to clauses spec below
}

Clauses

{
  "property_name": "utm_source",
  "operator": "...", // Refer to operators spec below
  "value": ... // Refer to clause values spec below
}

Operators
These are the names we give operators internally. They’re reasonably readable, so we can just use them.
Operator
Description
=
Equal
!=
Not equal
contains
Contains
notcontains
Does not contain
isdef
Is defined
notdef
Is not defined
matches
Wildcard matches (SQL equivalent of ILIKE)
notmatches
Doesn’t wildcard match (SQL equivalent of NOT ILIKE)
includedin
Included in a collection of values
notincludedin
Not included in a collection of values