Personalization and Templates

Templates help you create messages quickly and provide a mechanism to personalize your messages for your audience. The way in which you personalize messages or create templates varies by channel and, in some cases, your audience.

Personalizing Messages Using Templates

Templates provide a way to script and re-create messages quickly. When you create a template, you set a design and message that you can resend. You create templates and personalize messages differently depending on the type of message you want to send.

You can create complex templates with merge fields for SMS, MMS, email, and open channel messages. You setup a template much like a standard message, and then you specify the template when sending a message to an Inline List of users (the Upload Users Audience option).

Templates support dynamic content variables (merge fields) that you can populate with personalized information for each individual recipient when you upload a list of users. You can also include dynamic content operators in your template to customize your message based on the merge fields you include in your uploaded list of users. With dynamic content operators, you can show or hide message, or loop through variables to list information in your message — for example, you could include a list of products in an email updating a user about their recent order.

Email Template WYSIWYG Editor

Airship includes a drag-and-drop editor to help you assemble HTML templates for email without having to write HTML yourself. The editor produces templates that you can be sure will work for any audience member and email client that accepts HTML emails. If and when new versions of Outlook and other clients come out, we make sure both your new and existing templates will work with them too.

 Note

While you cannot use dynamic content in the WYSIWYG email editor, you can switch to the custom HTML editor after you save your template and add dynamic content within the raw HTML. If you edit your WYSIWYG-created template's HTML, you will no longer be able to edit it with the WYSIWYG editor.

Merge Fields

You can use merge fields in templates — variables in your message that you want to populate with audience information, personalizing the message for each recipient.

When creating a template, you can specify merge fields with a variable name wrapped in double curly braces — {{merge_field}}. When you send a message based on the template, you populate merge fields by uploading an audience list with corresponding data to replace the variable, effectively "merging" it into your message.

Push Templates and the Personalization API

Push templates are intended for non-email channels and support push notifications and in-app messages. The setup is very much like a standard message. You can create push templates using the dashboard or the /templates API, but you can only send a message with a push template using the API.

Inline Lists and Templates

When sending a message to SMS, email, or open channels, you have the option to Upload Users as a CSV list. When you upload a list in this way, you can include additional merge data in your list, creating a sort of "inline" or single-use template.

Column titles in your list (or the create-and-send audience object in the API) that are not prefaced with ua_ are considered merge fields. You can reuse these column titles as variables in your message using {{column_title}} when you send a message this way.

Dynamic Content for Inline Lists

When writing a message using an inline list or the /create-and-send API, you can insert conditional logic to personalize messages for each audience member based on the information in your inline list — like a single-use template. Airship evaluates the conditions you include in your message to determine the content to send to each member of your audience.

Dynamic Content uses the following syntax:

{{#eq merge_field "string value"}}
    text appears when merge field contains "string value"!
{{/eq}}

For more information about dynamic content operators and how to use them in your templates, see Dynamic Content

Resources