Redeem discounts

Contents

Overview

The Loyalty API supports discounts redeemable at the restaurant. Discounts can be:

  • Order or product level

  • Percentage based (e.g. 10% off) or value based (e.g. £10 off)

This document explains how Loyalty API endpoints must be used to redeem discounts.

Identify

When a guest scans an identification code on a POS or Kiosk, they may pre-select offers or rewards that contain a discount. In that case, the https://rbictg.atlassian.net/wiki/spaces/RDP/pages/4945674241 endpoint will return an eligibleDiscounts field on the response. This will contain the type of discount (% or value amount), and the actual amount, e.g. 10 or 20.

Example request

{ "identifier": "$6digitCode or $loyaltyId", "posVendor": { "operator": "$operatorId", "posType": "$posVendorName", "storeId": "$rbiStoreId", "supportingPos": "POS vendor name (optional field)", // vendor to return plu for "terminal": "$terminalNumber", "transactionId": "$posTransactionId" } }

Example response

{ "balances": [ { "amount": 14464, "currency": "points" } ], "eligibleDiscounts": [ { "details": { "displayName": "20% off order", "discountValue": 20, "subtype": "PERCENTAGE_DISCOUNT or AMOUNT_DISCOUNT", "type": "offer" or "reward" }, "incentiveId": "$sanityIncentiveId", "productId": "$incentivePlu", "referenceId": "$incentiveLoyaltyId" } ], "loyaltyUser": { "created": "2021-08-10T12:18:39.180Z", "id": "$loyaltyUserId", "name": "$loyaltyUserName" }, "order": [], "transactionId": "$loyaltyTransactionId" }

 

Transaction Update

If a guest includes discounts in their order, the POS or kiosk devices must send an appliedDiscounts field when calling the https://rbictg.atlassian.net/wiki/spaces/RDP/pages/4947771470 endpoint to commit a Loyalty transaction with a status of CLAIMED. The appliedDiscounts field is used to specify that the discount has actually been applied.

In addition, the Update endpoint expects POS/Kiosk devices to already apply the discount when calculating each line entry’s price. This means if a 10% discount was applied, the price of each entry should have 10% less than their actual value, and if a £10 discount was applied, each line entry’s price should have an equal portion of £10 deducted. The Loyalty API will respect any exemptions included in the request, i.e If a POS or kiosk device states they don’t want to discount alcohol line entries, there will be no validation or assertions done by the Loyalty API to block this from happening.

Example request

{ "channel": "Restaurant", "created": "2021-05-04T13:39:47Z", "loyaltyId": "$loyaltyUserId", "serviceMode": "$serviceMode", "status": "CLAIMED", "transactionDetails": { "appliedDiscounts": [ { "details": { "displayName": "20% off order", "discountValue": 20, "subtype": "PERCENTAGE_DISCOUNT or AMOUNT_DISCOUNT", "type": "offer" or "reward" }, "incentiveId": "$sanityIncentiveId", "productId": "$incentivePlu", "referenceId": "$incentiveLoyaltyId" } ], "currency": "USD", "order": [ { "name": "med whopper combo", "price": 4.00, "productId": "$plu", "productType": "combo", "quantity": 1, "referenceId": "3", "tax": 0 }, { "name": "whopper", "parentReferenceId": "1", "price": 0, "productId": "$plu", "productType": "item", "quantity": 1, "referenceId": "4", "tax": 0 }, { "name": "med fries", "parentReferenceId": "1", "price": 0, "productId": "$plu", "productType": "item", "quantity": 1, "referenceId": "5", "tax": 0 }, { "incentiveId": "$sanityRewardId", "price": 0, "productId": "$rewardPlu", "productType": "reward", "quantity": 1, "referenceId": "3", "tax": 0 } ], "payments": [ { "amount": 500, "type": "$paymentMethod", "ccToken"?: "$panToken" } ], "posVendor": { "operator": "$operatorId", "posType": "$posVendorName", "storeId": "$rbiStoreId", "supportingPos": "POS vendor name (optional field)", // vendor to return plu for "terminal": "$terminalNumber", "transactionId": "$posTransactionId" } }, "transactionId": "$loyaltyTransactionId" }

Example response

Â