With Airship, you have the possibility to customize your message to each member of your audience by using dynamic content.
You can personalize messages using:
-
Properties from a Custom Event that triggers a journey or automation rule
-
External Data Feeds (personalization data from an external API)
Please note that message customization is not available for tags !
A - How to declare content variables
a) Customization with values
To send custom content to your users, you will need to use handlebars.
Airship will parse the dynamic field and associate it to the data in the data base.
Handlebars are defined as the following, for instance with the attribute “first_name” : {{first_name}}
b) Customization using a default value
Please note that we recommend to setup a default value, in case the attribute’s value doesn’t exist.
By informing a default value, you will make sure your users receive content and not a blank space !
Use the following variable to set it up : {{$def first_name "you"}}
In the exemple above, if the “first name” is not populated in the attribute, the value “you” will be displayed.
If you are willing to use the default value format of variable, it will not be necessary to use the standard format {{first_name}}.
c) Customization using operators
Airship provides you with other operators using dynamic content, you will be able to find all of them within the following documentation : Basic Syntax and Merge Fields which include the following :
-
If/Else Statements
-
Unless — The Negative If Statement
-
Equality Operators
-
Greater Than and Less Than
-
Combining Operators
-
Object and Array Notation
-
Setting Context Using #with
-
Using a Feed
-
Loop Through Objects and Arrays
-
Math Helpers
-
Format Dates and Times
B - Personalization from the Airship Interface
a) Message Templates
You have the possibility to create default message templates in which all your dynamic fields will be informed. This will help you send your push more efficiently when creating your message.
Your templates can be invoke directly from the “content step” in any push creation.
Visit the following documentation to know how to create your templates : Create Message Templates
b) Dynamic fields in push content
If you don’t have any predefined template, you may directly inform the dynamic fields in the content section during your push creation.
C - Personalization via the API
Sending push with dynamic content from the API will require to create a Message template (check section A-1) which you will be able to invoke with the template_id.
The template_id, can be called with the API endpoint : GET : /api/templates or directly from the Airship interface, by going to Messages > Templates.
Within your API body, you have the possibility to set up substitutions that will override the default values.
Please note that if no default value is defined, a substitution will be mandatory
Visit the following technical documentation section for all the information : Push to Template