custom property
dynamic
custom
getter/setter pair
Only select messages that have particular custom fields set to particular values.
@remarks Every key must correspond to a key in the custom message data that you have set. It is not necessary for all messages to have these keys.
Each value must be one of the following:
A string, equal to "exists"
or "!exists"
A 2-element array of [operator, operand]
structure. The operand must be either a
string or an array of strings (for the oneOf
operators). Valid operators are:
"=="
, "!="
, "oneOf"
, and "!oneOf"
.
Examples, assuming you have set a category
custom field on your messages:
// Only show messages that have no category set:
{ custom: { category: "!exists" } }
// Only show messages of that have the category "shoes"
{ custom: { category: ["==", "shoes"] } }
// Only show messages that have the 'topic' either "inquiry" or "reservation"
{ custom: { topic: ["oneOf", ["inquiry", "reservation"] ] } }
// Only show messages about shoes that are marked visible.
// this assumes you also have a custom field called `visibility`
{ custom: { category: ["==", "shoes"], visibility: ["==", "visible" ] } }
Implementation
external dynamic custom;