Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Rewards are an item benefit that can be redeemed in exchange for points (and sometimes money + points). Read more about it here: /wiki/spaces/HELP/pages/4921819186 .

Reward with an item

"cart": [ { "menuSelections": [ {
Expand
titleRBI Partner API
Code Block
Info

Oracle documentation: https://docs.oracle.com/en/industries/food-beverage/simphony/19.7/simcg/c_discounts_automatic_discount_rules.htm

Online

  • 0 Priced reward item - discount it 100%.

    • discounts have a discount ID.

    • each offer / reward has a unique discount ID

In Restaurant

  • 0 priced reward item - pre select and offer and reward. discount it 100%.

Next steps:

  • Send all offer and reward information to Oracle team. Multiple different discounts that can be used (100% discount off, item price substitution)

  • Talk with TRX team about Rewards with prices + loyalty points (using item price substitution discount)

  • Have internal discussion and setup a call with Oracle team to validate

  • Understand if there are any implications to analytics (understanding the difference between offers and rewards)

Reward with an item

Expand
titleRBI Partner API
Code Block
"cart": [
  {
    "menuSelections": [
      {
        "id": "7ee7338a-a016-47c6-aef6-3783d40c003e", // Reward Sanity id
        "externalReferenceId": "123", // Reward constant plu defined in Sanity
        "quantity": 1,
        "price": {
          "amount": 0,
          "currency": "SAR",
        }
        "type": "Reward", 
        "menuSelections": [
          {
            "externalReferenceId": "51056", // item constant plu
            "id": "item_1862", // item Sanity id
            "menuSelections": [],
            "price": {
                "amount": 2495, // normal price
                "currency": "SAR"
          },
            "quantity": 1,
            "type": "Item"
          }
        ]
      }
    ]
  }
]
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
{
    "header": {
        "orgShortName": "{{OrgShortName}}",
        "locRef": "{{LocRef}}",
        "rvcRef": {{RvcRef}},
        "idempotencyId": "{{$guid}}",
        "orderTypeRef": 9,
        "checkEmployeeRef": {{check_employee_ref}}
    },
    "menuItems": [],
    "comboMeals": [
        {
            "comboMealId": 51002003, // Cheeseburger reward
            "comboItem": {
                "menuItemId": 51002003, // Cheeseburger reward PLU
                "definitionSequence": 1,
                "quantity": 1
            },
            "mainItem": {
                "menuItemId": 1002003, // A la carte cheeseburger
                "definitionSequence": 1,
                "quantity": 1
            },
            "sideItems": []
        }
    ],
    "tenders": [
        {
            "tenderId": 901 // payment method ID. Pay at Counter for this example.
        }
    ]
}
Info

In Oracle, we use a separate combo for reward items so that we can set up a different price (0) vs the single item ALC. Alternatively, we could create a new priceSequence set to 0 for each definitionSequence , and then re-use the single item.

Note

Oracle can only handle up to 10,000 combos.

Reward with an item + premium modifier

Expand
titleRBI Partner API
Code Block
"cart": [
  {
    "menuSelections": [
      {
        "id": "7ee7338a-a016-47c6-aef6-3783d40c003e", // Reward Sanity id
        "externalReferenceId": "123", // Reward constant plu defined in Sanity
        "quantity": 1,
        "price": {
          "amount": 0,
          "currency": "SAR",
        }
        "type": "Reward", 
        "menuSelections": [
          {
            "externalReferenceId": "51056", // item constant plu
            "id": "item_1862", // item Sanity id
            "menuSelections": [],
            "price": {
                "amount": 2495, // normal price
                "currency": "SAR"
          },
            "quantity": 1,
            "type": "Item"
          }
        ]
      }
    ]
  }
]
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
{
    "header": {
        "orgShortName": "{{OrgShortName}}",
        "locRef": "{{LocRef}}",
        "rvcRef": {{RvcRef}},
        "idempotencyId": "{{$guid}}",
        "orderTypeRef": 9,
        "checkEmployeeRef": {{check_employee_ref}},
        "language": "es-ES",
        "Accept-Language": "es-ES"
    },
    "menuItems": [],
    "comboMeals": [
        {
            "comboMealId": 51002003, // Cheeseburger reward
            "comboItem": {
                "menuItemId": 51002003, // Cheeseburger reward
                "definitionSequence": 1,
                "quantity": 1
            },
            "mainItem": {
                "menuItemId": 1002003, // Cheeseburger ALC
                "definitionSequence": 1,
                "quantity": 1,
                "condiments": [
                    {
                        "condimentId": 9011005, // Add bacon. Premium modifier (extra cost)
                        "priceSequence": 2,
                        "quantity": 2
                    }
                ]
            },
            "sideItems": []
        }
    ],
    "tenders": [
        {
            "tenderId": 901
        }
    ]
}

Reward with a combo

Expand
titleRBI Partner API
Code Block
"cart": {
  "menuSelections": [
    {
      "externalReferenceId": "8351", // reward plu
      "id": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //reward sanity id
        "menuSelections": [
            {
                "externalReferenceId": "8350", // combo plu
                "id": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //combo sanity id
                "menuSelections": [
                    {
                        "externalReferenceId": "10059",
                        "id": "item_1852",
                        "menuSelections": [],
                        "price": {
                            "amount": 0,
                            "currency": "SAR"
                        },
                        "quantity": 1,
                        "type": "Item"
                    },
                    {
                        "externalReferenceId": "80007",
                        "id": "4f99db1e-128a-4e53-b23b-dffc0fedf636",
                        "menuSelections": [],
                        "price": {
                            "amount": 0,
                            "currency": "SAR"
                        },
                        "quantity": 1,
                        "type": "Item"
                    },
                    {
                        "externalReferenceId": "80001",
                        "id": "16f482db-2f13-4476-88d3-d2eec26057f3",
                        "menuSelections": [],
                        "price": {
                            "amount": 0,
                            "currency": "SAR"
                        },
                        "quantity": 1,
                        "type": "Item"
                    },
                    {
                        "externalReferenceId": "141139",
                        "id": "141139",
                        "menuSelections": [],
                        "price": {
                            "amount": 0,
                            "currency": "SAR"
                        },
                        "idquantity": "7ee7338a-a016-47c6-aef6-3783d40c003e", // Reward Sanity id1,
                        "externalReferenceIdtype": "123", // Reward constant plu defined in SanityItem"
                    }
               "quantity": 1,],
                "price": {
                "amount": 0,300, // original price of combo
                "currency": "SAR",
         }        },
"type": "Reward",          "menuSelections": [     "quantity": 1,
    {             "externalReferenceIdtype": "51056Combo",
// item constant plu             "id": "item_1862", // item Sanity id }
              ],
"menuSelections": [],             "price": {
 
              "amount": 24950, // normalfinal price of the reward
              "currency": "SAR"
              },
              "quantity": 1,
              "type": "ItemReward"
            }
        ]
 
    }
    ]
  }
],
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
languagejson
{
    "header": {
        "orgShortName": "{{OrgShortName}}",
        "locRef": "{{LocRef}}",
        "rvcRef": {{RvcRef}},
        "idempotencyId": "{{$guid}}",
        "orderTypeRef": 9,
        "checkEmployeeRef": {{check_employee_ref}},
        "orderTypeReflanguage": 9"es-ES",
        "checkEmployeeRefAccept-Language": {{check_employee_ref}}"es-ES"        
    },
    "menuItems": [],
    "comboMeals": [
        {
            "comboMealId": 5100200351001504, //Whopper with Cheese CheeseburgerCombo rewardReward
            "comboItem": {
                "menuItemId": 5100200351001504, //Whopper with CheeseburgerCheese rewardCombo PLUReward
                "definitionSequence": 1,
                "quantity": 1
            },
            "mainItem": {
                "menuItemId": 10020031001003, // AWhopper lawith cartecheese cheeseburgerALC
                "definitionSequence": 1,
                "quantity": 1
            },
            "sideItems": []
 
      }     ],     "tendersquantity": [1
            {},
            "tenderIdsideItems": [
 901   // payment method ID. Pay at Counter for this example.   {
     }     ] }
Info

In Oracle, we use a separate combo for reward items so that we can set up a different price (0) vs the single item ALC. Alternatively, we could create a new priceSequence set to 0 for each definitionSequence , and then re-use the single item.

Note

Oracle can only handle up to 10,000 combos.

Reward with an item + premium modifier

Expand
titleRBI Partner API
Code Block
"cart": [   {     "menuSelectionsmenuItemId": [1013201, //Small pepsi
           {         "iddefinitionSequence": "7ee7338a-a016-47c6-aef6-3783d40c003e", // Reward Sanity id1,
                    "externalReferenceIdquantity": "123", // Reward constant plu defined in Sanity1
               "quantity": 1},
             "price": {  {
        "amount": 0,           "currencymenuItemId": "SAR",2102002, //Small fries
           }         "typedefinitionSequence": "Reward"1,
         "menuSelections": [          "quantity": {1
            "externalReferenceId": "51056", // item constant}
plu            ]
"id": "item_1862", // item Sanity id   }
    ],
    "menuSelectionstenders": [],
        {
   "price": {        "tenderId": 901
       "amount": 2495, // normal price
   }
    ]
}

Reward with a combo + premium modifier

Expand
titleRBI Partner API
Code Block
{
    "payload": {
        "currencynumber": "SAR5848",
        "fees": [
  },          {
  "quantity": 1,             "typetotal": "Item"{
          }         ] "amount": 19,
    }     ]   }
]
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
{        "headercurrency": {"EUR"
               "orgShortName": "{{OrgShortName}}",
                "locReftype": "{{LocRef}}",BAG_FEE"
           "rvcRef": {{RvcRef}},
        "idempotencyId": "{{$guid}}"],
        "orderTypeRefserviceMode": 9"DELIVERY",
        "checkEmployeeRefchannel": {{check_employee_ref}}"WHITELABEL_DELIVERY",
        "languagecallbackUrl": "es-EShttps://euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/15c3dbe1-5165-404b-8858-088239d14014/price/callback",
        "Accept-Languageid": "es-ES"
15c3dbe1-5165-404b-8858-088239d14014",
   },     "menuItemsstoreId": [],
    "comboMeals12349":,
[        "cart": {
            "comboMealIdmenuSelections": 51002003,[
// Cheeseburger reward             "comboItem": {
                    "menuItemIdexternalReferenceId": 51002003"948351",
//  Cheeseburger reward                 "definitionSequencequantity": 1,
                    "quantitymenuSelections": [
1             },           {
 "mainItem": {                 "menuItemId": 1002003, // Cheeseburger ALC     "externalReferenceId": "502617",
          "definitionSequence": 1,                 "quantity": 1,
           
    "condiments": [                     {  "menuSelections": [
                     "condimentId": 9011005, // Add bacon. Premium modifier (extra cost)   {
                     "priceSequence": 2,              "externalReferenceId": "502633",
         "quantity": 2                     }     "quantity": 1,
          ]             },             "sideItemsmenuSelections": []
        }     ],     "tenders": [         {            {
"tenderId": 901         }     ] }

Reward with a combo

Expand
titleRBI Partner API
Code Block
"cart": {   "menuSelections": [     {       "externalReferenceId": "8351", // reward plu       "idexternalReferenceId": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f528232",
  //reward sanity id         "menuSelections": [             {                 "externalReferenceIdquantity": "8350"1,
 //    combo plu                 "id": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //combo sanity id                 "menuSelectionsprice": {
  [                     {                         "externalReferenceIdamount": "10059"90,
                        "id": "item_1852",                        "currency": "menuSelections": [],EUR"
                             "price": {              },
              "amount": 0,                             "currencyid": "SAR"
    8ba0df7b35df",
                   },                         "quantitytype": 1,
   "ItemOptionModifier"
                    "type": "Item"                   }
 },                     {              ],
          "externalReferenceId": "80007",                         "idprice": "4f99db1e-128a-4e53-b23b-dffc0fedf636", {
                          "menuSelections": [],             "amount": 0,
          "price": {                             "amountcurrency": 0, "EUR"
                                  "currency": "SAR" },
                       },             "id": "item_11107",
          "quantity": 1,                         "type": "Item"
                                },

                   {              {
          "externalReferenceId": "80001",                         "idexternalReferenceId": "16f482db-2f13-4476-88d3-d2eec26057f3","942258",
                                    "menuSelectionsquantity": []1,
                          "price": {          "price": {
                    "amount": 0,                   "amount": 0,
        "currency": "SAR"                         },      "currency": "EUR"
                 "quantity": 1,                  },
      "type": "Item"                     },        "id": "item_11126",
           {                         "externalReferenceIdtype": "141139",Item"
                            "id": "141139",   },
                     "menuSelections": [],          {
              "price": {                     "externalReferenceId": "527646",
      "amount": 0,                             "currencyquantity": "SAR"1,
                          },          "price": {
             "quantity": 1,                           "typeamount": "Item" 0,
                      }                 ], "currency": "EUR"
              "price": {                 "amount": 300, // original price},
of combo                 "currency": "SAR"                  }"id": "9aac0a46-5a73-431d-937c-8848ca01ac86",
                 "quantity": 1,                  "type": "ComboItem"
                      }          }
    ],               "price": {        ],
      "amount": 0, // final price of the reward               "currencyprice": "SAR" {
                 },               "quantityamount": 1875,
              "type": "Reward"             }    "currency": "EUR"
   ]     },
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
languagejson
{
    "header": {         "orgShortName": "{{OrgShortName}}",         "locRef": "{{LocRef}}",
        "rvcRef": {{RvcRef}},         "idempotencyId": "{{$guid}}",         "orderTypeRefid": 9,
 "a2e73fd9-5f3d-4afc-9585-43ebd7bbc6dc",
      "checkEmployeeRef": {{check_employee_ref}},            "language": "es-ES",         "Accept-Languagetype": "es-ESCombo"
             },     "menuItems": [],     "comboMeals":}
[         {           ],
 "comboMealId": 51001504, //Whopper with Cheese Combo Reward             "comboItemprice": {
                        "menuItemIdamount": 51001504450,
   //Whopper with Cheese Combo Reward                 "definitionSequencecurrency": 1 "EUR"
                    },
                "quantity": 1     "id": "024f9096-e3ee-45fc-8f76-d75e272ff9e9",
       },             "mainItemtype": {"Reward"
                "menuItemId": 1001003, // Whopper with cheese ALC}
            ]
        }
