Versions Compared

Key

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

...

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": [
        {
            "total": {
                "amount": 19,
                 "currency": "EUR"
             },
            "type": "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",
    "orderDiscounts": [
        {
            "type": "amount",
             "value": 200
        }
     ],
    "storeId": "12349",
    "cart": {	
         "menuSelections": [
             {
                "externalReferenceId": "502633",
                 "quantity": 1,
                "price": {
                    "amount": 645,
                    "currency": "EUR"
                },
                 "id": "item_11107",
                 "type": "Item"
             }
        ]
    }
 }
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
{
    "header": {
        "orgShortName": "{{OrgShortName}}",
        "locRef": "{{LocRef}}",
        "rvcRef": {{RvcRef}},
        "idempotencyId": "{{$guid}}",
        "orderTypeRef": 9,
        "checkEmployeeRef": {{check_employee_ref}}
    },
    "menuItems": [
        {   "menuItemId":1001001, // Whopper ALC
            "definitionSequence": 1,
            "quantity": 1
        }
    ],
    "tenders": [
        {
            "tenderId": 901
        }
    ],
    "discounts" : [
        {
            "discountId": 104, // PLU for the cart level amount discount 
            "referenceText": "Reward 1234",
            "total": 10 // the amount that you are discounting. 10 euros off. We can send whatever amount we want
        }
    ]
}

...

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": 106104, // PLU of the product amount discount off
                    "referenceText": "OfferReward Item Discount",
                    "total": 59 // amount of discount (can be sent as any number). 59 pesos off the whopper ALC price.
                }
            ]
        }
    ],
    "tenders": [
        {
            "tenderId": 901
        }
    ]
}

...

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
"cart": {
Code Block
languagejson
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
{
    "menuSelectionsheader": [
  {
 {       "externalReferenceIdorgShortName": "8351{{OrgShortName}}", //
offer plu       "idlocRef": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //offer sanity id{{LocRef}}",
        "menuSelectionsrvcRef": [{{RvcRef}},
            {
      "idempotencyId": "{{$guid}}",
         "externalReferenceIdorderTypeRef": "8167"9,
// combo plu      "checkEmployeeRef": {{check_employee_ref}}
    },
    "idmenuItems": "d90a7113-0620-44d9-b678-743330a2f207"[],
//combo sanity id  "comboMeals": [
        {
    "menuSelections": [       "comboMealId": 4000045, // Offer PLU for vanilla cone
      {      "comboItem": {
                 "externalReferenceIdmenuItemId": "80003"4000045, // Offer PLU for vanilla   cone
                "iddefinitionSequence": "ce847c79-9eb5-4be3-8a1e-842919aa5ba0"1,
                        "menuSelections"quantity": 1
[],            },
            "pricemainItem": {
                "menuItemId": 1014013, // Vanilla Cone   ALC
    "amount": 0,           "definitionSequence": 1,
                "currencyquantity": "SAR"1
            },
           }, "sideItems": []
        }
        ],
    "quantitytenders": 1,[
           {
            "typetenderId": "Item"901
        }
    ]
}

Offer with a combo

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

                           "currencyid": "SAR"ce847c79-9eb5-4be3-8a1e-842919aa5ba0",
                        }"menuSelections": [],
                        "quantityprice": {
   1,                         "typeamount": "Item" 0,
                       }     "currency": "SAR"
          ],              },
  "price": {                     "amountquantity": 5001,
//price of the combo                     "currencytype": "SARItem"
                },     },
           ],          {
      "price": {                 "amountexternalReferenceId": 100"142538",
//   final price of the offer                 "currencyid": "SAR142538"
,
               },         "menuSelections": [],
      "quantity": 1,                 "typeprice": {
 "Offer"             }         ]     },
Expand
titleOracle TS Gen 2 (Commit call)
Code Block

Offer with a picker

