Design a template

Configure a template’s appearance and fields.

After you create a new template, you are prompted to start building the template design. Also follow these steps when editing an existing template.

 Note

The sample images on this page are for Google Wallet templates. Please refer to each step’s linked documentation for full detail for both Apple Wallet and Google Wallet template options.

If you just created a new template and clicked Start Building, your screen will be open to the template editor. If not, first open an existing template: Go to Templates, click anywhere in a template’s row to see its expanded view, then click Edit Design.

Now you can design your template:

  1. Configure the general settings that apply to the entire template rather than to a single field. Available properties vary per pass type. Return to these settings at any time by clicking the paintbrush icon in the upper right corner of the pass preview. Read more about general settings.
  2. Add images. Click in the preview to select each image. A modal window will open, specifying requirements and options. Read more about images.
  3. Edit the content and placement of the pass fields. Click in the preview to select a field and its configuration pane will display on the right side of the screen. You can edit the field ID, delete the field, change the position of the field on the pass, or remove the field from the layout. Read more about pass fields.
     Important

    Google Wallet Class fields are edited inline in the preview. Clicking on a class field will not expose a configuration pane. See: Template Editor Overview: Google Class Fields.

  4. Click Save at any point in the design process.

Now that you have a saved template, you are ready for the next steps:

Editing Template Designs

When you modify the design of a template, any new passes created from the template use the new and updated design, but you only affect currently installed passes if:

  • You add or remove a field on the pass. Airship automatically pushes the template update to installed passes to ensure that all passes contain the same fields as the template.
  • You publish your template changes to installed passes. You can schedule this operation or publish changes immediately, but this operation updates currently-installed passes to match the template.
 Note

Contact your Airship account manager if you want to update your template design but do not want new passes to use the new design yet (e.g., scheduling a branding change).

Publish Template Updates to Passes

When updating a template, if you don’t add or remove a field, your changes do not modify passes that were already generated from the template. To update current passes to match your template, you must publish changes to passes.

To publish template design changes to your existing passes:

  1. Click Templates and select the template you want to edit.
  2. Click Publish.
  3. Select the audience of passes you want to affect. You can publish your template design update to all users or a segment of passes.
  4. Determine when to publish template design updates — now, or a date and time in the future.
  5. Click Confirm Publish.

Use the Wallet API to Publish Template Updates

After you update a template, you can publish template design updates to existing passes using the wallet API.

  • Publish immediately: use the /template/{template_id}/passes API.
  • Schedule Updates: use the /schedules/{project_id} API.

You update field values on passes when you publish changes to a template. However, because you’re updating fields on an audience of passes, you should restrict field updates to information that you want to be uniform across passes in your audience segment.

Publish a template update immediately
PUT /v1/template/(templateId)/passes HTTP/1.1
Content-Type: application/json
Authorization: Basic <Base64 key>
Api-Revision: 1.2

{
   "fields": {
      "Loyalty Name": {
         "value": "Cool new loyalty program"
      }
   }
}

Publish a template update on a schedule
POST /v1/schedules/12345 HTTP/1.1
Authorization: Basic <Base64 key>
Content-Type: application/json
Api-Revision: 1.2

{
   "template": "12345",
   "name": "Loyalty program rebrand",
   "schedule": {
      "scheduled_time": "2020-07-25T00:00:00"
   },
   "update": {
      "audience": {
         "tag": "TZ_ET"
      },
      "pass": {
         "fields": {
            "Loyalty Name": {
               "value": "Cool new loyalty program"
            }
         }
      }
   }
}