"definitionSequence": 1,   }
}
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
{
    "header": {
        "quantityorgShortName": 1"{{OrgShortName}}",
            },
   "locRef": "{{LocRef}}",
        "sideItemsrvcRef": [{{RvcRef}},
                {"idempotencyId": "{{$guid}}",
           "orderTypeRef": 9,
        "menuItemIdcheckEmployeeRef": 1013201{{check_employee_ref}},
//Small pepsi         "language": "es-ES",
           "definitionSequence"Accept-Language": 1,"es-ES"
    },
    "menuItems": [],
    "comboMeals": [
    "quantity": 1   {
            "comboMealId": }51001504, // Whopper Cheese combo reward
           {    "comboItem": {
                "menuItemId": 210200251001504, ////Small friesWhopper Cheese combo  reward
                "definitionSequence": 1,
   
                "quantity": 1
            },
    }        "mainItem": {
   ]         }    "menuItemId": ],1001003, // whopper cheese
            "tenders": [     "definitionSequence": 1,
   {             "tenderIdquantity": 9011,
        }     ] }

Reward with a combo + premium modifier

Expand
titleRBI Partner API
Code Block
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
{
    "headercondiments": [
{         "orgShortName": "{{OrgShortName}}",         "locRef": "{{LocRef}}",{
              "rvcRef": {{RvcRef}},         "idempotencyIdcondimentId": "{{$guid}}"9011005, // Add bacon. Premium modifier (extra   "orderTypeRef": 9,cost)
          "checkEmployeeRef": {{check_employee_ref}},              "languagepriceSequence": "es-ES"2,
        "Accept-Language": "es-ES"           },     "menuItemsquantity": [],2
    "comboMeals": [         {      }
      "comboMealId": 51001504, // Whopper Cheese combo reward    ]
        "comboItem": {    },
            "menuItemIdsideItems": 51001504, //// Whopper Cheese combo reward[
                {
  "definitionSequence": 1,                 "quantitymenuItemId": 11013201, // Small   fries
       },             "mainItemdefinitionSequence": 1,
   {                 "menuItemIdquantity": 1001003, //1
whopper cheese               },
 "definitionSequence": 1,              {
  "quantity": 1,                 "condimentsmenuItemId": [2000008, // Icy mango. Premium drink (extra cost)
              {      "definitionSequence": 1,
                    "condimentIdquantity": 9011005,1
// Add bacon. Premium modifier (extra cost)          }
            ]
 "priceSequence": 2,      }
    ],
    "tenders": [
       "quantity": 2{
            "tenderId": 901
      }  }
    ]
}

Reward with a cart discount

The reward is the cart discount. You use points to buy a discount.

Expand
titleRBI Partner API
Code Block
languagejson
"payload": {
    "number": "5803",
 ]   "fees": [
        },{
            "sideItemstotal": [{
                {
"amount": 19,
                  "currency": "menuItemIdEUR":
  1013201, // Small fries        },
            "definitionSequencetype": 1,"BAG_FEE"
        }
     ],
     "quantityserviceMode": 1"DELIVERY",
     "channel": "WHITELABEL_DELIVERY",
    "callbackUrl": "https://euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/60c1983c-8cbc-4aa8-9486-c55fa78566f5/price/callback",
     }"id": "60c1983c-8cbc-4aa8-9486-c55fa78566f5",
    "orderDiscounts": [
          {
    
               "menuItemIdtype": 2000008"amount",
// Icy mango. Premium drink (extra cost)
                    "definitionSequencevalue": 1,200
        }
      ],
    "quantitystoreId": 1"12349",
    "cart": {	
          }
"menuSelections": [
           ]  {
      }     ],     "tendersexternalReferenceId": [
   "502633",
    {             "tenderIdquantity": 1,
 901         }     ] }

Reward with a cart discount

Expand
titleRBI Partner API
Code Block
languagejson
"payload"price": {
     "number": "5803",               "feesamount": [645,
        {            "currency": "total": {EUR"
                },
                 "amountid": 19"item_11107",
                 "currencytype": "EURItem"
             },
        ]
    }
 }
