Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Issue Digital Pass
This action is available in API version 66.0 and later.
Supported REST HTTP Methods
- URI
- /services/data/v68.0/actions/custom/issueDigitalPass/actionName
- 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.
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.
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.
Outputs
For Issue Digital Pass, the action returns a URL that can be used to create or add the digital pass to a supported wallet.
Examples
This section has the sample request and response for issuing the digital pass.
- Sample Resource
- /services/data/v66.0/actions/custom/issueDigitalPass/Gift%20Card
- Sample request
-
Here’s an example POST request for Gift Card Digital Pass.
1{ 2 "inputs": [ 3 { 4 "partyId": "0lMSG0000001Q8X2AU", 5 "sourceRecordReferenceId": "0lMSG0000001Q8X2AU", 6 "barcode": "GC-45879234", 7 "expiryDate": "2026-12-31" 8 } 9 ] 10} - Sample response
-
Here's a sample response for the Issue Digital Pass action. The output structure is the same for both template types. If the digital pass template is inactive or misconfigured, the action returns an error.
1{ 2 "actionName": "Gift_Card", 3 "errors": null, 4 "isSuccess": true, 5 "outputValues": { 6 "digitalPassUrl": "https://wallet.example.com/pass/refresh/9f3a8c7b" 7 } 8}