Null handling
You can't use the literal null in filter criteria. When a profile doesn't include a trait that your criteria reference, any comparison against that trait evaluates to false. The profile is therefore excluded from the results instead of causing an evaluation error.
profile.trait.Account.status == "active"
A profile with no Account.status trait doesn't match this condition. It is excluded, just like a profile whose Account.status is set to any value other than "active".
To distinguish "the trait is missing" from "the trait doesn't equal this value," use the has() function.
has(profile.trait.Account.status) && profile.trait.Account.status != "active"
Although null isn't valid inside filter criteria, a missing trait can still appear as the JSON value null when it is projected into a snapshot through snapshot variables.
- Review supported operators and precedence.
- Learn about type matching.
- Review example criteria for common filtering patterns.