Info

Note: the cart discount can be also sent with a plu inside the orderDiscounts object. Please refer to “Reward with a product discount” section for an example.

Expand
titleOracle TS Gen 2 (Commit call)
Code Block
languagejson
{
     "typeheader": "BAG_FEE"
     {
  }      ],
     "serviceMode"orgShortName": "DELIVERY{{OrgShortName}}",
     "channel": "WHITELABEL_DELIVERY",
    "callbackUrllocRef": "https://euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/60c1983c-8cbc-4aa8-9486-c55fa78566f5/price/callback",
    "id": "60c1983c-8cbc-4aa8-9486-c55fa78566f5",{{LocRef}}",
        "orderDiscountsrvcRef": {{RvcRef}},
[        "idempotencyId": {
 "{{$guid}}",
          "typeorderTypeRef": "amount"9,
        "checkEmployeeRef": {{check_employee_ref}}
   "value": 200 },
    "menuItems": [
  }      ],
 {   "storeIdmenuItemId": "12349"1001001, // Whopper ALC
 "cart": {	          "menuSelectionsdefinitionSequence": [1,
            "quantity": 1
 {       }
    ],
    "externalReferenceIdtenders": "502633", [
        {
            "quantitytenderId": 901
 1,       }
    ],
    "pricediscounts" : [
{        {
            "amountdiscountId": 645104, // PLU for the cart level amount discount 
            "currencyreferenceText": "EURReward 1234",
                },
                 "id": "item_11107","total": 10 // the amount that you are discounting. 10 euros off. We can send whatever amount we want
        }
      ]
}

Reward with a product discount

Expand
titleRBI Partner API
Code Block
languagejson
{
    "typepayload": "Item"{
        "number": "5807",
   }         ]"fees": [
     }
 }