Expand
titleRBI Partner API
Code Block
languagejson
"cart": {
  "menuSelections": ["amount": 0,
          {       "externalReferenceId": "8351", // offer plu       "idcurrency": "43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //offer sanity idSAR"
           "menuSelections": [            },
{                 "externalReferenceId": "8168", //combo plu    "quantity": 1,
           "id": "3318d2c2-99d3-40f9-92d2-1798d9c5e987", //combo sanity id         "type": "Item"
       "menuSelections": [            }
        {        ],
                "externalReferenceIdprice": "20001",{
                        "idamount": "item_61936"500, //price of the combo
                    "menuSelectionscurrency": [],"SAR"
                },
       "price": {            ],
                "amountprice": 0,{
                "amount": 100, // final price of the offer
    "currency": "SAR"           "currency": "SAR"
            },        },
                "quantity": 1,
     
                  "type": "ItemOffer"
   
                },
        ]
     },
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
languagejson
{
    "header": {
               "orgShortName": "{{OrgShortName}}",
        "externalReferenceIdlocRef": "80002{{LocRef}}",
               "rvcRef": {{RvcRef}},
        "ididempotencyId": "865a632f-e2f7-4e2b-8fcc-9281aa3f5868{{$guid}}",
        "orderTypeRef": 9,
        "checkEmployeeRef": {{check_employee_ref}}
    },
    "menuSelectionsmenuItems": [],
    "comboMeals": [
        {
            "pricecomboMealId": {4000045, // Buy one Cone, Get one Cone for free Offer PLU
                 "amountcomboItem": 0,
           {
                "currencymenuItemId": "SAR"
          4000045, // Buy one Cone, Get one Cone for free Offer PLU
             },        "definitionSequence": 1,
                "quantity": 1,
            },
            "typesideItems": "Item"[{
                "menuItemId": 1014013, // Vanilla },Cone (could be any selection of cones)
              {  "definitionSequence": 1,
                "quantity": 1
   "externalReferenceId": "80008",        },
            {
   "id": "04462c22-bf58-4eee-842a-213e3d17a072",             "menuItemId": 1014012, // Strawberry Cone (could be any selection of cones)
        "menuSelections": [],       "definitionSequence": 1,
                "pricequantity": {1
            }]
        }
      "amount": 0],
    "tenders": [
         {
            "currencytenderId": "SAR"901
        }
    ]
}

Offer with a cart discount

Expand
titleRBI Partner API
Code Block
languagejson
{
    "payload": {
   },     "number": "5814",
              "fees": [
   "quantity": 1,        {
                "typetotal": "Item"{
                    }"amount": 19,
                    {
"currency": "EUR"
                       "externalReferenceId": "142538",
  },
                     "idtype": "142538BAG_FEE",
                }
       "menuSelections": [],
          "serviceMode": "DELIVERY",
             "pricechannel": {
        "WHITELABEL_DELIVERY",
                   "amount": 0"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": [
    "currency": "SAR"       {
                 }"type": "percentage",
                "value": 20
      "quantity": 1,     }
          ],
        "typestoreId": "Item12349",
        "cart": {
          }  "menuSelections": [
             ],   {
             "price": {        "externalReferenceId": "502633",
                    "amountquantity": 5001,
//price of the combo                 "price": {
  "currency": "SAR"                 },    "amount": 645,
         ],               "pricecurrency": {"EUR"
                   "amount": 100},
// final price of the offer               "currencyid": "SAR"
 item_11107",
            },                 "quantity"type": 1,"Item"
                "type": "Offer"}
            ]
}        }
]    }
},
Expand
titleOracle TS Gen 2 (Commit call)
Code Block

Offer with a cart discount

Expand
titleRBI Partner API
Code Block
languagejson
{
    "payloadheader": {
        "numberorgShortName": "5814{{OrgShortName}}",
        "feeslocRef": ["{{LocRef}}",
        "rvcRef": {{RvcRef}},
  {        "idempotencyId": "{{$guid}}",
        "totalorderTypeRef": {9,
        "checkEmployeeRef": {{check_employee_ref}}
     },
    "amountmenuItems": 19,[
        {   "menuItemId":1001001, // Whopper ALC
            "currencydefinitionSequence": "EUR"1,
            "quantity": 1
  },      }
     ],
    "typetenders": "BAG_FEE"[
        {
   }         ],
"tenderId": 901
       "serviceMode": "DELIVERY", }
    ],
    "discounts" : [
        {
            "discountId": 106, // PLU for the cart level percent discount 
            "channelreferenceText": "WHITELABEL_DELIVERYOffer 1234",
            "callbackUrltotal": "https://euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/6d66a02e-810f-478f-bf0d-b69bfcb56d51/price/callback",10 // the percentage that you are discounting. 10% off. We can send whatever percentage we want
        }
    ]
}

Offer with a product discount

