> For the complete documentation index, see [llms.txt](https://docs.thewalletcrew.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thewalletcrew.io/configure/advanced-configuration/wallet/template-configuration/preview-and-preview-data.md).

# Preview and preview data

Preview a pass template as Apple Wallet and Google Wallet draw it, try other languages and themes, read the checks, and manage the preview data.

A pass template is mostly made of expressions that read the data of each pass. Without data, the preview would show blank fields; with the wrong data, it would hide problems that end-users will see. The preview of the editor therefore draws the pass with **preview data**, shows it in the different screens of each wallet, and lists what the phone will show differently.

The same preview appears on the pass page, where it uses the data of that pass.

<figure><img src="https://123508161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDJrf9G0l7ArnvuwEH0a8%2Fuploads%2Fgit-blob-f20d225532f4a49ca739f67dd2bc4529f257f660%2Ftemplate-editor-preview-retake.png?alt=media" alt="Preview column with the view menu, the preview data selector and the checks icon above an Apple Wallet stamp card"><figcaption><p>Above the pass: the view menu, the preview data selector and the checks icon.</p></figcaption></figure>

## Preview

### Device and view

The preview shows either Apple Wallet or Google Wallet. On the General tab, a toggle switches between the two; the Apple and Google tabs show their own wallet.

The **view menu** chooses which screen of the wallet is drawn, because the same pass looks different on the front, in the details, in a notification or on a watch.

| Apple Wallet view      | What it shows                                                                                                                                           |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Pass                   | The pass as Wallet opens it, with its featured actions.                                                                                                 |
| Pass Details           | The page opened from ⋯: settings and back fields.                                                                                                       |
| Event guide            | Opened from the Event Guide tile of a poster event ticket: venue shortcuts, tailgating, entrance. Listed only when the ticket meets Apple's conditions. |
| Additional ticket info | Opened from the Additional Ticket Info tile of a poster event ticket: its additional info fields.                                                       |
| Wallet list            | The pass among the holder's other passes, where only its top strip shows. An expired or voided pass is in the Expired list instead.                     |
| Add sheet              | What the holder sees before tapping Add.                                                                                                                |
| Notification           | The lock screen when the pass is updated with a message.                                                                                                |
| Apple Watch            | The pass in Wallet's list on Apple Watch, then the details screen a tap opens.                                                                          |

When the template declares a poster layout, the menu also chooses the **Layout** drawn: Poster or Classic.

| Google Wallet view      | What it shows                                                                          |
| ----------------------- | -------------------------------------------------------------------------------------- |
| Current view            | Google Wallet's default screen: the card, then its details, in one scroll.             |
| Previous view · Front   | The card shown after "Switch to previous view".                                        |
| Previous view · Details | The details page opened from ⋮ on the card.                                            |
| Home screen             | The pass tile on the Wallet home screen.                                               |
| Passes list             | How the pass appears in Wallet's Passes list and search.                               |
| Add to Wallet page      | The pay.google.com page shown before the holder taps Add.                              |
| Notification            | Google Wallet's notification for the pass on the Android lock screen.                  |
| Wear OS watch           | The pass on a Wear OS watch: the passes list, then the pass. The watch is always dark. |

A pass that is not active is shown as Google Wallet files it, under the archived passes.

<figure><img src="https://123508161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDJrf9G0l7ArnvuwEH0a8%2Fuploads%2Fgit-blob-cfde3789578a8c8ec8ebabac2116182a0313ccce%2Ftemplate-editor-view-menu-apple-retake.png?alt=media" alt="Apple Wallet view menu listing the views, the display settings and the preview settings"><figcaption><p>The Apple Wallet view menu.</p></figcaption></figure>

<figure><img src="https://123508161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDJrf9G0l7ArnvuwEH0a8%2Fuploads%2Fgit-blob-cf48e151be714d656049aa6326fd1449417ae6bf%2Ftemplate-editor-view-menu-google-retake.png?alt=media" alt="Google Wallet view menu listing the views, the display settings and the preview settings"><figcaption><p>The Google Wallet view menu.</p></figcaption></figure>

### Display and preview settings

The same menu changes the conditions of the preview, without changing the template:

* **Phone language**: one of the tenant's languages;
* **Preview theme**: no theme, the theme of the previewed pass ("On this pass"), or any theme of the tenant;
* **Phone appearance**: Light or Dark. Wallet's own screens follow the phone's appearance; the pass itself does not change;
* **Stamps** (stamp card): one stamp less or more, to try another count, and "Back to the pass's count";
* **Pass status**: Active, Expired or Voided, and "Use the pass's status". An expired or voided pass moves to Wallet's Expired list and its barcode is washed out.

While another status or stamp count is tried, the menu button changes color, as a reminder that the preview no longer shows the pass as it is.

The preview is drawn as close to the phone as possible; small differences with Wallet remain possible. Test on a real device before a large push.

### Notification text

The Notification views show a sample message adapted to the type of the template, for example "Thanks for your visit! 4 more stamps until your reward." on a stamp card. Clicking the notification lets a real message be written to try it. The text is kept in this browser, for this template and language only; nothing is sent. **Use the suggestion** restores the sample message.

### Checks

The checks open from the icon at the end of the preview menus, which shows a green tick when there is nothing to report. Titled "What the phone will show differently", they list every place where the wallet will not show what the form suggests. Each item has a level, and selecting it opens the field concerned:

* **Blocking**: the wallet refuses the pass, or a part of it does not work.
* **Check**: the pass works but probably not as intended.
* **Note**: a wallet behavior worth knowing.

<figure><img src="https://123508161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDJrf9G0l7ArnvuwEH0a8%2Fuploads%2Fgit-blob-c745301baf61f4991f63a6a76d58dd4f5a3ebb88%2Ftemplate-editor-checks-retake.png?alt=media" alt="Checks popover What the phone will show differently with a Check item about low contrast, repeated under the Foreground color field"><figcaption><p>The checks open from the icon next to the preview menus; here a Check item about low contrast, also shown under the field.</p></figcaption></figure>

Apple Wallet items:

| Level    | Item                                                                                                                                          |
| -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| Blocking | No icon: Apple Wallet requires one, and the pass cannot be downloaded.                                                                        |
| Blocking | A "Go to location" featured action without a valid Apple Place ID.                                                                            |
| Check    | The "Go to location" place of a featured action renders as something that is not an Apple Place ID, or renders empty, for the previewed pass. |
| Check    | The pass is voided, or its expiration date is past: Wallet moves it to Expired as soon as it is added.                                        |
| Check    | A poster event ticket is incomplete and is drawn with the classic layout, or the event guide is missing a condition.                          |
| Check    | Values or labels are hard to read on the background (contrast below 3:1).                                                                     |
| Check    | The logo text is cut next to the poster logo.                                                                                                 |
| Note     | More than two featured actions: Wallet shows the first two.                                                                                   |
| Note     | More summary fields than the poster shows.                                                                                                    |
| Note     | The text under the barcode is long: Wallet cuts it on one line.                                                                               |
| Note     | With NFC, Wallet moves the barcode off the front, to Pass Details.                                                                            |
| Note     | Automatic colors are on: Wallet derives the poster colors from the artwork, while the preview shows the configured ones.                      |

Google Wallet items:

| Level    | Item                                                                                                                                                                                                                                          |
| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Blocking | Google Wallet will refuse the pass: a text-only barcode with an alternate text, a loyalty pass without a program logo, a gift card without a card number, or a wide logo without the logo it replaces (a theme can provide the missing logo). |
| Check    | A field whose template fails: Google shows it empty, and the pass is still issued.                                                                                                                                                            |
| Check    | The pass is not active: Google Wallet files it under archived passes straight away.                                                                                                                                                           |
| Note     | A pass that requires unlocking can only be added from the Wallet app on an Android phone.                                                                                                                                                     |
| Note     | Screenshots of the pass are blocked on Android.                                                                                                                                                                                               |
| Note     | A single-device pass can only be added on an Android phone.                                                                                                                                                                                   |

Checks on fields apply to both wallets: a template that fails (with a "Did you mean" suggestion when a variable name is close), a variable that the previewed pass does not have, an empty value (Wallet leaves the field out; add a default value to show something instead), or a part of a field that prints nothing.

## Preview data

Preview data are example data saved with the template. They give the preview realistic values while the template is designed, and they let a team keep edge cases at hand: a very long name, an expired offer, a member with no points.

The **Preview data** section of the General tab shows the entries of the template as cards, with their number next to the title, and an **Add preview data** tile.

<figure><img src="https://123508161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDJrf9G0l7ArnvuwEH0a8%2Fuploads%2Fgit-blob-18632de4b0c729adc0aad4d919a99335b756d78f%2Ftemplate-editor-preview-data-retake.png?alt=media" alt="Preview data section with a real pass card marked Previewing, a Sample data card and the Add preview data tile"><figcaption><p>Preview data cards: a real pass being previewed and a sample entry, each with its menu.</p></figcaption></figure>

### Two kinds of entries

* **Sample data**: values stored in the template, editable at will.
* **Real pass**: follows a pass of the template as it is now, read-only. Its data are not copied into the template.

The menu of each card offers **Edit**, **Duplicate**, **Set as default** and **Delete**; the card being previewed is marked **Previewing**. Names must be unique within the template. A deleted entry is removed from the template when the General tab is saved.

### Add preview data

**Add preview data** opens **New preview data**, with several starting points:

* **Start from a real pass**: the passes created from this template, searchable. Selecting a pass shows a **Name** field and a **Use** button: **Use** follows the pass as it is now, read-only; its menu offers **Copy and edit**, which takes the data once into sample data that can be edited.
* **From the template**: values for every variable the template reads, to fill in.
* **Start from scratch**: empty JSON, or pasted JSON.

<figure><img src="https://123508161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDJrf9G0l7ArnvuwEH0a8%2Fuploads%2Fgit-blob-60f2ea7890aae65cc4a97950bcc6c5797b2a9bcb%2Fpreview-data-new-preview-data-retake.png?alt=media" alt="New preview data dialog with the passes of the template to start from, and the From the template and Start from scratch options"><figcaption><p>The New preview data dialog: start from a real pass of the template, or without a pass.</p></figcaption></figure>

### Edit sample data

<figure><img src="https://123508161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDJrf9G0l7ArnvuwEH0a8%2Fuploads%2Fgit-blob-3e4f97d52801beca4a3717aa3cd0848978a59d1d%2Fpreview-data-edit-dialog-retake.png?alt=media" alt="Edit dialog of sample data with its name, the JSON listing every variable the template reads, and the Set as default option"><figcaption><p>The edit dialog of sample data created "From the template": every variable the template reads, ready to fill in.</p></figcaption></figure>

The edit dialog has a **Name**, a JSON editor and a **Set as default** option; the values must be a JSON object. When the template reads variables that the data do not contain, the dialog lists them ("variables read by the template are missing from this data") and **Add them** inserts them with empty values.

The JSON follows the shape returned by the data API: a `providers` array with one entry per data provider, each with its `name`, `namespace` and `values`. Any other JSON object is read as the values directly.

The core values a real pass carries, such as `serialNumber`, `lastUpdated` and the benefit statistics, are added automatically, so `{{ serialNumber }}` renders in the preview. The structure is described in [Pass data structure](https://docs.thewalletcrew.io/developers-guides/pass-architecture/pass-data-and-sync.md).

The preview follows the entries as they are edited, saved or not; they are stored in the template when the General tab is saved.

### Which data the preview uses

The preview opens on the default entry. Without preview data of its own, it moves to the first pass of the template, if there is one. The **Preview data** menu above the preview switches between entries, and **Use real data…** picks any pass created from this template: its data are read as they are now and not saved. The choice is kept for the browser session, so the General, Apple and Google tabs preview the same data.

## FAQ

<details>

<summary><strong>Is preview data visible to end-users?</strong></summary>

No. Preview data only feed the preview in the admin console. Passes always use their own data.

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.thewalletcrew.io/configure/advanced-configuration/wallet/template-configuration/preview-and-preview-data.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