Info

Note: the cart discount can be also sent with a plu inside the orderDiscounts object. Please refer to “Reward with a product discount” section for an example.

Expand
titleOracle TS Gen 2 (Commit call)
Code Block
{       {
          "header      "total": {
                    "orgShortNameamount": "{{OrgShortName}}",19,
                    "locRefcurrency": "{{LocRef}}",EUR"
               "rvcRef": {{RvcRef}},
                "idempotencyIdtype": "{{$guid}}",BAG_FEE"
            }
  "orderTypeRef": 9,     ],
   "checkEmployeeRef": {{check_employee_ref}}     }"serviceMode": "DELIVERY",
        "menuItemschannel": [
  "WHITELABEL_DELIVERY",
     {   "menuItemIdcallbackUrl":1001001, "https:// Whopper ALC
   euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/781f28e9-d6bb-4c8e-9ea6-e65a2e7c3764/price/callback",
        "id": "781f28e9-d6bb-4c8e-9ea6-e65a2e7c3764",
        "definitionSequenceorderDiscounts": 1,[
            "quantity":{
1         }     ],    "plu": "tenders948348":,
[         {       "type": "percentage",
    "tenderId": 901         }  "value": 50
 ],     "discounts" : [    }
    {    ],
        "discountIdstoreId": 104"12349",
 // PLU for the cart level amount discount"cart": {
            "referenceTextmenuSelections": "Reward 1234", [
                {
    "total": 10 // the amount that you are discounting. 10 euros off. We can send whatever amount we want"externalReferenceId": "948348",
         }     ] }

Reward with a product discount

...

languagejson

...

     "

...

quantity": 1,
 

...

         

...

 

...

         "

...

menuSelections": [
              

...

          {
      

...

 

...

                     "

...

externalReferenceId": 

...

"502633",
                    

...

        "quantity": 1,
           

...

                 "

...

price": 

...

{
    

...

         

...

         

...

 

...

         "

...

amount": 

...

0,
        

...

 

...

     

...

 

...

         

...

 

...

       "currency": "EUR"
    

...

                 

...

 

...

      },
          

...

 

...

                 "

...

id": 

...

"item_11107",
          

...

         

...

         "

...

type": "

...

Item"
             

...

 

...

          }
  

...

 

...

                 

...

],
                    "

