| Previous Topic | Next Topic | |
|---|---|---|
| POS Module 6a: Show Applicable Offers - Concepts (Redemptions 1.0) | POS Module 6b: Process/Create Redemption - Concepts (Redemptions 1.0) |
POS API Certification Tutorial - Module 6a: Show Applicable Offers - Example Scenarios (Redemptions 1.0)
Prerequisites
-
You must have read the scenario assumptions.
-
Review Module 5: Show Offers and Rewards After Look-up - Example Scenarios.
General Tasks for Showing Applicable Offers
1. Add menu items to the guest transaction. You should include all the menu item types that can be provided at the time of the call including service charges, taxes, and payments. For more information about the structure of menu items, and for additional details about sending menu items, see How To Send Menu Items to Punchh.
2. Perform a user look-up using the User Look-up and Fetch Balance API to assign the transaction to the user.
3. Call the Applicable Offers API. If applicable offers/rewards are found that can be applied to the check, the API returns the discount amount and menu items eligible for each of these offers.
Note
As items are added and removed from the transaction either before or after applying a redemption, update the applicable offers available on the POS order using the Applicable Offers API. We recommend you commit redemptions as they apply to the check using the Create Redemption API.
If the check is modified post redemption, the POS should show a message that the loyalty discounts applied will be voided and need to be reapplied with a YES/NO option. If the POS operator chooses YES, the POS operator needs to call the Applicable Offers API after modifying the order and reapply the discount. If applicable offers are found, the API returns the menu items eligible for each of these offers.
Possible Scenario
The following scenario is based on the assumptions here.
Story Line
Central Punchh Coffee decided to launch a “Ladies Special” campaign to offer a $2 discount on all drinks for its female guests. The business created a redeemable on the Punchh platform that provides $2 off on all the drinks to its female guests. Once the campaign becomes active, a reward based on the redeemable becomes available to all of its female guest accounts.
Janice visits Central Punchh Coffee and orders a large matcha latte drink worth $6. Janice provides her email address, and Rachel rings her up for the drink. The POS first does a look-up of Janice's account with the email address provided by Janice. After the successful look-up of Janice's account, the POS assigns the transaction to Janice's account. The POS then calls the Applicable Offers API to check whether Janice's order is eligible for any discount. The POS shows that Janice’s account has a reward that can be applied to her current order; her drink is eligible for a $2 discount. Rachel asks Janice if she would like to redeem the reward that is added to Janice’s account through the Ladies Special campaign. Janice happily confirms that she wants to redeem the reward.
Code Sample (Direct API Integration)
The following code sample contains the API request and response for the transactions between the POS and Punchh based on this story line. After the successful look-up of Janice's account using her email address (janice@example.com), when the POS calls the Applicable Offers API with all the required parameters, the API returns the following information about the applicable reward:
- Discount amount: $2
- Reward: See the "reward" object for reward contents
- Menu items eligible for the discount: See the "menu_items" object
| Request Body | Response Body |
| API endpoint name: Applicable Offers POST {server-name}/api/pos/redemptions/applicable_offers { "email": "janice@example.com", "menu_items": [ { "item_name": "Matcha Latte, Large", "item_qty": 1, "item_amount": 6, "menu_item_type": "M", "menu_item_id": 12, "menu_family": "800", "menu_major_group": "152", "serial_number": "1.0" } ], "subtotal_amount": 6, "receipt_amount": 6, "receipt_datetime": "2022-09-03T13:05:01+05:30" } For examples of how to make this call using various programming languages, see Module 6a: Example Code. |
{ "discount_amount": 2, "menu_items": [ { "item_name": "Matcha Latte, Large", "item_qty": 1, "item_amount": 6, "menu_item_type": "M", "menu_item_id": 12, "menu_family": "800", "menu_major_group": "152", "serial_number": "1.0" } ], "reward": { "created_at": "2022-09-01T13:57:07Z", "description": "Discounts on Drinks", "discount_amount": 2, "id": 1425574, "image": "https//punchh.com/example.gif", "name": "Ladies Special discount", "points": 0, "redeemable_properties": null, "start_date_tz": "2022-11-01T13:57:07Z", "end_date_tz": null, "status": "unredeemed", "updated_at": "2022-11-01T13:57:07Z" } } |