---
schema_version: "1"
id: 87d9f71b59aab9d923aec39c1780fd428c6c9107b07c4bd39d6cd7b92cc85e32
title: Overview of the Cancel Voucher Process Template
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/bapi_overview_of_the_cancel_voucher_process_template.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.bapi_overview_of_the_cancel_voucher_process_template.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 49a98052deeb07eef7bb67972db2052bc01cdc26cc5d74948a057f6bd25c0047
description: 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.
products:
  - Loyalty Management
release: "264"
---
# Overview of the Cancel Voucher Process Template

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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience in&nbsp;<strong>Enterprise</strong>,&nbsp;<strong>Performance</strong>, <strong>Unlimited</strong>, and&nbsp;<strong>Developer</strong>&nbsp;Editions</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Orgs that have the B2C - Loyalty, B2C - Loyalty Plus, B2B - Loyalty, Loyalty Management - Growth, or Loyalty Management - Advanced license enabled</td></tr></tbody></table>

## 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.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:25%">
          <col style="width:25%">
          <col style="width:25%">
          <col style="width:25%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d55870e82">Rule Step Name</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d55870e85">What Does the Rule Step Do?</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d55870e88">Parameters used in the Step</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d55870e91">What Does the Parameter Do?</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Rule Step Name" class="slds-cell-wrap" rowspan="2" style="vertical-align:top;" headers="d55870e82 ">Cancel Voucher</td>

            <td data-label="What Does the Rule Step Do?" class="slds-cell-wrap" rowspan="2" style="vertical-align:top;" headers="d55870e85 ">Cancels the already issued vouchers and unused vouchers based on the
              input parameters.</td>

            <td data-label="Parameters used in the Step" class="slds-cell-wrap" style="vertical-align:top;" headers="d55870e88 ">VoucherID</td>

            <td data-label="What Does the Parameter Do?" class="slds-cell-wrap" style="vertical-align:top;" headers="d55870e91 ">This input and output parameter stores the identifier of the voucher.</td>

          </tr>
          <tr class="">
            <td data-label="Parameters used in the Step" class="slds-cell-wrap" style="vertical-align:top;" headers="d55870e88 ">Status</td>

            <td data-label="What Does the Parameter Do?" class="slds-cell-wrap" style="vertical-align:top;" headers="d55870e91 ">This output parameter stores the Cancelled status of the voucher.</td>

          </tr>
        </tbody>
      </table>

## 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](https://developer.salesforce.com/docs/atlas.en-us.loyalty.meta/loyalty/connect_resources_cancel_voucher.htm) 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:

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d55870e187">Use Case</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d55870e190">How to Achieve the Use Case?</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Use Case" class="slds-cell-wrap" style="vertical-align:top;" headers="d55870e187 ">
              <p>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: </p>
              <ul>
                <li>Marketing manages event or access voucher. </li>
                <li>Operations manages free delivery vouchers.</li>
              </ul>
              <p style="margin-bottom:0;">These vouchers are from different systems. You may have the need to cancel such
                vouchers.</p>
            </td>

            <td data-label="How to Achieve the Use Case?" class="slds-cell-wrap" style="vertical-align:top;" headers="d55870e190 ">
              <p>To cancel different vouchers in different systems, you can create a separate clone of
                the API for each department. For example:</p>
              <ul>
                <li>Cancel Voucher API for Marketing Event</li>
                <li>Cancel Voucher API for Operations Free Delivery</li>
              </ul>
            </td>

          </tr>
        </tbody>
      </table>