...

price":

...

 {
                        "

...

amount": 

...

645,
                        "

...

currency": 

...

"EUR"
                    },
   

...

                 

...

"id": "fbdead97-5acb-4d1c-a5fe-5794ece61aaa",
         

...

 

...

          "type": "Reward"
                }

...

 

...

           ]
        }
    }
}
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
languagejson
{
    "

...

header": {
        "orgShortName": "{{OrgShortName}}",
        

...

"locRef": "{{LocRef}}",
        "

...

rvcRef": 

...

{{RvcRef}},
        "idempotencyId": "{{$guid}}",
        "orderTypeRef": 9,
        "checkEmployeeRef": {{check_employee_ref}}
   

...

 },
    "menuItems": [
        {
            "menuItemId": 

...

1001001, // Whopper
            "definitionSequence": 1,
            

...

"

...

quantity": 

...

1,
            "itemDiscounts": [
              

...

 

...

 {
                    "discountId": 104, // 

...

PLU of the product amount discount off
              

...

      "referenceText": "Reward Item Discount",
           

...

 

...

        "total": 59 // amount of discount (can be sent as any number). 59 pesos off the whopper 

...

ALC price.
                }
       

...

 

...

    ]
        }
    ],
  

...

  "tenders": [
        {
        

...

 

...

   "tenderId": 901
        }
    

...

]
}

