Learn about the Cancel Voucher process template and the template’s components. how you can use the template to create a loyalty program process and execute the process.
Required Editions
| Available in: Lightning Experience in Enterprise, Performance, Unlimited, and Developer Editions |
| Available in: Orgs that have the B2C - Loyalty, B2C - Loyalty Plus, B2B - Loyalty, Loyalty Management - Growth, or Loyalty Management - Advanced license enabled |
What Does the Template Contain?
The template contains a rule and a parameter. The Cancel Voucher rule has only one rule step to update the status of the issued vouchers to loyalty program members and unused vouchers to Cancelled based on the input parameter, VoucherId. The parameter stores parameter values that the rule uses to cancel vouchers by updating the status to Cancelled.
| Rule Step Name | What Does the Rule Step Do? | Parameters used in the Step | What Does the Parameter Do? |
|---|---|---|---|
| Cancel Voucher | Cancels the already issued vouchers and unused vouchers based on the input parameters. | VoucherID | This input and output parameter stores the identifier of the voucher. |
| Status | This output parameter stores the Cancelled status of the voucher. |
How Can You Execute the Processes Created Using the Cancel Voucher Process Template?
Loyalty Management provides a Business API to execute processes created by cloning loyalty program process templates. You can integrate the external system and Loyalty Management with the CancelVoucher API by executing it as per the input parameter.
- The API is executed when you want to cancel vouchers to your loyalty members.
- The voucherId and voucher status are provided in the API request.
In the API, you must specify these values to execute the API for your cloned process:
- In the API endpoint, specify the API name of your cloned process.
- In the API request, specify the value for the parameter that’s used in the Cancel Voucher
rule.
You must specify the voucher Id and voucher status to cancel vouchers.
When you execute the API, it runs the loyalty program process and the process updates the Loyalty Program Member record using the value provided in the API request. If the process contains the Cancel Voucher rule step, the process selected in the step is automatically run to change the status of the voucher to Cancelled.
Examples of How You Can Use the Template
You can clone and extend the template based on your requirements. Here’s a way you can use the template:
| Use Case | How to Achieve the Use Case? |
|---|---|
|
Vouchers automatically expire after their expiration date in Loyalty Management. However, when vouchers are managed in external systems, each department can have a specific use of vouchers. For example:
These vouchers are from different systems. You may have the need to cancel such vouchers. |
To cancel different vouchers in different systems, you can create a separate clone of the API for each department. For example:
|