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.
Cancel a Voucher
Change the status of a voucher to canceled.
Example URL
1https://yourInstance.salesforce.com/services/data/v68.0/connect/loyalty/programs/DemoProgram/program-processes/cancel VoucherThe request and response parameters vary depending on the input and output parameters configured for the CancelVoucher process type in a Salesforce org.
Sample JSON Requests
Here's a sample request with a member ID and voucher ID
1{
2 "processParameters":[
3 {
4 "MemberId":"0lMxx00000000BJEAY",
5 "VoucherId":"0kdxx000000000B245"
6 }
7 ]
8}Here's a sample request with a membership number and voucher code
1{
2 "processParameters":[
3 {
4 "MembershipNumber":"003",
5 "VoucherCode":"15OFF"
6 }
7 ]
8}Sample JSON Response
1{
2 "message":null,
3 "outputParameters":{
4 "outputParameters":{
5 "results":[
6 {
7 "VoucherId":"0kDRM0000004Ct22AE"
8 }
9 ]
10 }
11 },
12 "simulationDetails":{
13
14 },
15 "status":true
16}