Newer Version Available

This content describes an older version of this product. View Latest

Refresh Digital Pass

This action refreshes a digital pass to a specified party based on the configured digital pass setup. You can trigger the digital pass refresh using its corresponding custom invocable action.

This action is available in API version 66.0 and later.

Supported REST HTTP Methods

URI
/services/data/v66.0/actions/custom/refreshDigitalPass/actionName

<actionname> is the name of the custom action associated with the digital pass configuration.

Note

Formats
JSON
HTTP Methods
POST
Authentication
Authorization: Bearertoken

Inputs

Input parameters depend on the digital pass template type (Loyalty or Gift Card). At runtime, the system determines the template type and loads the corresponding parameters. These input parameters are applicable to both Loyalty and Gift Card digital passes.

Input Details
partyId
Type
string
Description
Required. The ID of the party (for example, Loyalty Program Member or Contact) to whom the digital pass is issued.
sourceRecordReferenceId
Type
ID
Description
Required. Reference ID of the source record initiating the digital pass issuance (for example, a transaction, membership record, or promotion).

Inputs when the template type is Loyalty

These parameters are optional and are created by default when the loyalty digital pass template is activated. Users can modify these values as needed.

Input Details
accountNameLabel
Type
string
Description
The account name displayed on the loyalty digital pass.
accountIdLabel
Type
string
Description
The account ID associated with the digital pass. Use this when issuing a digital pass for an account.
barcode
Type
string
Description
The barcode value displayed on the loyalty digital pass.
rewardPoints
Type
string
Description
The reward points balance displayed on the loyalty digital pass.
tier
Type
string
Description
The tier of the loyalty program member displayed on the digital pass.
memberType
Type
string
Description
The type of loyalty program member displayed on the digital pass.
expiryDate
Type
date
Description
The expiry date of the loyalty digital pass.

Inputs when the template type is Gift Card

These parameters are optional and are created by default when the gift card digital pass template is activated. Users can modify these values as needed.

Input Details
barcode
Type
string
Description
The barcode value displayed on the gift card.
cardNumber
Type
string
Description
The number displayed on the gift card.
value
Type
string
Description
The monetary value of the gift card.
expiryDate
Type
date
Description
The expiry date of the gift card.

Outputs

If a digital pass already exists for the specified partyId and sourceRecordReferenceId, the system refreshes the existing pass. If no digital pass exists for the specified party, the system silently exits without creating a new pass.

Output Details
errors
Type
List<String>
Description
A list of error messages if the operation fails.
isSuccess
Type
Boolean
Description
Indicates whether the operation is successful or not.

Examples

This section has the sample request and response for refreshing the digital pass.

Sample Resource
/services/data/v66.0/actions/custom/refreshDigitalPass/Gift%20Card
Sample request

Here’s sample request for the Refresh Digital Pass action. If a digital pass already exists for the specified partyId and sourceRecordReference, the system refreshes it. If no digital pass exists for the specified party, the system silently exits without creating a new pass.

1{
2  "inputs": [
3    {
4      "partyId": "0lMSG0000001Q8X2AU",
5      "sourceRecordReferenceId": "0lMSG0000001Q8X2AU"
6    }
7  ]
8}
Sample response

Here's a sample response for the successful refresh.

1{
2  "actionName": "Gift Card",
3  "errors": null,
4  "isSuccess": true
5}