Offer Payload Structure

Offers are a discount on the order or item. Can take the form of a discounted bundle, cheaper item, order-level % discount, or order-level $ off. Also known as a “coupon” in some markets. Read more about it here: /wiki/spaces/HELP/pages/4854349911 .

Offer with an item

Info

As with rewards, Oracle also creates a separate combo for an item offer.

Expand
titleRBI Partner API
Code Block
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
{
    "header": {
        

...

"orgShortName": "{{OrgShortName}}",
        "locRef": "{{LocRef}}",
  

...

      "rvcRef": {{RvcRef}},
  

...

     

...

Offer Payload Structure

Offers are a discount on the order or item. Can take the form of a discounted bundle, cheaper item, order-level % discount, or order-level $ off. Also known as a “coupon” in some markets. Read more about it here: /wiki/spaces/HELP/pages/4854349911 .

Offer with a combo

Code Block
languagejson
"cart": { "menuSelections": [ { "externalReferenceId": "8351", // offer plu
 "idempotencyId": "{{$guid}}",
        "orderTypeRef": 9,
        "checkEmployeeRef": {{check_employee_ref}}
    },
    "menuItems": [],
    "comboMeals": [
        
"id": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //offer sanity id
{
            "
menuSelections
comboMealId":
[
 4000045, // Offer PLU for vanilla cone
            "comboItem": {
                "
externalReferenceId
menuItemId": 
"8167"
4000045, // 
combo
Offer 
plu
PLU for vanilla cone
             
"id":
 
"d90a7113-0620-44d9-b678-743330a2f207",
 
//combo sanity id
 "definitionSequence": 1,
                "
menuSelections
quantity": 
[
1
            },
       
{
     
"mainItem": {
                "
externalReferenceId
menuItemId": 
"80003",
1014013, // Vanilla Cone ALC
                "definitionSequence": 1,
                "
id
quantity":
"ce847c79-9eb5-4be3-8a1e-842919aa5ba0",
 1
            },
            "
menuSelections
sideItems": []
,

        }
    ],
    "tenders": [
       
"price":
 {
            "tenderId": 901
        }
    ]
"amount
}

Offer with a combo

Expand
titleRBI Partner API
Code Block
languagejson
"cart": 
0,
{
  
"menuSelections": [
    {
      "externalReferenceId": "8351", // offer plu
      
"
currency
id": "
SAR"
43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //offer sanity id
        
"menuSelections": [
         
},
   
{
                "
quantity
externalReferenceId": 
1
"8167", // combo 
plu
                
"
type
id": "
Item"
d90a7113-0620-44d9-b678-743330a2f207", //combo sanity id
                
},
"menuSelections": [
                    {
                        "externalReferenceId": "
142538
80003",
                        "id": "
142538
ce847c79-9eb5-4be3-8a1e-842919aa5ba0",
                        "menuSelections": [],
                        "price": {
                            "amount": 0,
                            "currency": "SAR"
                        },
                        "quantity": 1,
                        "type": "Item"
                    }
,
             
],
       
{
  
"price":
 
{
                     "
amount
externalReferenceId": 
500
"142538",
//price
 
of
 
the
 
combo
                     "
currency
id": "
SAR
142538",
                
},
        "menuSelections": [],
       
],
                 "price": {
                
"amount":
 
100,
 
//
 
final
 
price
 
of
 
the
 
offer
     "amount": 0,
          
"currency":
 
"SAR"
                 
},
"currency": "SAR"
               
"quantity":
 
1,
        },
        
"type":
 
"Offer"
             
}
  
"quantity": 1,
  
]
     
},

Offer with a picker

Code Block
languagejson
"cart":
 
{
   
"menuSelections":
 
[
     
{
       "
externalReferenceId
type": "
8351", // offer plu
Item"
      
"id": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //offer sanity id
              }
  
"menuSelections":
 
[
             
{
],
                "
externalReferenceId
price":
"8168", //combo plu
 {
                    "
id
amount": 
"3318d2c2-99d3-40f9-92d2-1798d9c5e987"
500, //price of the combo
  
sanity
 
id
                 "
menuSelections
currency": 
[
"SAR"
                },
        
{
        ],
                "
externalReferenceId
price": 
"20001",
{
                "amount": 100, // final price of the 
"id": "item_61936",
offer
                "currency": "SAR"
       
"menuSelections":
 
[],
        },
                "
price
quantity": 1,
{
                "type": "Offer"
           
"amount": 0,
 }
        ]
    },
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
languagejson
{
    "header": {
        "
currency
orgShortName": "
SAR
{{OrgShortName}}",
        "locRef": "{{LocRef}}",
        
"rvcRef": {{RvcRef}},
        
"idempotencyId": "{{$guid}}",
        "
quantity
orderTypeRef": 
1
9,
        "checkEmployeeRef": {{check_employee_ref}}
    },
    "menuItems": [],
    "
type
comboMeals":
"Item"
 [
        {
         
},
   "comboMealId": 4000045, // Buy one Cone, Get one Cone for free Offer PLU
     
{
       "comboItem": {
                "
externalReferenceId
menuItemId": 
"80002",
4000045, // Buy one Cone, Get one Cone for free Offer PLU
                "
id
definitionSequence": 
"865a632f-e2f7-4e2b-8fcc-9281aa3f5868"
1,
                
"menuSelections
"quantity": 1
[],
            },
            "
price
sideItems": 
{
[{
                "
amount
menuItemId": 
0,
1014013, // Vanilla Cone (could be any selection of cones)
                "definitionSequence": 1,
    
"currency":
 
"SAR"
           "quantity": 1
            },
            {
                "
quantity
menuItemId": 
1
1014012, // Strawberry Cone (could be any selection of cones)
                "
type
definitionSequence": 
"Item"
1,
                "quantity": 1
  
},
          }]
        }
 
{
   ],
    "tenders": [
        {
      
"externalReferenceId":
 
"80008",
     "tenderId": 901
        }
    ]
}

Offer with a cart discount

Expand
titleRBI Partner API
Code Block
languagejson
{
    "
id
payload": 
"04462c22-bf58-4eee-842a-213e3d17a072",
{
        
"number": "5814",
        "
menuSelections
fees":
[],
 [
            {
         
"price":
 
{
      "total": 
{
                    "amount": 
0
19,

                    
"currency": "
SAR
EUR"
                },
       
},
         "type": "BAG_FEE"
            }
 
"quantity":
 
1,
      ],
        "serviceMode": "DELIVERY",
        "
type
channel": "
Item
WHITELABEL_DELIVERY",
        "callbackUrl": "https://euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/6d66a02e-810f-478f-bf0d-b69bfcb56d51/price/callback",
        
},
"id": "6d66a02e-810f-478f-bf0d-b69bfcb56d51",
        "orderDiscounts": 
[
    
{
        {
                "
externalReferenceId
type": "
142538
percentage",

                
"
id
value": 
"142538",
20
            
}
        
"menuSelections": [
],
        
"storeId": "12349",
        "
price
cart": {
            "menuSelections": [
              
"amount":
 
0,
 {
                    "
currency
externalReferenceId": "
SAR
502633",
                    
},
"quantity": 1,
                    "
quantity
price": 
1,
{
                        "
type
amount": 
"Item"
645,
                    
}
    
"currency": "EUR"
         
],
           
"price": {
},
                    "
amount
id": 
500
"item_11107",
//price of the combo
                    
"
currency
type": "
SAR
Item"
                }
,

            ]
 
],
       }
    }
}
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
languagejson
{
    "
price
header": {
        "orgShortName": "{{OrgShortName}}",
        "
amount
locRef": 
100
"{{LocRef}}",
//
 
final
 
price
 
of
 
the
 
offer
   
"rvcRef": {{RvcRef}},
        "
currency
idempotencyId": "
SAR"
{{$guid}}",
        "orderTypeRef": 9,
     
},
   "checkEmployeeRef": {{check_employee_ref}}
    },
    
"
quantity
menuItems": 
1,
[
        
{   
"
type
menuItemId":
"Offer"
1001001, // Whopper ALC
          
}
  
"definitionSequence": 1,
  
]
     
},

Offer with a cart discount

Code Block
languagejson
{
     "
payload
quantity": 
{
1
        
"number": "5814",
}
    ],
    "
fees
tenders": [

        {

            "
total
tenderId": 
{
901
        }
    
],
    "
amount
discounts" : [
19,
        {
            "
currency
discountId":
"EUR"
 106, // PLU for the cart level percent discount 
           
},
 "referenceText": "Offer 
1234",
            "
type
total": 
"BAG_FEE" }
10 // the percentage that you are discounting. 10% off. We can send whatever percentage we want
     
],
   }
    
