fields rather than body.
Events
MORF_API_PUSH_UPDATE
Accessing fields in CEL
Every key in your JSON is reachable from thefields variable with regular dot or bracket syntax, including nested objects and lists.
Given the example payload on the right:
There is no
body variable on this event source. Likewise, fields does not exist on the current event source, so expressions are not portable between the two without renaming the root variable.
Missing keys and optionals
Accessing a key that is not present in the payload raises ano such key error rather than returning null. That is fine for action parameters, which treat a missing key as an empty value, but it will fail a filter or wait node. Use one of these forms when a key may be absent:
fields.?foo is an optional value. It carries either a value or nothing, and it never errors. Call .orValue(fallback) to unwrap it with a default, or .hasValue() to test it.
JSON numbers arrive as CEL doubles because JSON has no integer type. Compare against
42.0 rather than 42 if you hit a type mismatch.