Audience selection
Objects that help you select and target an audience.
Atomic selector
Atomic selectors are the simplest way to identify a single device, i.e., app or browser installation, or a group of devices. These selectors are either a unique identifier for the device such as a Channel ID or metadata that maps to the device (or multiple devices) such as a tag.
One of- string
The simplest selector, which targets the entire audience.
- Tag selector object
A tag is an arbitrary bit of metadata used for targeting devices. A tag specifier may or may not have an associated group declaration, indicating a
OBJECT PROPERTIEStag groupthe tag belongs to, for example,{"tag": "silver-member", "group": "loyalty"}. If no tag group is specified, the defaultdevicegroup is used.- group string
- tag objectREQUIREDOne of
- string
- array<string>
Min items: 1, Max items: 100
- Segment selector object
The Segment ID.
OBJECT PROPERTIES- segment objectREQUIREDOne of
- string
- array<string>
Min items: 1, Max items: 100
- Channel selector object
The unique channel identifier used to target an open channel device or web device, i.e., web browser.
OBJECT PROPERTIES- channel objectREQUIREDOne of
- string
- array<string>
Min items: 1, Max items: 100
- Named User selector object
A
OBJECT PROPERTIESnamed_useris an alternate, non-unique name, mapped to a user profile in a different database, e.g., CRM, that can be used to target devices associated with that profile.- named_user objectREQUIREDOne of
- string
- array<string>
Min items: 1, Max items: 100
- Fire OS channel selector object
The unique channel identifier used to target a Fire OS device.
OBJECT PROPERTIES- amazon_channel objectREQUIREDOne of
- string
- array<string>
Min items: 1, Max items: 100
- Android channel selector object
The unique channel identifier used to target an Android device.
OBJECT PROPERTIES- android_channel objectREQUIREDOne of
- string
- array<string>
Min items: 1, Max items: 100
- Open channel selector object
The unique channel identifier used to target a device on an open platform.
OBJECT PROPERTIES- open_channel objectREQUIREDOne of
- string
- array<string>
Min items: 1, Max items: 100
- string
A long or short code the app is configured to send from. For example,
12345. - SMS ID selector object
Selects a single SMS device. The
OBJECT PROPERTIESmsisdnmust beopted_into receive notifications.- msisdn stringREQUIRED
The recipient phone number.
- sender stringREQUIRED
The sender that the app is configured to send SMS messages from.
- Static list selector object
A
OBJECT PROPERTIESstatic_listis a subset of your audience defined by a CSV file containing Channel IDs or Named Users.- static_list objectREQUIREDOne of
- string
- array<string>
Min items: 1, Max items: 100
- Subscription List selector object
An single instance or array of subscription list IDs.
OBJECT PROPERTIES- subscription_list objectREQUIREDOne of
- string
- array<ref>
An attribute object with a
TEXTschema type. Evaluates for the inclusion or exclusion of a text (string) attribute on a channel or Named User.An attribute object with a
NUMBERschema type. Performs value comparisons based on the number value for an attribute on a channel or Named User.An attribute object with a
DATEschema type. Performs absolute date comparisons for ISO-formatted date values or a relative date comparisons given an integervalueandprecision, e.g.,days,months. Use a date attribute to target a channel or Named User based on the date values.An attribute object with a
JSONschema type. Performs value comparisons based on the JSON value for an attribute on a channel or Named User.- Alias selector object
A legacy mechanism used for mapping devices to a customer ID, e.g., a CRM identifier. Superseded by
OBJECT PROPERTIESnamed_user.- alias objectREQUIREDOne of
- string
- array<string>
Min items: 1, Max items: 100
- APID selector object
A legacy identifier for targeting Android and Windows devices, superseded by
OBJECT PROPERTIESandroid_channel.- apid objectREQUIREDOne of
- string
- array<string>
Min items: 1, Max items: 100
The
activityobject defines the target audience based on lifecycle actions or Custom Event activity, using comparison operators on activity count and recency. Optionally include awhereobject, which filters for specific activity values.In the example to the right, the target audience is users who have opened your app from a notification from the “neowise” campaign at least twice, 3 days ago.
- string
A special selector used in Pipelines to indicate that the audience of the push is composed of the device or devices that activated the trigger. See Pipeline objects for more information.
Used in:
- Create experiment (A/B Test)
- Create Segment
- Experiment listing
- Experiment lookup
- Push to template
- Schedule a notification
- Schedule a templated push
- Scheduled experiment listing
- Segment lookup
- Send a push
- Subscribe or unsubscribe channels to/from subscription lists
- Update schedule
- Update Segment
- Validate a push
- Validate a template
- Validate experiment
Examples
Example audience selection by tag
{
"audience": {
"tag": "sfGiants",
"group": "favorite_teams"
}
}
Example SMS channel audience
{
"audience" : {
"sms_id" : {
"sender" : "12345",
"msisdn" : "15552243311"
}
}
}
Example audience segment
{
"audience" : {
"segment" : "<segment-id>"
}
}
Example audience of Named Users
{
"audience" : {
"named_user" : "user-id-54320"
}
}
Example audience of static list
{
"audience" : {
"static_list" : "name_of_list"
}
}
Audience selector (max 100)
An audience selector forms the expression that determines the set of channels to target.
One ofCompound selectors combine boolean operators (AND, OR, or NOT) with atomic or nested compound selectors.
Atomic selectors are the simplest way to identify a single device, i.e., app or browser installation, or a group of devices. These selectors are either a unique identifier for the device such as a Channel ID or metadata that maps to the device (or multiple devices) such as a tag.
Used in:
Audience selector (max 1000)
An audience selector forms the expression that determines the set of channels to target.
One ofCompound selectors combine boolean operators (AND, OR, or NOT) with atomic or nested compound selectors.
Atomic selectors are the simplest way to identify a single device, i.e., app or browser installation, or a group of devices. These selectors are either a unique identifier for the device such as a Channel ID or metadata that maps to the device (or multiple devices) such as a tag.
Used in:
- Create experiment (A/B Test)
- Experiment listing
- Experiment lookup
- Push to template
- Schedule a notification
- Schedule a templated push
- Scheduled experiment listing
- Send a push
- Update schedule
- Validate a push
- Validate a template
- Validate experiment
Compound selector
Compound selectors combine boolean operators (AND, OR, or NOT) with atomic or nested compound selectors.
One of- AND selector object
AND selector
OBJECT PROPERTIES- AND array
- OR Selector object
OR selector
OBJECT PROPERTIES- OR array
- NOT Selector object
NOT selector
OBJECT PROPERTIES- NOT objectOne of
Compound selectors combine boolean operators (AND, OR, or NOT) with atomic or nested compound selectors.
Atomic selectors are the simplest way to identify a single device, i.e., app or browser installation, or a group of devices. These selectors are either a unique identifier for the device such as a Channel ID or metadata that maps to the device (or multiple devices) such as a tag.
Used in:
- Create experiment (A/B Test)
- Create Segment
- Experiment listing
- Experiment lookup
- Push to template
- Schedule a notification
- Schedule a templated push
- Scheduled experiment listing
- Segment lookup
- Send a push
- Subscribe or unsubscribe channels to/from subscription lists
- Update schedule
- Update Segment
- Validate a push
- Validate a template
- Validate experiment
Examples
Example with implicit `OR`
{
"audience" : {
"tag" : ["apples", "oranges", "bananas"]
}
}
Example with nested selectors
{
"audience": {
"AND": [
{"OR": [
{"tag": "sports"},
{"tag": "entertainment"}
]},
{"tag": "language_en"}
]
}
}
Example `NOT` selector
{
"audience": {
"AND": [
{ "tag": "Federer fan" },
{ "NOT":
{ "tag": "Messi fan" }
}
]
}
}