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,
                        "idtype": "7ee7338a-a016-47c6-aef6-3783d40c003e", // Reward Sanity idItem"
                   "externalReferenceId": "123", // Reward constant plu defined in Sanity }
               "quantity": 1],
                "price": {
                "amount": 0,300, // original price of combo
                "currency": "SAR",
         }        },
"type": "Reward",          "menuSelections": [     "quantity": 1,
    {             "externalReferenceIdtype": "51056", // item constant pluCombo"
             "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}},
        "idempotencyIdlanguage": "{{$guid}}es-ES",
        "orderTypeRefAccept-Language": 9,"es-ES"        
"checkEmployeeRef": {{check_employee_ref}}
    },
    "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": []
                {
          }     ],     "tendersmenuItemId": [
 1013201, //Small pepsi
       {             "tenderIddefinitionSequence": 901 // payment method ID. Pay at Counter for this example. 1,
                    "quantity": 1
          }     ] }
Info
Expand
titleRBI Partner API
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

Code Block
"cart":
[   {     "menuSelections": [       {
 
      "id": "7ee7338a-a016-47c6-aef6-3783d40c003e", // Reward Sanity id         "externalReferenceIdmenuItemId": "123"2102002, //Small Rewardfries
constant plu defined in Sanity
        "quantity": 1,         "pricedefinitionSequence": {
 1,
        "amount": 0,           "currencyquantity": "SAR",1
        }        }
"type": "Reward",          "menuSelections": []
        }
 {   ],
    "tenders": [
   "externalReferenceId": "51056", // item constant plu{
            "idtenderId": "item_1862", // item Sanity id
 901
        }
      ]
}

Reward with a combo + premium modifier

Expand
titleRBI Partner API
Code Block
{
    "menuSelectionspayload": [],{
           "number": "price5848":,
 {       "fees": [
        "amount": 2495, // normal price{
                "currencytotal": "SAR"
  {
       },             "quantityamount": 119,
            "type": "Item"       "currency": "EUR"
  }
        ]       }
    ]
  }
]
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
{
    "header": {
 ,
      "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": [],
    "comboMeals": ["12349",
         "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)                         "priceSequenceexternalReferenceId": 2,
              "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", // combo plu1,
                       "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",                         "id": "16f482db-2f13-4476-88d3-d2eec26057f3",              "externalReferenceId": "942258",
          "menuSelections": [],                         "pricequantity": {1,
                            "amount": 0,            "price": {
                "currency": "SAR"                         },
 "amount": 0,
                      "quantity": 1,                 "currency": "EUR"
      "type": "Item"
                    },         },
           {                         "externalReferenceIdid": "141139item_11126",
                        "id": "141139",            "type": "Item"
               "menuSelections": [],                },
        "price": {                       {
     "amount": 0,                               "currencyexternalReferenceId": "SAR527646",
                        },              "quantity": 1,
          "quantity": 1,                         "typeprice": "Item" {
                        }                "amount": ]0,
                  "price": {                 "amount": 300, // original price of combo"currency": "EUR"
                 "currency": "SAR"                  },
                 "quantity": 1,                  "typeid": "Combo"9aac0a46-5a73-431d-937c-8848ca01ac86",
                 }                   "type": "Item"
      ],               "price": {          }
    "amount": 0, // final price of the reward               "currency": "SAR" ],
             },               "quantityprice": 1, {
                    "type": "Reward"           "amount": 875,
}         ]     },
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
languagejson
{        "header": {         "orgShortNamecurrency": "{{OrgShortName}}EUR",
        "locRef": "{{LocRef}}",         "rvcRef": {{RvcRef}},         "idempotencyId": "{{$guid}}",
        "orderTypeRef": 9,         "checkEmployeeRef": {{check_employee_ref}},         "languageid": "es-ES",a2e73fd9-5f3d-4afc-9585-43ebd7bbc6dc",
                            "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": "mainItem": {024f9096-e3ee-45fc-8f76-d75e272ff9e9",
                    "menuItemIdtype": 1001003, // Whopper with cheese ALC
  "Reward"
                }
            ]
 "definitionSequence": 1,      }
    }
}
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
{
    "quantityheader": 1{
            }"orgShortName": "{{OrgShortName}}",
            "sideItemslocRef": ["{{LocRef}}",
        "rvcRef": {{RvcRef}},
       { "idempotencyId": "{{$guid}}",
        "orderTypeRef": 9,
        "menuItemIdcheckEmployeeRef": 1013201{{check_employee_ref}},
//Small pepsi       "language": "es-ES",
           "Accept-Language": "definitionSequencees-ES":
 1,   },
    "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": 1,
  901         }     ]
}

Reward with a combo + premium modifier

Expand
titleRBI Partner API
Code Block
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
{"condiments": [
    "header":  {         "orgShortName": "{{OrgShortName}}",    {
    "locRef": "{{LocRef}}",         "rvcRef": {{RvcRef}},         "idempotencyIdcondimentId": "{{$guid}}",
   9011005, // Add bacon. Premium modifier (extra cost)
    "orderTypeRef": 9,         "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": 1
 9011005, // 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": [
        {
              "type": "amount",
     "menuItemId": 2000008, // Icy mango. Premium drink (extra cost)
 "value": 200
        }
     ],
    "definitionSequencestoreId": 1,
   "12349",
      "cart": {	
         "quantitymenuSelections": [
1             {
   }             ]
"externalReferenceId": "502633",
       }     ],     "tendersquantity": [1,
        {             "tenderIdprice": 901{
        }     ] }

Reward with a cart discount

Expand
titleRBI Partner API
Code Block
languagejson
"payload": {     "numberamount": "5803",
    "fees": [
645,
       {             "totalcurrency": {"EUR"
                "amount": 19},
                 "currencyid": "EUR"
        item_11107",
    },             "type": "BAG_FEE""Item"
             }
        ],
    }
 "serviceMode": "DELIVERY",
}
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
{
    "channelheader": "WHITELABEL_DELIVERY", {
        "callbackUrlorgShortName": "https://euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/60c1983c-8cbc-4aa8-9486-c55fa78566f5/price/callback",{{OrgShortName}}",
        "idlocRef": "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": 1,901
        }
    ],
    "pricediscounts" : [
{        {
            "amountdiscountId": 645104, // PLU for the cart level amount discount 
            "currencyreferenceText": "EUR"Reward 1234",
            "total": 10 // the amount that you are discounting. 10 euros },off. We can send whatever amount we want
        }
 "id": "item_11107",  ]
}

Reward with a product discount

Expand
titleRBI Partner API
Code Block
languagejson
{
    "payload": {
        "typenumber": "Item"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
{
    "headertotal": {
          "orgShortName": "{{OrgShortName}}",         "locRefamount": "{{LocRef}}",19,
          "rvcRef": {{RvcRef}},         "idempotencyIdcurrency": "{{$guid}}",EUR"
           "orderTypeRef": 9,    },
    "checkEmployeeRef": {{check_employee_ref}}       },     "menuItemstype": ["BAG_FEE"
           { }
 "menuItemId":1001001, // Whopper ALC    ],
        "definitionSequenceserviceMode": 1,"DELIVERY",
        "channel": "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. We can send whatever amount we want"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