Data push
Property | Type | Description | ||
|---|---|---|---|---|
name | string | Unique name of the campaign (64 characters max). | ||
id | integer | read-only parameter Unique identifier of the campaign. | ||
audience | object | Optional. Specify which users will be targeted by this campaign (65535 bytes max, see Audience format). By default, all users will be targeted.
| ||
category | string | Optional. Android, IOS, or Web. Category of the campaign (64 characters max). Categories can be used on the application side to identify if and how the content should be processed. | ||
pushMode | string | Optional. Defines how the campaign is pushed. Valid values are:
Default value: real-time | ||
type | string | Type of data push. Valid values are:
| ||
startTime | string | Optional. The date at which the campaign should be started. The date shall conform to the following format: yyyy-MM-dd HH:mm'Z'.
Example: 2011-11-21 15:23Z | ||
endTime | string | Optional. The date at which the campaign should be finished. The date shall conform to the following format: yyyy-MM-dd HH:mm'Z'. Example: 2011-11-21 15:23Z | ||
timezone | string | Optional. The id of the time zone to use for the startTime and endTime dates Example: America/Los_Angeles | ||
body | string | Body of the datapush (65535 bytes max). Body format is defined by the type property. This field supports AppInfo markers. | ||
localization | object | Optional. Reach campaigns can be localized using an optional JSON object. The JSON key is a two-character language code as specified by the ISO 639-1 standard. The corresponding value is an object containing the localizable property body. Example:
"localization": {
"en": {
"body": "My english data push..."
},
"fr": {
"body": "Mon data push français..."
}
}
|
AppInfo markers are special strings which are replaced with user information (also known as appInfo) when the campaign is pushed. This is used to create personalized campaigns based on appInfo.
The format of the replacement string is ${<appInfo>} where <appInfo> is the key of the appInfo that should be replaced. The appInfo of a device can be updated using the Tag devices command or using the SDK’s sendAppInfo: function.
For instance, consider the following text:
Hello ${name}.
When the campaign is pushed on a device, ${name} is replaced with the content of the appInfo identified with key name for the corresponding user.
Since personalization works by replacing a marker by its related appInfo content, you have to make sure the user has the proper appInfo defined. Here we suppose the targeted user has an appInfo named ${name} with value being set to the name of the user.
See the format above to know which fields are supporting appInfo markers.
{
"name": "MyDatapush",
"type":"text/base64"
"deliveryTime": "when-started",
"body": "QWxsIHlvdXIgcHVzaCBhcmUgYmVsb25nIHRvIHVz",
}
