Apple Wallet passes can be updated and users can be alerted to changes via notifications that light up their screen. |
Change Messages
Each field object on an Apple Pass can include an optional change message value. This is the text value that displays to users when a change occurs. The value text must contain the escape value %@
, which is replaced with the field’s new value. For example, “Gate changed to %@” where %@
is replaced with the new value for the associated field.
If you don’t specify a change message, the user isn’t notified when the field changes. |
API Example
The following is an example of a pass field that includes an optional change message value using the key changeMessage
. 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.
{
"fields": {
"TextField": {
"changeMessage": "The value for this field has changed to %@",
"value": "New text value",
"label": "Text Field Label"
}
}
}
Template Example
Change messages can also be specified with a template field in the Wallet Dashboard. To specify a change message for a field, select "Advanced Options" and specify a change message. Note, the change message must contain the escape value %@
, otherwise the message will not be displayed.
Best Practices
If you plan on sending promotional or marketing messages to your users, consider including a field on the back of a pass that always displays the latest message. This allows the message to persist after a user has dismissed the notification.
Notification Behavior
When a change message is posted to a user's device the screen will light up with the notification. The user's device will not play a sound or vibrate.
The title displayed with a notification will always be the "Company Name" associated with your Wallet account. This can be changed by visiting your Account Settings page.