Expand
titleRBI Partner API
Code Block
{
    "payload": {
        "idnumber": "6d66a02e-810f-478f-bf0d-b69bfcb56d515821",
        "orderDiscountsfees": [
            {
                "total": {
   {                 "typeamount": "percentage"19,
                "value": 20   "currency": "EUR"
        }         ]},
        "storeId": "12349",         "carttype": {"BAG_FEE"
            "menuSelections":}
[        ],
        {
"serviceMode": "DELIVERY",
          "channel": "WHITELABEL_DELIVERY",
        "externalReferenceIdcallbackUrl": "502633https://euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/ed50be10-cf7c-4b1c-8bb1-0c2625cbf3be/price/callback",
           "id": "ed50be10-cf7c-4b1c-8bb1-0c2625cbf3be",
        "quantityorderDiscounts": 1,[
            {
       "price": {        "plu": "502617",
                "amounttype": 645,
       "percentage",
                "currencyvalue": 20
"EUR"            }
        }],
           "storeId": "12349",
        "idcart": "item_11107",{
            "menuSelections": [
      "type": "Item"         {
       }             ]
"externalReferenceId": "502617",
       }     }
}
Expand
titleOracle TS Gen 2 (Commit call)
Code Block

Offer with a product discount

Expand
titleRBI Partner API
Code Block
{        "payloadquantity": 1,
 {         "number": "5821",         "feesmenuSelections": [
             {           {
     "total":  {                     "amountexternalReferenceId": 19"502633",
                    "currency": "EUR"       "quantity": 1,
           },                 "typeprice": "BAG_FEE" {
              }         ],         "serviceModeamount": "DELIVERY"0,
        "channel": "WHITELABEL_DELIVERY",
        "callbackUrl": "https://euw3-staging-bk-partners-api.rbictg.com/api/v1/orders/ed50be10-cf7c-4b1c-8bb1-0c2625cbf3be/price/callback",                 "idcurrency": "ed50be10-cf7c-4b1c-8bb1-0c2625cbf3be",EUR"
        "orderDiscounts": [             {      },
          "plu": "502617",                 "typeid": "percentageitem_11107",
                "value": 20           "type": "Item"
}         ],         "storeId": "12349",     },
   "cart": {             "menuSelections": [      {
          {
                    "externalReferenceId": "502617942258",

                   "quantity": 1,        "quantity": 1,
           "menuSelections": [                "price":  {
      {                             "externalReferenceIdamount": "502633"0,
                            "quantity": 1,   "currency": "EUR"
                        "price": {    },
                            "amountid": 0,
   "item_11126",
                            "currencytype": "EURItem"
                        },
    },                    {
        "id": "item_11107",                   "externalReferenceId": "527646",
        "type": "Item"                   "quantity": 1,
    },                        "price": {
                                "externalReferenceIdamount": "942258"0,
                            "quantity": 1,   "currency": "EUR"
                        "price": {   },
                            "id": "amount": 0,
   9aac0a46-5a73-431d-937c-8848ca01ac86",
                            "currencytype": "EURItem"
 
                          },
                    ],
       "id": "item_11126",            "price": {
               "type": "Item"        "amount": 875,
               },         "currency": "EUR"
              {        },
                    "externalReferenceIdid": "527646a2e73fd9-5f3d-4afc-9585-43ebd7bbc6dc",
  
                         "quantitytype": 1,"Offer"
                }
           "price": { ]
        }
    }
}
Expand
titleOracle TS Gen 2 (Commit call)
Code Block
languagejson
{
       "header": {
        "amountorgShortName": 0"{{OrgShortName}}",
        "locRef": "{{LocRef}}",
             "rvcRef": {{RvcRef}},
        "currencyidempotencyId": "EUR{{$guid}}",
        "orderTypeRef": 9,
             "checkEmployeeRef": {{check_employee_ref}}
    },
    "menuItems": [
        {
             "idmenuItemId": "9aac0a46-5a73-431d-937c-8848ca01ac86"1001001, // Whopper
            "definitionSequence": 1,
            "typequantity": "Item"1,
                        }"itemDiscounts": [
                {
   ],                 "discountId": 106, // PLU "price": {
   of the product percent discount off
                    "amountreferenceText": 875,"Offer Item   Discount",
                    "currencytotal": "EUR"50 // percentage discount (can be sent as any percentage). 50% off the whopper ALC price.
     },           }
         "id": "a2e73fd9-5f3d-4afc-9585-43ebd7bbc6dc",  ]
        }
    ],
    "typetenders": "Offer"[
        {
       }             ]"tenderId": 901
        }
    }]
}
Expand
titleOracle TS Gen 2 (Commit call)
code

Reference

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