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"
                        },
                        "quantity": 1,
                        "type": "Item"
                    }
                ],
                "price": {
                "amount": 300, // original price of combo
                "idcurrency": "7ee7338a-a016-47c6-aef6-3783d40c003e", // Reward Sanity id"SAR"
                 },
                 "quantity": 1,
                 "externalReferenceIdtype": "123", // Reward constant plu defined in Sanity
Combo"
                 }
       "quantity": 1,      ],
  "price": {           "amountprice": {
   0,           "currencyamount": "SAR",
  0, // final price of the reward
     }         "typecurrency": "RewardSAR",
         "menuSelections": [         },
 {             "externalReferenceIdquantity": "51056", // item constant plu1,
              "idtype": "item_1862Reward",
// item Sanity id         }
   "menuSelections": [],    ]
        "price": {
},
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
languagejson
{
    "header": {
         "amountorgShortName": 2495"{{OrgShortName}}",
// normal price      "locRef": "{{LocRef}}",
         "currencyrvcRef": "SAR"{{RvcRef}},
          },
   "idempotencyId": "{{$guid}}",
        "quantityorderTypeRef": 19,

           "typecheckEmployeeRef": "Item"{{check_employee_ref}},
        "language": "es-ES",
}         ]
 "Accept-Language": "es-ES"     }   
 ]   }
]
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
{,
    "headermenuItems": {
[],
    "comboMeals": [
       "orgShortName": "{{OrgShortName}}",{
            "locRefcomboMealId": "{{LocRef}}"51001504, //Whopper with Cheese Combo  Reward
  "rvcRef": {{RvcRef}},         "idempotencyIdcomboItem": "{{$guid}}",{
                "orderTypeRefmenuItemId": 9,
  51001504, //Whopper with Cheese Combo Reward
     "checkEmployeeRef": {{check_employee_ref}}     },     "menuItemsdefinitionSequence": []1,

   "comboMeals": [         {   "quantity": 1
        "comboMealId": 51002003, // Cheeseburger reward},
            "comboItemmainItem": {
                "menuItemId": 510020031001003, // CheeseburgerWhopper with rewardcheese PLUALC
                "definitionSequence": 1,
                "quantity": 1
            },
            "mainItemsideItems": [
                {
                    "menuItemId": 10020031013201, //Small pepsi
A la carte cheeseburger                 "definitionSequence": 1,
                    "quantity": 1
                },
                {
  "sideItems": []                  "menuItemId": 2102002, //Small fries
          }     ],     "tendersdefinitionSequence": [
1,
       {             "tenderIdquantity": 1
     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": [
         }
    ],
    {"tenders": [
       "id": "7ee7338a-a016-47c6-aef6-3783d40c003e", // Reward Sanity id {
            "externalReferenceIdtenderId": "123", // Reward constant plu defined in Sanity
 901
        }
    ]
}

Reward with a combo + premium modifier

Expand
titleRBI Partner API
Code Block
{
    "quantitypayload": 1,{
        "pricenumber": {
 "5848",
        "amountfees": 0,[
          "currency": "SAR", {
       }         "typetotal": "Reward", {
                    "menuSelectionsamount": [
  19,
       {             "externalReferenceIdcurrency": "51056EUR", //
item constant plu             "id": "item_1862" },
// item Sanity id             "menuSelectionstype": [],"BAG_FEE"
            "price":}
{        ],
        "amountserviceMode": 2495"DELIVERY",
// normal price        "channel": "WHITELABEL_DELIVERY",
        "currencycallbackUrl": "SAR"https://euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/15c3dbe1-5165-404b-8858-088239d14014/price/callback",
        "id": "15c3dbe1-5165-404b-8858-088239d14014",
     },   "storeId": "12349",
        "quantitycart": 1,{
            "typemenuSelections": "Item"
[
         }         ]{
      }     ]   } ]
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
{     "headerexternalReferenceId": "948351",
 {         "orgShortName": "{{OrgShortName}}",         "locRefquantity": "{{LocRef}}",1,
          "rvcRef": {{RvcRef}},         "idempotencyIdmenuSelections": "{{$guid}}", [
             "orderTypeRef": 9,         "checkEmployeeRef": {{check_employee_ref}},

       "language": "es-ES",         "Accept-Language": "es-ES"     },     "menuItemsexternalReferenceId": []"502617",
    "comboMeals":  [         {             "comboMealIdquantity": 510020031,
// Cheeseburger reward             "comboItem": {            "menuSelections": [
   "menuItemId": 51002003, // Cheeseburger reward                 "definitionSequence": 1,       {
         "quantity": 1             },             "mainItemexternalReferenceId": {"502633",
                "menuItemId": 1002003, // Cheeseburger ALC                 "definitionSequencequantity": 1,
                  "quantity": 1,                 "condimentsmenuSelections": [
                    {                     {
   "condimentId": 9011005, // Add bacon. Premium modifier (extra cost)                         "priceSequence": 2,       "externalReferenceId": "528232",
                "quantity": 2                     }      "quantity": 1,
         ]             },             "sideItems": []        "price": }{
    ],     "tenders": [         {             "tenderId": 901         }     ] }

Reward with a combo

Expand
titleRBI Partner API
Code Block
"cart"amount": {90,
  "menuSelections": [     {       "externalReferenceId": "8351", // reward plu       "id": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //reward sanity id         "menuSelections": [        "currency": "EUR"
   {                 "externalReferenceId": "8350", // combo plu                 "id": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //combo sanity},
id                 "menuSelections": [                     {     "id": "8ba0df7b35df",
                  "externalReferenceId": "10059",                         "idtype": "item_1852",ItemOptionModifier"
                            "menuSelections": [],           }
             "price": {                      ],
      "amount": 0,                             "currencyprice": "SAR"{
                               },         "amount": 0,
              "quantity": 1,                         "typecurrency": "Item"EUR"
                           },         },
           {                         "externalReferenceIdid": "80007item_11107",
                           "id": "4f99db1e-128a-4e53-b23b-dffc0fedf636",        "type": "Item"
               "menuSelections": [],                },
        "price":  {                      {
      "amount": 0,                             "currencyexternalReferenceId": "SAR942258",
                        },              "quantity": 1,
          "quantity": 1,                         "typeprice": "Item" {
                                    },    "amount": 0,
               {                         "externalReferenceIdcurrency": "80001",EUR"
                             "id": "16f482db-2f13-4476-88d3-d2eec26057f3",      },
                  "menuSelections": [],                 "id": "item_11126",
      "price": {                             "amounttype": 0,"Item"
                            "currency": "SAR"   },
                     },              {
          "quantity": 1,                         "typeexternalReferenceId": "Item527646",
                    },                "quantity": 1,
   {                         "externalReferenceId": "141139",       "price": {
                "id": "141139",                         "menuSelectionsamount": []0,
                        "price": {                     "currency": "EUR"
       "amount": 0,                            },
"currency": "SAR"                         },               "id": "9aac0a46-5a73-431d-937c-8848ca01ac86",
         "quantity": 1,                           "type": "Item"
                    }            }
           ],                 "price": {],
                 "amount": 300, // original price of combo     "price": {
          "currency": "SAR"                  },   "amount": 875,
             "quantity": 1,                  "typecurrency": "ComboEUR"
                 }               ],
 },
            "price": {               "amountid": 0, // final price of the reward"a2e73fd9-5f3d-4afc-9585-43ebd7bbc6dc",
                  "currency": "SAR"            "type": "Combo"
  },               "quantity": 1,      }
        "type": "Reward"           ],
 }         ]     },
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
languagejson
{     "headerprice": {
        "orgShortName": "{{OrgShortName}}",                "locRefamount": "{{LocRef}}",450,
           "rvcRef": {{RvcRef}},             "idempotencyIdcurrency": "{{$guid}}",EUR"
         "orderTypeRef": 9,         "checkEmployeeRef": {{check_employee_ref}},
          "language": "es-ES",         "Accept-Languageid": "es-ES"024f9096-e3ee-45fc-8f76-d75e272ff9e9",
            },     "menuItems": [],
    "comboMealstype": ["Reward"
        {        }
    "comboMealId": 51001504, //Whopper with Cheese Combo Reward  ]
        }
 "comboItem": {  }
}
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
{
    "header": {
        "menuItemIdorgShortName": 51001504"{{OrgShortName}}",
//Whopper with Cheese Combo Reward        "locRef": "{{LocRef}}",
        "definitionSequencervcRef": 1,{{RvcRef}},
        "idempotencyId": "{{$guid}}",
        "quantity": 1orderTypeRef": 9,
        "checkEmployeeRef": {{check_employee_ref}},
    },    "language": "es-ES",
        "mainItemAccept-Language": {"es-ES"
    },
      "menuItems": [],
    "menuItemIdcomboMeals": 1001003,[
// Whopper with cheese ALC    {
            "definitionSequencecomboMealId": 151001504, // Whopper Cheese combo reward
            "quantitycomboItem": 1
        {
   },             "sideItemsmenuItemId": [
   51001504, //// Whopper Cheese combo reward
             {   "definitionSequence": 1,
                "menuItemIdquantity": 1013201,1
//Small pepsi           },
         "definitionSequence": 1,  "mainItem": {
                 "quantitymenuItemId": 11001003, // whopper cheese
             },   "definitionSequence": 1,
             {   "quantity": 1,
                "menuItemIdcondiments": [
2102002, //Small fries                  {
  "definitionSequence": 1,                     "quantitycondimentId": 19011005, // Add bacon. Premium modifier (extra cost)
         }             ]  "priceSequence": 2,
     }     ],     "tenders": [         {
 "quantity": 2
          "tenderId": 901         }
 
  ] }

Reward with a combo + premium modifier

Expand
titleRBI Partner API
Code Block
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
{     "header": {       ]
 "orgShortName": "{{OrgShortName}}",         "locRef": "{{LocRef}}",
            "rvcRefsideItems": {{RvcRef}}, [
               "idempotencyId": "{{$guid}}",{
          "orderTypeRef": 9,         "checkEmployeeRefmenuItemId": {{check_employee_ref}},1013201, // Small fries
          "language": "es-ES",         "Accept-LanguagedefinitionSequence": "es-ES" 1,
     },     "menuItems": [],     "comboMeals": [   "quantity": 1
    {            },
"comboMealId": 51001504, // Whopper Cheese combo reward          {
  "comboItem": {                 "menuItemId": 510015042000008, //// Whopper Cheese combo reward Icy mango. Premium drink (extra cost)
                    "definitionSequence": 1,
                    "quantity": 1
                },
            ]
"mainItem": {       }
    ],
    "menuItemIdtenders": 1001003, // whopper cheese[
        {
            "definitionSequencetenderId": 1, 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": {
          "quantity"number": 1,
           "5803",
    "condimentsfees": [
        {
           {        "total": {
                "condimentIdamount": 901100519,
// Add bacon. Premium modifier (extra cost)           "currency": "EUR"
            "priceSequence": 2,
           },
            "quantitytype": 2
           "BAG_FEE"
        }
     ],
     "serviceMode": "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",
     "sideItemsorderDiscounts": [
        {
       {       "type": "amount",
             "menuItemIdvalue": 200
 1013201, // Small fries    }
     ],
    "storeId": "12349",
    "definitionSequencecart": {	
 1,        "menuSelections": [
           "quantity": 1 {
               }, "externalReferenceId": "502633",
              {   "quantity": 1,
                "menuItemIdprice": 2000008,{
// Icy mango. Premium drink (extra cost)
                    "definitionSequenceamount": 1645,
                    "quantitycurrency": 1"EUR"
                },
            ]     "id": "item_11107",
  }     ],     "tenders": [    "type": "Item"
    {         }
   "tenderId": 901    ]
    }
   
] }

...

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
titleRBI Partner APIOracle TS Gen 2 (Commit call)
Code Block
languagejson
"payload": {
    "numberheader": "5803",
    "fees": [
        {
   
        "totalorgShortName": {
       "{{OrgShortName}}",
        "amountlocRef": 19,
     "{{LocRef}}",
           "currencyrvcRef": "EUR"
             },
   {{RvcRef}},
        "typeidempotencyId": "BAG_FEE"{{$guid}}",
        }
     ],
     "serviceMode": "DELIVERY","orderTypeRef": 9,
        "channelcheckEmployeeRef": "WHITELABEL_DELIVERY",{{check_employee_ref}}
    "callbackUrl": "https://euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/60c1983c-8cbc-4aa8-9486-c55fa78566f5/price/callback"},
    "idmenuItems": "60c1983c-8cbc-4aa8-9486-c55fa78566f5",[
    "orderDiscounts": [   {   "menuItemId":1001001, // Whopper {ALC
            "typedefinitionSequence": "amount"1,

            "valuequantity": 2001
        }

    ],
    "storeIdtenders": "12349",
[
   "cart": {	    {
     "menuSelections": [      "tenderId": 901
      {  }
    ],
    "discounts" : [
  "externalReferenceId": "502633",     {
            "quantitydiscountId": 1104, // PLU for the cart level amount discount 
       "price": {    "referenceText":    "Reward 1234",
            "amounttotal": 645,10 // the amount that you are discounting. 10 euros off. We can send whatever amount we want
   "currency": "EUR"    }
    ]
}

Reward with a product discount

Expand
titleRBI Partner API
Code Block
languagejson
{
    "payload": {
},        "number": "5807",
        "id": "item_11107",
fees": [
            {
   "type": "Item"            "total": {
}         ]     }  }
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
{
    "headeramount": 19,
 {         "orgShortName": "{{OrgShortName}}",         "locRefcurrency": "{{LocRef}}",
  EUR"
     "rvcRef": {{RvcRef}},         "idempotencyId": "{{$guid}}",
 
      "orderTypeRef": 9,         "checkEmployeeReftype": {{check_employee_ref}}"BAG_FEE"
      },     "menuItems": [}
        {],
  "menuItemId":1001001, // Whopper ALC   "serviceMode": "DELIVERY",
        "definitionSequencechannel": 1,
   "WHITELABEL_DELIVERY",
        "quantitycallbackUrl": 1"https://euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/781f28e9-d6bb-4c8e-9ea6-e65a2e7c3764/price/callback",
        }
"id": "781f28e9-d6bb-4c8e-9ea6-e65a2e7c3764",
   ],     "tendersorderDiscounts": [ [
            {
  {              "tenderIdplu": 901"948348",
        }     ],    "type": "discountspercentage",
  : [         {    "value": 50
       "discountId": 104, // PLU for the}
cart level amount discount     ],
        "referenceTextstoreId": "Reward 123412349",
   
        "totalcart": 10{
// the amount that you are discounting. 10 euros off.   "menuSelections": [
    }     ] }

Reward with a product discount

Code Block
languagejson
{
     
"payload":
 {
          
"number":
 
"5807",
         "
fees
externalReferenceId": 
[
"948348",
   
{
                 "
total
quantity": 
{
1,
                    "
amount
menuSelections": 
19,
[
                    
"currency":
 
"EUR"
   
{
           
},
                 "
type
externalReferenceId": "
BAG_FEE
502633",
            
}
         
],
       
"
serviceMode
quantity": 
"DELIVERY",
1,
                  
"channel":
 
"WHITELABEL_DELIVERY",
         "
callbackUrl
price": 
"https://euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/781f28e9-d6bb-4c8e-9ea6-e65a2e7c3764/price/callback",
{
        
"id":
 
"781f28e9-d6bb-4c8e-9ea6-e65a2e7c3764",
         
"orderDiscounts":
 
[
             
{
"amount": 0,
               
"plu":
 
"948348",
                "
type
currency": "
percentage
EUR"
,

                
"value":
 
50
           },
 
}
         
],
         
"storeId":
 
"12349",
        "id": "
cart
item_11107"
:
,
{
             
"menuSelections":
 
[
              "type": "Item"
 
{
                     
"externalReferenceId":
 
"948348",
 }
                   
"quantity":
 
1
],
                    "
menuSelections
price": 
[
{
                        
{
"amount": 645,
                        "
externalReferenceId
currency": "
502633",
EUR"
                    },
             
"quantity":
 
1,
      "id": "fbdead97-5acb-4d1c-a5fe-5794ece61aaa",
                    "type": "
price
Reward"
:

{
                }
            ]
   
"amount":
 
0,
    }
    }
}
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
languagejson
{
    "header": {
        "orgShortName": "{{OrgShortName}}",
        "
currency
locRef": "
EUR
{{LocRef}}",
        "rvcRef": {{RvcRef}},
        "idempotencyId": "{{$guid}}",
        "orderTypeRef": 
}
9,
        "checkEmployeeRef": {{check_employee_ref}}
    },
    "menuItems": [
        
"id": "item_11107",
{
            "menuItemId": 1001001, // Whopper
            
"
type
definitionSequence": 
"Item"
1,
            "quantity": 1,
          
}
  "itemDiscounts": [
                
],
{
                    "
price
discountId":
{
 104, // PLU of the product amount discount off
                    "
amount
referenceText": 
645,
"Reward Item 
Discount",
                    "
currency
total":
"EUR"
 59 // amount of discount (can be sent as any number). 59 pesos off the whopper ALC price.
     
},
           }
         
"id":
 
"fbdead97-5acb-4d1c-a5fe-5794ece61aaa",
  ]
        }
    ],
    "
type
tenders": 
"Reward"
[
        {
       
}
     
]
"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
"cart": {
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
{
    "
menuSelections
header": 
[
{
 
{
       "
externalReferenceId
orgShortName": "
8351
{{OrgShortName}}",
//

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

    ],
    "tenders": [
        {
    
"quantity":
 
1,
       "tenderId": 901
        }
    ]
}

Offer with a combo

Expand
titleRBI Partner API
Code Block
languagejson
"cart": {
  "
type
menuSelections": 
"Item"
[
    {
      "externalReferenceId": "8351", // offer plu
    
},
  "id": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //offer sanity id
        "menuSelections": [
    
{
        {
                "externalReferenceId": "
142538
8167", // combo 
plu
                
"id": "
142538
d90a7113-0620-44d9-b678-743330a2f207", //combo sanity 
id
                "menuSelections": [
],

                   
"price":
 {

                        "
amount
externalReferenceId": 
0,
"80003",
                        "
currency
id": "
SAR"
ce847c79-9eb5-4be3-8a1e-842919aa5ba0",
                        
}
"menuSelections": [],
                        "
quantity
price": {
   
1,
                         "
type
amount":
"Item"
 0,
                       
}
     "currency": "SAR"
          
],
              },
  
"price":
 
{
                     "
amount
quantity": 
500
1,
//price
 
of
 
the
 
combo
                     "
currency
type": "
SAR
Item"
                
},
    },
            
],
        {
        
"price":
 
{
               "
amount
externalReferenceId": 
100
"142538",
  
//
 
final
 
price
 
of
 
the
 
offer
                 "
currency
id": "
SAR
142538",
                
},
        
"menuSelections": [],
      
"quantity":
 
1,
                 "
type
price": {
 
"Offer"
             
}
         
]
     
},

Offer with a picker

Code Block
"cart": {
"amount": 0,
    
"menuSelections":
 
[
     
{
       
"externalReferenceId":
 
"8351",
 
//
 
offer
 
plu
       "
id
currency": "
43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //offer sanity id
SAR"
                  
"menuSelections":
 
[
     },
       
{
                 "
externalReferenceId
quantity": 
"8168", //combo plu
1,
                        "
id
type": "
3318d2c2-99d3-40f9-92d2-1798d9c5e987", //combo sanity id
Item"
                    }
        
"menuSelections":
 
[
       ],
             
{
   "price": {
                    "
externalReferenceId
amount": 
"20001"
500, //price of the combo
                    "
id
currency": "
item_61936
SAR"
,

                },
       
"menuSelections":
 
[],
        ],
                "price": {
                "amount": 100, // final price of the offer
     
"amount":
 
0,
          "currency": "SAR"
                },
"currency":
 
"SAR"
               "quantity": 1,
        
},
        "type": "Offer"
            }
  
"quantity":
 
1,
     ]
    },
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
languagejson
{
    "header": {
        "
type
orgShortName": "
Item
{{OrgShortName}}",
        "locRef": "{{LocRef}}",
        
"rvcRef": {{RvcRef}},
        "idempotencyId": "{{$guid}}",
        "orderTypeRef": 9,
{
        "checkEmployeeRef": {{check_employee_ref}}
    },
    
"externalReferenceId": "80002",
"menuItems": [],
    "comboMeals": [
        {
            
"
id
comboMealId": 
"865a632f-e2f7-4e2b-8fcc-9281aa3f5868"
4000045, // Buy one Cone, Get one Cone for free Offer 
PLU
            "
menuSelections
comboItem": 
[],
{
                "menuItemId": 4000045, // Buy one Cone, Get one 
"price": {
Cone for free Offer PLU
                "definitionSequence": 1,
       
"amount":
 
0,
        "quantity": 1
            },
      
"currency":
 
"SAR"
     "sideItems": [{
                "menuItemId": 1014013, 
},
// Vanilla Cone (could be any selection of cones)
                "
quantity
definitionSequence": 1,

                "
type
quantity": 
"Item"
1
            },
       
},
     {
                
{
"menuItemId": 1014012, // Strawberry Cone (could be any selection of cones)
                "
externalReferenceId
definitionSequence": 
"80008"
1,
                "quantity": 1
      
"id":
 
"04462c22-bf58-4eee-842a-213e3d17a072",
     }]
        }
    
],
    "
menuSelections
tenders": [
],

        {
            "tenderId": 901
        }
 
"price":
 
{
  ]
}

Offer with a cart discount

Expand
titleRBI Partner API
Code Block
languagejson
{
    "payload": {
        
"number": "5814",
        "
amount
fees": 
0,
[
            {
                "
currency
total": 
"SAR"
{
                    "amount": 19,
    
},
                "currency": "EUR"
       
"quantity":
 
1,
        },
                "type": "
Item
BAG_FEE"
            }
        
}
],
        "serviceMode": "DELIVERY",
        "channel": 
{
"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",
        "
externalReferenceId
orderDiscounts": 
"142538",
[
            {
                "
id
type": "
142538
percentage",
                "value": 20
      
"menuSelections":
 
[],
     }
        ],
        
"storeId": "
price
12349"
:
,
  
{
      "cart": {
            "menuSelections": [
       
"amount":
 
0,
        {
                    "
currency
externalReferenceId": "
SAR
502633",
                    
},
"quantity": 1,
                    "
quantity
price": 
1,
{
                        "
type
amount": 
"Item"
645,
                    
}
    
"currency": "EUR"
         
],
           
"price": {
},
                    "
amount
id":
500, //price of the combo
 "item_11107",
                    "
currency
type": "
SAR
Item"
                }
,

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

Offer with a cart discount

Code Block
{
],
    "
payload
tenders": [
  
{
      {
  
"number":
 
"5814",
         "
fees
tenderId": 
[
901
        }
   
{
 ],
    "discounts" : 
[
       
"total":
 {

            "
amount
discountId": 
19
106, // PLU for the cart level percent discount 
            "
currency
referenceText": "
EUR" },
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