# Wallet pass template & field mapping

Your wallet template defines what users see at the gate. Field mapping defines which Secutix data ends up in each wallet field. Start simple. Get barcode, event name, date, venue, and seat right. Add extra fields only when you know why they matter.

## Create the Event Ticket template

A template is the “model” of your ticket in Apple Wallet and Google Wallet. It’s what makes the pass look like your brand, and what decides which pieces of information are shown to the attendee.

You create it once, then you reuse it for every issued ticket. Most teams start with a single Event Ticket template. Even with small variations, you can often keep one template because the template engine supports variables and conditions in every customizable field, including colors and images.

You only create more templates when you need a completely different look or different content for some tickets. If you want the longer explanation, see [Template](https://docs.thewalletcrew.io/design/general#template).

<details>

<summary><strong>Real-world use cases</strong></summary>

Use multiple templates when you need a clearly different layout or set of fields.

* **Different product types:** a template for a **visit pass**, another for an **event ticket**, and another for a **season ticket**.
* **Different rooms / halls:** one template per room in a multi-room venue, so the pass highlights the right room name and entry info.
* **Venue configuration changes:** different templates when the same place has different setups (seated, standing, in-the-round).
* **Numbered vs free placement:** one template that shows **section/row/seat**, and another that focuses on **free seating**.
* **Different access experiences:** different templates when some shows need extra instructions (VIP entrance, early access, specific gate flow).

</details>

{% stepper %}
{% step %}

#### Create a new template

<p align="center"><a href="https://admin.thewalletcrew.io/tenant/~/passTypes" class="button secondary" data-icon="chevrons-right">Create a new template</a></p>
{% endstep %}

{% step %}

#### Choose “Use a pre-built”

<div data-with-frame="true"><figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2F3avOpFUuDwQu4SNxtLqD%2Fimage.png?alt=media&#x26;token=4cb6ec73-419e-4263-8485-255660262470" alt="Template creation options with “Use a pre-built” selected" width="375"><figcaption><p>Select <strong>Use a pre-built</strong> to start from the library.</p></figcaption></figure></div>
{% endstep %}

{% step %}

#### Pick the “Event ticket” template

<div data-with-frame="true"><figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2FYZYAh1xcmBWKfNquX9eL%2Fimage.png?alt=media&#x26;token=4290fa72-32d0-4267-bfdd-d93f93b375a1" alt="Wallet template selection when creating a new template" width="375"><figcaption><p>Pick the <strong>Event ticket</strong> template when creating your pass.</p></figcaption></figure></div>
{% endstep %}

{% step %}

#### Set the template name

Template naming matters. Secutix can target templates by name during distribution. If you plan multiple templates, set up routing rules in [Template selection (routing)](https://docs.thewalletcrew.io/connect/ticketing/secutix/template-selection).
{% endstep %}
{% endstepper %}

## Field mapping

The connector maps the most common ticket fields by default. In your template, open the advanced configuration editor to browse available Secutix data with autocomplete. Use the field list below to plan your mapping and debug values.

<div data-with-frame="true"><figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2FpnUOtIhnkLdv5zXgPO2G%2Fimage.png?alt=media&#x26;token=3f065b1a-dae7-4381-9ad7-da7704bc1461" alt="Field mapping UI: autocomplete information from Secutix" width="375"><figcaption><p>Field mapping UI with Secutix autocomplete.</p></figcaption></figure></div>

Use this page when you need to:

* Confirm which Secutix fields are available.
* Add extra computed fields to your pass payload.
* Debug which ticket fields you can reuse in your template.

To learn more about ticket template configuration, see [Event ticket](https://docs.thewalletcrew.io/design/event-ticket).

### Available fields

<details>

<summary><strong>Available fields (full list)</strong></summary>

This is the raw field catalog exposed by the connector. Treat it as a toolbox. You rarely need all of it.

| The Wallet Crew      | Secutix                                                                             | Example                                       |
| -------------------- | ----------------------------------------------------------------------------------- | --------------------------------------------- |
| firstName            | movementData.beneficiaryFirstname                                                   | Cyril                                         |
| lastName             | movementData.beneficiaryLastname                                                    | DURAND                                        |
| barCode              | movementData.barCode                                                                | 085035041335220306680099                      |
| ticket.zone3         | movementData.area                                                                   | Single Zone                                   |
| ticket.seatCategory  | movementData.seatCategory                                                           | Single Category                               |
| address.country      | operationData.siteAddress.countryCode                                               | FR                                            |
| address.address      | operationData.siteAddress.firstAddressLine                                          | 116, Avenue du Président Kennedy              |
| address.city         | operationData.siteAddress.locality                                                  | PARIS                                         |
|                      | operationData.siteAddress.phoneNumber                                               | 33-0156401516                                 |
|                      | operationData.siteAddress.webSite                                                   | <http://www.maisondelaradioetdelamusique.fr/> |
| address.zipCode      | operationData.siteAddress.zipCode                                                   | 75016                                         |
| ticket.zone1         | operationData.site                                                                  | House of Radio and Music                      |
| ticket.zone2         | operationData.space                                                                 | Studio 104                                    |
| ticket.price         | operationData.totalAmount                                                           | 0                                             |
| ticket.name          | operationData.performance                                                           | Wallet Show                                   |
| ticket.subName       | operationData.performanceAddOnName                                                  | An exceptional show                           |
| ticket.startDate     | operationData.performanceDate                                                       | 2024-07-01T20:00:00.000+02:00                 |
|                      | operationData.product                                                               | Wallet Show                                   |
|                      | operationData.productFamilyType                                                     | SINGLE\_ENTRY                                 |
|                      | operationData.productFamilySubType                                                  | SIMPLE\_TICKET                                |
| ticket.taxNumber     | movementData.TaxNumber                                                              | 12010124729                                   |
| expirationDate       | expirationDate                                                                      | 2024-02-23T00:03:46.627+01:00                 |
| ticket.orderId       | orderId                                                                             | 2389856                                       |
| ticket.contactId     | contactReference                                                                    | 897501                                        |
| ticket.fileId        | operationData.fileId                                                                | 2234582                                       |
| ticket.zone5         | movementData.row                                                                    |                                               |
| ticket.seatNumber    | movementData.seatNumber                                                             |                                               |
| ticket.zone4         | movementData.block                                                                  |                                               |
| ticket.priceCategory | operation.AudienceSubCategory                                                       |                                               |
| ticket.priceCurrency | operation.CatalogCurrency.CurrencyCode                                              |                                               |
| ticket.eventId       | operationData.eventId                                                               |                                               |
| ticket.entrance      | operationData.entrance                                                              |                                               |
| ticket.entranceCode  | operationData.entranceCode                                                          |                                               |
| ticket.floor         | operationData.floor                                                                 |                                               |
| ticket.seatQuality   | operationData.seatQuality                                                           |                                               |
| ticket.sector        | operationData.sector                                                                |                                               |
| ticket.canceled      | movementTicketData.TicketState is INVALIDATED or CANCELLED                          |                                               |
| address.longitude    | operationData.siteAddress.gpsLongitude or computed from address via Google Maps API |                                               |
| address.latitude     | operationData.siteAddress.gpsLatitude or computed from address via Google Maps API  |                                               |

</details>

## Mapping customization (advanced)

Use scripting only when the default field catalog isn’t enough. Add a custom script in the **Advanced** tab of the Secutix configuration page.

<p align="center"><a href="https://admin.thewalletcrew.io/tenant/~/integrations/secutix/settings" class="button secondary" data-icon="chevrons-right">Secutix configuration screen</a></p>

This is useful when you need to:

* Map a Secutix value that isn’t exposed yet.
* Build a computed field (format, concatenation, conditional value).
* Normalize values so templates stay clean (example: always output a single “entranceLabel” field).

Register `extensions.secutix.movement.mapper` and implement `MapFromSecutix`.

```javascript
/**
 * Extend the default mapping from Secutix to Wallet Crew.
 *
 * Add any extra fields on `entity`. They become available for template rendering.
 *
 * @param {Object} params
 * @param {Object} params.Movement - Movement information from Secutix Web Service.
 * @param {Object} params.Operation- Operation information related to the current Movement from Secutix Web Service.
 * @param {Object|null|undefined} params.Product - Nullable product information related to the current Movement from Secutix.
 * @param {Object} entity - Target wallet entity to enrich.
 */
function mapFromSecutix(data, entity) {
  // Example: expose a Secutix field as an extra wallet field
  const stageVisibility = data?.Movement?.StageVisibility;
  if (stageVisibility != null) {
    entity["ticket.stageVisibility"] = stageVisibility;
  }
}

export default function(context) {
  context.register('extensions.secutix.movement.mapper', {
    MapFromSecutix: mapFromSecutix
  });
}
```

If you plan to run multiple ticket templates, configure routing rules in [Template selection (routing)](https://docs.thewalletcrew.io/connect/ticketing/secutix/template-selection).
