custom property

dynamic custom
getter/setter pair

Only select conversations that have particular custom fields set to particular values.

@remarks Every key must correspond to a key in the custom conversation data that you set (by passing custom to {@link ConversationBuilder.setAttributes}). It is not necessary for all conversations 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 conversations:

// only show conversations that have no category set:
{ custom: { category: "!exists" } }

// only show conversations of category "shoes"
{ custom: { category: ["==", "shoes"] } }

// only show conversations either category "shoes" or "sandals"
{ custom: { category: ["oneOf", ["shoes", "sandals"] ] } }

// only show conversations 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;