Previewing personalized content

See how your personalized content will look when populated with data.

When adding or editing content that contains 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., preview the appearance with actual values from sample data. The sample data can come from a member of a Preview GroupA preview group is audience group used for previewing personalized content in the dashboard. Wherever a personalization preview is available, you can select a preview group, and its group members’ attributes will appear for any Handlebars references to attributes. You can enable any preview group as a test group so you can send test messages to its group members. These messages appear as tests in Messages Overview. or from a random or specific ContactAny user in your project. Contacts are identified as either an Anonymous Contact or a Named User. Airship can set targeting data on these identifiers, which are also used to map devices and channels to a specific user.. You can also enter your own JSON sample data and override the data for any selected user. Message namespace data is available in previews.

Where message, TemplateReusable message content. Templates support personalization using merge fields and other logic., and SnippetA 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. previews appear, select View for Preview Data to open the configuration drawer. To close it, select Hide or select the arrow icon in the Preview Data drawer. Select and hold the drag handle icon () to drag the Preview Data element to a new position on the screen.

After configuring preview data, it persists in other screens within the same message, template, or Snippet. You do not have to reenter it. Within Sequences, preview data persists between the Manage and Performance screens and is independent of the preview data in individual messages.

Configure a preview data source

After entering content that contains Handlebars, select View for Preview Data, and then configure a data source in the drawer:

SourceDescriptionSteps
Preview GroupPopulate the personalized content using data associated with a member of a Preview GroupA preview group is audience group used for previewing personalized content in the dashboard. Wherever a personalization preview is available, you can select a preview group, and its group members’ attributes will appear for any Handlebars references to attributes. You can enable any preview group as a test group so you can send test messages to its group members. These messages appear as tests in Messages Overview.. Use this source to validate content rendering for known users instead of relying on actual audience data.Under Source, select Preview Group, select a group, and then select a member.
Random ContactPopulate the personalized content using data associated with a random user from the configured message audience. Use this source to validate content rendering for a range of actual audience members.

You can select from a list of up to ten users labeled with their channel type, such as email, SMS, or iOS. If the message does not require configuring an audience, or if the audience is All Users, the list is generated from all users in the project.
Under Source, select Random Contact, and then select a user. Select Refresh list for different users.
Specific ContactPopulate the personalized content using data associated with a specific user in your project. Use this source to validate content rendering for known recipients.

You can search for a Channel IDAn Airship-specific unique identifier used to address a channel instance, e.g., a smartphone, web browser, email address., Named UserA customer-provided identifier used for mapping multiple devices and channels to a specific individual., email address, or MSISDNThe mobile phone number of an individual in your Airship audience. Each MSISDN represents an individual mobile device.. Matches are labeled with their channel type, such as email, SMS, or iOS.
Under Source, select Specific Contact, search for an identifier, and select from the results.
Custom JSONModify the data for a selected source or provide your own. Use custom JSON to simulate various personalization scenarios.Select JSON, then Edit, enter or modify the current data, then select Apply JSON to see the changes in the preview. Select Reset to restore the unedited data and refresh the preview.

JSON sample data for Automations and Sequences

If your template or message is for an Automation or Sequence triggered by a 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., you will want to use sample data based on that event.

Enter Custom Event properties representative of an audience member, mirroring the properties object in a Custom Event object. See also Personalize messages using Custom Events.

The following are a Custom Event and the JSON you would enter when configuring preview data for that event.

Sample Custom Event
{
    "occurred": "{{event_time}}",
    "user": {
        "named_user_id": "user"
    },
    "body": {
        "name": "purchase",
        "subscribe": true,
        "properties": {
            "customer_name": "user",
            "total": 48,
            "cost_units": "USD",
            "purchase": [
                {
                    "qty": 4,
                    "item": "MLB regulation baseball",
                    "per": "$12",
                    "total": "$48"
                }
            ]
        }
    }
}

Example JSON for previewing personalization
{
    "total": 48,
    "cost_units": "USD",
    "purchase": [
        {
            "qty": 4,
            "item": "MLB regulation baseball",
            "per": "$12",
            "total": "$48"
        }
    ]
}