"serviceMode": "DELIVERY",
]
}

Offer with a product discount

Expand
titleRBI Partner API
Code Block
{
    
"
channel
payload": 
"WHITELABEL_DELIVERY",
{
        "
callbackUrl
number": "
https://euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/6d66a02e-810f-478f-bf0d-b69bfcb56d51/price/callback
5821",
        "
id
fees":
"6d66a02e-810f-478f-bf0d-b69bfcb56d51",
 [
            {
  
"orderDiscounts":
 
[
             "total": {
                    "
type
amount": 
"percentage",
19,
                    "
value
currency": "EUR"
   
20
             }
,
       
],
         "
storeId
type": "
12349",
BAG_FEE"
            }
   
"cart":
 
{
    ],
        "
menuSelections
serviceMode": 
[
"DELIVERY",
        "channel": "WHITELABEL_DELIVERY",
      
{
  
"callbackUrl": "https://euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/ed50be10-cf7c-4b1c-8bb1-0c2625cbf3be/price/callback",
        
"externalReferenceId
"id": "
502633
ed50be10-cf7c-4b1c-8bb1-0c2625cbf3be",
        "orderDiscounts": [
          
"quantity":
 
1,
 
{
                "
price
plu": 
{
"502617",
                "
amount
type": 
645,
"percentage",
                
"
currency
value": 
"EUR"
20
            }
,

        
],
        "
id
storeId": "
item_11107
12349",
        "cart": {
            "
type
menuSelections": 
"Item"
[
                
}
{
            
]
        
}
"externalReferenceId": "502617",
   
} }

Offer with a product discount

Code Block
{
       
"payload":
 
{
         "
number
quantity": 
"5821"
1,
          
"fees
          "menuSelections": [
              
{
          {
      
"total":
 
{
                     "
amount
externalReferenceId": 
19,
"502633",
                       
"currency":
 
"EUR"
    "quantity": 1,
           
},
                 "
type
price":
"BAG_FEE"
 {
              
}
         
],
         "
serviceMode
amount": 
"DELIVERY",
0,
   
"channel":
 
"WHITELABEL_DELIVERY",
         
"callbackUrl": "https://euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/ed50be10-cf7c-4b1c-8bb1-0c2625cbf3be/price/callback",
                   "
id
currency": "
ed50be10-cf7c-4b1c-8bb1-0c2625cbf3be",
EUR"
        
"orderDiscounts":
 
[
             
{
      },
          
"plu":
 
"502617",
                 "
type
id": "
percentage
item_11107",
                
"value":
 
20
           
}
"type": "Item"
       
],
         
"storeId":
 
"12349",
       
"cart": {
},
              
"menuSelections":
 
[
         {
       
{
                     "externalReferenceId": "
502617
942258",
                            "quantity": 1,
                            
"menuSelections": [
"price": {
                                "amount": 0,
  
{
                              "
externalReferenceId
currency": "
502633
EUR"
,

                            
"quantity": 1
},
                            "
price
id": 
{
"item_11126",
                            "type": "Item"
  
"amount":
 
0,
                     },
           
"currency":
 
"EUR"
            {
                
},
            "externalReferenceId": "527646",
               
"id": "item_11107",
             "quantity": 1,
                
"type":
 
"Item"
           "price": {
            
},
                    "amount": 0,
   
{
                             "
externalReferenceId
currency": "
942258
EUR"
,

                            
"quantity": 1,
},
                            "id": 
"price": {
"9aac0a46-5a73-431d-937c-8848ca01ac86",
                            
"
amount
type": 
0,
"Item"
                        }
       
"currency":
 
"EUR"
            ],
                
},
    "price": {
                        "
id
amount": 
"item_11126",
875,
                        "
type
currency": "
Item
EUR"

                    },
                    
{
"id": "a2e73fd9-5f3d-4afc-9585-43ebd7bbc6dc",
                    "
externalReferenceId
type": "
527646
Offer"
,

                }
           
"quantity": 1,
 ]
        }
    
}
}
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
languagejson
{
    "
price
header": {
        "orgShortName": "{{OrgShortName}}",
        
"locRef": "{{LocRef}}",
        "
amount
rvcRef": 
0,
{{RvcRef}},
        "
currency
idempotencyId": "
EUR
{{$guid}}",
        "orderTypeRef": 9,
        
"checkEmployeeRef": {{check_employee_ref}}
    },
    "menuItems": [
        
{
            "
id
menuItemId": 
"9aac0a46-5a73-431d-937c-8848ca01ac86",
1001001, // Whopper
            
"
type
definitionSequence": 
"Item"
1,
            "quantity": 1,
          
}
  "itemDiscounts": [
                
],
{
                    "
price
discountId":
{
 106, // PLU of the product percent discount off
                    "
amount
referenceText": 
875,
"Offer Item 
Discount",
                    "
currency
total": 
"EUR"
50 // percentage discount (can be sent as any percentage). 50% off the whopper ALC price.
     
},
           }
         
"id":
 
"a2e73fd9-5f3d-4afc-9585-43ebd7bbc6dc",
  ]
        }
    ],
    "
type
tenders": 
"Offer"
[
        {
       
}
     
]
"tenderId": 901
        }
    
}
]
}

Reference

NMS guides on how to set up offers and rewards in Sanity for Oracle: /wiki/spaces/MS/pages/4057661622