Push API Personalization

Airship’s Push API now supports personalization using key/value pairs.

In addition to using HandlebarsHandlebars is Airship’s templating language for personalization. Handlebars expressions use double curly braces wrapped around a content template, ranging from a simple variable, e.g., {{first_name}}, to complex evaluations of personalization data. to personalize messages using stored AttributesMetadata used for audience segmentation and personalization. They extend the concept of Tags by adding comparison operators and values to determine whether or not to target a user, helping you better evaluate your audience. , you can use the new global_attributes object to add information external to Airship. The global attributes object may contain an arbitrary set of keys and values, including arrays and nested objects, which will be rendered in the message body.

You can use both stored attributes and global attributes in a single message, and also add External Data FeedsA connection to an external API. When you send a message, Airship uses a response from that API to personalize messages..

This example includes a stored attribute (first_name) and a global attribute (loyalty points value):

{
   "audience": {
      "ios_channel": "9c36e8c7-5a73-47c0-9716-99fd3d4197d5"
   },
      "notification": {
         "alert": "Hey, {{first_name}}, you’ve got {{points}} points to use! Redeem them today."
   },
	"device_types": [ "ios" ],
      "global_attributes": {
         "points": "100"
   }
}

And here is how it would appear on a user’s device:

To use this feature, see global_attributes in the API documentation for Push Object.