Content Templates

Use content templates to personalize messages with information specific to each member of your audience, like first name, flight number, or order status. You can even pass complicated variables to your template.

About content templates

You can create content templates for all messaging channels:

After creating content templates in the dashboard, you can select them in the Content step in a composer or by using the template property with the API.

In the composers, for App, Web, SMS/MMS, and Open channels, the template content replaces your message content as is; for Message Center, In-App Automation, and Email, you can edit your message content after selecting the template.

You can assign keywords to your templates so they are easily found in search.

 Tip

You should name your templates according to the sources they use for personalization, so it’s clear when and where you can reuse your template.

Content template format

A content template has a name, optional description, and fields that make up the viewable content in a message.

TemplateFields
App (Push notification)
  • Message text — The text that will display in your push notification.
  • Title — A heading that appears above the notification text when applicable.
  • Summary — Supplemental text displayed with the notification.

    • iOS 10 and later — The summary appears below the push notification title.
    • Android and Amazon — The summary appears below the main notification text in most cases. This is the only visible text other than the title when Android Picture is visible in expanded mode, as the main notification text is suppressed.
Message Center
  • Title — A heading that appears above the message and in the Message Center inbox.
  • Message body — The HTML body of your message, created using the Interactive EditorA tool for creating content for landing pages, Message Center, email, and in-app automation. You can provide your own HTML or design using the drag-and-drop WYSIWYG option. .
In-App Automation
  • Message body — The HTML body of your message, created using the Interactive EditorA tool for creating content for landing pages, Message Center, email, and in-app automation. You can provide your own HTML or design using the drag-and-drop WYSIWYG option. .
Web
  • Alert — The text that will display in your web push notification.
  • Title — A heading that appears above the message.
SMS
  • Message text — The text that will display in your SMS message.
MMS
  • Subject — A meaningful subject to summarize your MMS message.
  • Message text — The text that will display in your MMS message.
  • Fallback SMS text — Fallback text version of your message, for use when MMS is unavailable.
Email
  • Subject — A meaningful subject to summarize your email.
  • HTML body — The HTML body of your email, created using the Interactive EditorA tool for creating content for landing pages, Message Center, email, and in-app automation. You can provide your own HTML or design using the drag-and-drop WYSIWYG option. .
  • Plain text body — The plain-text version of your message, for use when HTML is unavailable.
Open channel
  • Alert — The text that will display in your open channel message.
  • Summary — Supplemental text displayed with the notification.
  • Title — A heading that appears above the notification text when applicable.
  • Media attachment URL — The URL for media you want to include in your message.

Using the Interactive editor

When adding the email HTML body, or In-App Automation or Message Center Message body, you can use the Interactive EditorA tool for creating content for landing pages, Message Center, email, and in-app automation. You can provide your own HTML or design using the drag-and-drop WYSIWYG option. to:

  • Paste or upload your own HTML.
  • Design using the WYSIWYG option. You can start from a blank layout, or select an Airship default layout or a layout you saved. The WYSIWYG editor supports Merge FieldsA variable in your message or template that you want to populate with a personalized value for each member of the audience. Merge fields use Handlebars syntax — {{merge_field}}. , so you can personalize your message for your audience.

Personalizing content templates

You can use our built-in tool to insert merge fields and logic statements for the AttributesMetadata that you can use for audience segmentation. Attributes differ from tags in that when evaluating users with attributes, Airship uses operators, e.g., equals, less than/greater than, contains, before/after, to determine whether or not to target a user. Supported attribute types are TEXT, NUMBER, and DATE. in your project. See: Simplifying handlebars expressions. You can also manually enter 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. . Both methods are available for all text fields in a template, including when you paste or upload HTML using the Interactive editor.

 Important

When using handlebars to reference variables, you should define default values for your fields with {{ $def field_name "default value" }}. The template preview renders variables without default values as blank spaces, mimicking the behavior your audience will experience if they receive messages with unpopulated variables.


When personalizing messages in the WYSIWYG editor, you must define merge fields before you can use them to personalize blocks of content unless you write your own custom HTML blocks. (You can personalize custom HTML blocks 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. like you would any other message.) See: Merge fields in the WYSIWYG editor.

 Tip

You can also take advantage of looping (#each), conditional if/else statements, and other advanced 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. inside custom HTML blocks. However, you cannot apply conditional or looping logic to block-level elements in your template without defining merge fields in the WYSIWYG editor first.

Creating a content template

  1. Click   and select Template, or go to Messages » Content » Templates and click Create template.

  2. Enter a Name and a brief Description to help you identify the template in lists (e.g., “Holiday 2020”), and select the Channel.

  3. (Optional) Add keywords help organize your templates. Enter a term in the search field and select from results, or click Add keyword: [term]. Click   to remove a keyword. You can add up to 10 keywords.

  4. Click Save and continue.

  5. Enter your content. The preview updates as you type. Open channel templates do not have a preview.

    Click Add   and add content for each field, then click Done.

    For email HTML body, and Message Center and In-App Automation Message body, provide your HTML or design using the WYSIWYG editor.

    • For HTML, click Paste HTML or Upload HTML file, and add your HTML.
    • For the WYSIWYG editor, select a default or saved layout, or select Blank Layout to design your own; you can edit any layout after selecting. Then design your message. See the WYSIWYG editor for details.

  6. (Optional) Preview your email in different clients.

    1. Click Inbox preview.
    2. Select from the lists of browser, desktop, and mobile clients, then click Generate previews.
    3. Click a thumbnail to see the full version. Click   to close and choose another preview.
    4. (Optional) To add/remove clients, click Reselect and generate previews and start over.
    5. When you are finished with inbox previews, click   to close the modal.
  7. Click Save template when you are done adding content.

Using a content template

You can select a template in a composer’s Content step.

  • For In-App Automation, you must select Modal or Fullscreen in the Style step, then you will see the option to use a template in Content.
  • For Message Center, In-App Automation, and Email, you can edit the HTML or WYSIWYG design in the Interactive editor after selecting a template.

In the API, you can use a template property to invoke a template, either by ID or to personalize your message with 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. . See: Platform Overrides with Templates.

If you want to reference templates by ID, you must get the ID from Messages » Content » Templates in the Airship dashboard. Not supported for In-App AutomationMessages that are cached on users’ devices and displayed when your users meet certain conditions within your app, such as viewing a particular screen or opening the app a certain number of times. .

Managing content templates

Messages » Content » Templates lists your templates. Templates marked Empty do not have message content; you cannot use Empty templates in messages until you edit and populate them.

  1. Go to Messages » Content » Templates.
  2. Find the template you want to manage. You can search by name, channel, keyword, or ID.
  3. Click an icon to make changes.
    •   = Edit. Click edit next to the template name to edit its name, description, and keywords.
    •   = Duplicate
    •   = Delete