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. , you can preview its appearance by enabling Preview Data and using JSON sample data representing a member of your audience, without having to send test messages. You can supply your own sample data or select 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. , and those users’ attributes will appear in the message preview.

Dashboard locations

The Preview Data option appears in these locations in the dashboard:

After you select a preview group or enter your own sample data, it is available within Preview Data on any other screen within the same template, snippet, or message — you do not have to reenter it. However, within Sequences, Preview Data on the Performance and Manage screens operates independently of Preview Data available while composing messages.


You can click and hold   to drag Preview Data to a new position on the screen.

Previewing personalized content using a preview or test group

First create a preview group with at least one userA 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. , then follow these steps.

  1. Enter content that uses Handlebars.
  2. Enable Preview Data.
  3. Click the search field and select or search for a preview group. The preview on the screen updates with the attributes of a user in your selected group.
  4. Click     to select another user within the group, and the message preview will update with that user’s attributes.
  5. (Optional) Click JSON   to view the data for the selected user.
    • You can modify the field’s content and click Apply JSON to see the changes in the preview.
    • After applying JSON changes for a user, you can click Reset JSON to restore the unedited data.

Previewing personalized content using your own JSON sample data

  1. Enter content that uses Handlebars.
  2. Enable Preview Data.
  3. Click JSON  .
  4. Enter sample JSON, and click Apply JSON to see the changes in the preview.
    • Click Apply JSON again after editing the data.
    • Click Reset JSON to delete the field’s current content.
       Tip

      This JSON object mirrors the create_and_send audience object.

JSON sample data for automation and sequences

If your template or message is for an automated message or sequence triggered by a custom event, you will want to use sample data based on that custom event.

Enter custom event properties representative of an audience member, mirroring the properties object in a custom event. See also: Personalize automations and sequences using custom events.

The following are a custom event and the JSON you would enter in 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
{
    "total": 48,
    "cost_units": "USD",
    "purchase": [
        {
            "qty": 4,
            "item": "MLB regulation baseball",
            "per": "$12",
            "total": "$48"
        }
    ]
}