Pass Update Notifications
Send your pass holders a change message when you update their pass content.
Alert pass holders when their pass has been updated. For example, if their membership status has changed or if their loyalty points have increased, this would be an opportunity to notify the user and open the wallet pass for them to see that the pass has been updated.
Alerting pass holders when pass content has been changed is only available for Apple Wallet.
When a change message is posted to a user’s device, the screen displays a title and the pass’s icon image along with the notification. The user’s device will not play a sound or vibrate.
The title displayed with a notification is the company name associated with your Wallet account, unless you set a custom change message title for the template.
Each field object on an Apple Wallet pass can include an optional change message value. A change message is the text that appears in an alert that is displayed when a pass field’s value is changed.
The change message must include the escape value %@
, which is replaced by the field value when that value is changed. For example, if you enter the change message Gate changed to %@
and you later change the field value to A64
, the alert text would be Gate changed to A64
.
- If you don’t specify a change message, the pass holder isn’t notified when the field value changes.
- Setting a change message will not trigger sending a notification. The notification is triggered when you change the field value.
- When multiple fields with change messages are updated at the same time, we cannot control the processing order. That is handled by Apple.
Add a Change Message Using the Dashboard
- Go to Templates.
- Click anywhere in a template’s row to see its expanded view. If you have only one template in the project, the initial view is expanded.
- Click Edit Design.
- Select a field, click Advanced Options at the bottom of its configuration pane, then check the box for Notify the user when this value changes.
- Enter the text that you want to appear in the notification, including the placeholder
%@
for the field’s new value.Important A notification will not be triggered if
%@
is not in your change message. - Click Save.
Add a Change Message Using the API
The following is an example of a pass field that includes an optional change message value using the key changeMessage
. The value of changeMessage
is the text that will appear in the notification. The placeholder %@
for the field’s future value is required.
When updating a pass, if the specified value is different than what is currently included on the pass, then the change message will be displayed on the user’s device. The notification for the sample below would be The value for this field has changed to New text value
.
{
"fields": {
"TextField": {
"changeMessage": "The value for this field has changed to %@",
"value": "New text value",
"label": "Text Field Label"
}
}
}
Set a Custom Title For Change Messages
By default, the title of change message notifications for iOS is the company name associated with your Wallet account. In some cases, pass holders may not recognize this name as the issuer of the pass, so you may want to change it. You can set a custom title for change messages by adding a changeMessageTitle
field to your template. The default value set for the field becomes the new title of change message notifications.
To set a custom change message title for your template:
- Click Add a Field or Add Another Field. You can place the field anywhere, but we recommended adding it to the back of your pass template so that it is unobtrusive.
- Enter
changeMessageTitle
for the field ID, and click Add custom changeMessageTitle field. - Set the Field Type to Text.
- Change the Label Text to
Issuer
. - Enter a recognizable sender name for the Default Value. This value will be the title of all change message notifications for passes created from this template.
You can represent the field in the API as a changeMessageTitle
object in the fields
object of a template
"fields": {
"changeMessageTitle": {
"value": "Title for change messages",
"label": "Issuer",
"fieldType": "back"
}
}
The changeMessageTitle
value also appears in the pass preview card that is shown when a pass is shared by Messages or Mail.
Send a Pass Update
Now that you have a change message set, the alerts are handled automatically. After you edit the value of a field in a template and save the changes, you then need to give your pass holders the latest version of the pass, via the Update Pass API or by publishing changes in the dashboard.
Publishing changes only updates fields on the back of a pass. If you intend to send pass updates via Publish, add a Messages
field to back of the pass template, include a change message, and use the field for your change notifications.
Best Practices for Change Messages
Message Length: Keep your change messages short. The notification will be truncated if it’s too long, just like other notifications. If you need to deliver a longer message, consider using Wallet Push Notifications instead.
Spam: Do not change field values frequently. Multiple alerts will likely lead to users removing your pass.
Wallet Push Notifications: If you plan on sending promotional, marketing messaging or other general alerts to your users, consider using Wallet Push Notifications instead.
Categories