...
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
Expand |
---|
|
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 |
---|
title | Oracle TS Gen 2 (Commit call) |
---|
|
"cart": {menuSelections[
{externalReferenceId8351// rewardpluid43b4cf07-79c9-4aff-98d1-bce9cf2d890f//rewardsanityid menuSelections[{{RvcRef}},
"idempotencyId": "{{$guid}}",
| { externalReferenceId"8350", // combo plu
{{check_employee_ref}}
},
"menuItems": [],
| id"43b4cf07-79c9-4aff-98d1-bce9cf2d890f", //combo sanity idmenuSelections[51002003, // Cheeseburger reward
"comboItem": {
| { "menuItemId": 51002003, // Cheeseburger reward PLU
| "externalReferenceId": "10059", "definitionSequence": 1,
" | id"item_1852",menuSelections[],
"price{1002003, // A la carte cheeseburger
| "amount0
"currency"SAR"}, quantity1, type"Item"901 // payment method ID. Pay at Counter for this | , |
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 |
---|
|
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 |
---|
title | Oracle TS Gen 2 (Commit call) |
---|
|
|
Reward with a combo
Expand |
---|
|
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": " | 800074f99db1e-128a-4e53-b23b-dffc0fedf636141139",
"menuSelections": [],
"price": {
"amount": 0,
"currency": "SAR"
},
"quantity": 1,
"type": "Item"
} | ,{externalReferenceId"80001"300, // original price of combo
| id16f482db-2f13-4476-88d3-d2eec26057f3","menuSelections":[],price:{"amount":0currency"SAR"
0, // final price of the reward
"currency": "SAR"
| },
Item , |
Expand |
---|
title | Oracle TS Gen 2 (Commit call) |
---|
|
Code Block |
---|
| {
"header": {
"orgShortName": "{{OrgShortName}}",
" | externalReferenceId141139{{LocRef}}",
"rvcRef": {{RvcRef}},
| "id141139{{$guid}}",
"orderTypeRef": 9,
"checkEmployeeRef": {{check_employee_ref}},
" | menuSelections[]"es-ES",
"Accept-Language": "es-ES"
},
" | price{ amount051001504,
"comboItem": {
" | currency"SAR" },
"definitionSequence": 1,
"quantity": 1 | ,type"Item"} ]"definitionSequence": 1,
" | price{amount300,//originalpriceofcombo"currency":"SAR"},quantitydefinitionSequence": 1,
" | type "Combo"}],price {amount0//finalpriceoftherewardcurrency"SAR","quantity":1,type"Reward"}], |
Reward with a cart discount
Code Block |
---|
|
"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"
}
]
}
} |
Reward with a product discount
Code Block |
---|
|
{
"payload": {
"number": "5807",
"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/781f28e9-d6bb-4c8e-9ea6-e65a2e7c3764/price/callback",
"id": "781f28e9-d6bb-4c8e-9ea6-e65a2e7c3764",
"orderDiscounts": [
{
"plu": "948348",
"type": "percentage",
"value": 50
}
],
"storeId": "12349",
"cart": {
"menuSelections": [
{
"externalReferenceId": "948348",
"quantity": 1,
"menuSelections": [
{
"externalReferenceId": "502633",
"quantity": 1,
"price": {
"amount": 0,
"currency": "EUR"
},
"id": "item_11107",
"type": "Item"
}
],
"price": {
"amount": 645,
"currency": "EUR"
},
"id": "fbdead97-5acb-4d1c-a5fe-5794ece61aaa",
"type": "Reward"
}
]
}
}
} |
...