About Personalization
Use personalization to customize messages with user-specific data, ensuring timely and relevant content for each audience member.
Personalizing content
To personalize content in Airship, create a merge field representing a value you want to personalize, surrounded by double curly braces, e.g., {{firstname}}
. Airship replaces the merge field (and braces) with the data specified by the merge field at send time — just like mail merge in a word processor or mail client.
Common uses of personalization:
Flight info — “Your departure gate for flight
{{flight_number}}
has changed to{{gate_code}}
.”Retail purchase updates — "
{{first_name}}
, we received your order{{order_number}}
and will send tracking information when it has shipped."Membership rewards program updates — “You reached
{{program_level}}
status and have been awarded{{points}}
bonus points!”
In the image below you can see {{program_level}}
and {{points}}
appear as Platinum
and 1500
in the message preview. See also: Previewing personalized content.
Handlebars syntax
Airship’s personalization features are implemented using the Handlebars templating language. We do not support all features described in handlebarsjs.com, only those described in our Handlebars reference documentation. It includes information about complex expressions that use logic operations such as AND, OR, NOT, greater than/less than, loops, math, and more.
Data sources
The data you use to personalize a message may be personal in nature (first name, birth date, city) or based on user behavior (purchase history, pageviews, app opens). That data can come from these sources:
- 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. — In addition to stored attributes you can use global attributes in the API for individual messages.
- Custom EventEvents that indicate that a user performed a predefined action, such as adding an item to a shopping cart, viewing a screen, or clicking an Unsubscribe button. Custom Events can trigger automation, including Sequences and Scenes. You can code them into your app or website, or send them to Airship from an external source using the Custom Event API. Custom Events contain properties that you can use to personalize messages. properties
- Inline ListAn ad-hoc, CSV-formatted list of email, SMS, app, web, or open channel addresses that you want to register and send a message to. Unlike static lists or segments, you upload this list when creating your message. Airship registers new addresses in the list as channels when you send the message. values (In the API, this is defined in a
/create-and-send
payload) — for SMS, email, and open channels only - External Data FeedsA connection to an external API. When you send a message, Airship uses a response from that API to personalize messages.
- CouponsA service for adding promotional codes to messages. You provide a CSV file with the codes and other optional campaign data and reference the data using Handlebars in your message content. When you send the message, Airship uses the information from your uploaded CSV file to insert the code into the message.
- Message namespace properties
Evaluation order
You can use multiple data sources to personalize a single piece of content, which means it is possible for you to have two merge fields with the same name in the same expression, e.g., an attribute {{points}}
and an inline list value for {{points}}
.
If two fields share the same name, Airship attempts to use the value that is most relevant to your audience. This order isn’t guaranteed, but, in general, Airship attempts to use the following order:
- Custom event properties
- Inline list values
- Attributes
- External data feeds and Coupons feeds
You are advised to make sure your fields have unique names to prevent unintended personalization results.
What you can personalize
When creating a message, you can personalize:
- Viewable message elements:
- All message types — Message text/body
- Message Center — Title and Preview lines
- In-App Automation — Header, body, and footer, and button labels
- Email — Title and Subject
- SMS — Summary
- Open channels — Title
- ActionsA configurable behavior that occurs when a user interacts with your message, e.g., opening a web page. — Take advantage of information specific to your audience to personalize your audience’s experience when they interact with your message.
- Media URLs
You can also personalize reusable content:
- TemplatesReusable message content. Templates support personalization using merge fields and other logic.
- SnippetsA reusable piece of content that you can define in Airship for later use in your messages and templates. Snippets support text or HTML content and can be used for commonly used elements such as a copyright, header image, or custom CSS.
Start personalizing
First learn personalization formatting:
- Learn Handlebars syntax.
- Learn how to personalize using each data source:
- Learn how to personalize message actions and media URLs.
Then you can start personalizing your messages, templates, and snippets.
Categories