Oracle API - Combos
Payloads in this section refer to the examples documented here: Oracle Config - Combos
Contents
Combo Menu Item
This is the Transaction Services API’s Menu call for the first example:
Transaction Services API: Combo Menu Item
Combo Meal Group (Main Item)
Transaction Services API: Combo Meal Group (Main Item):
Combo Meal Group (Drinks Group)
Transaction Services API: Combo Meal Group (Drinks)
Combo Meal
Transaction Services API: Combo Meal
Â
Putting things together
Combo Price(1) and Availability
The menuItemRef of the comboMeal is used to find the menuItem which menuItemId is equal to the menuItemRef of the comboMeal.
From the menuItem apply rules described for https://rbictg.atlassian.net/wiki/spaces/IRT/pages/5068816435 to find the price and check availability.
In this case the Combo is available in both In Restaurant at price 144 and Delivery at price 169.
Combo Group Price(2) and Availability
Then, all comboGroups in the comboMeal, including the main group (isMainGroup: true) use the price defined in the menuItem of the comboGroup to get the price to be charged and use the menuItemRef of the menuItem of the comboGroup to find the menuItem which menuItemId is equal to the menuItemRef of the menuItem of the comboGroup and apply rules described for https://rbictg.atlassian.net/wiki/spaces/IRT/pages/5068816435 to check availability only (price is not used in this case).
For the Whopper Combo Group, which is the main item and has only one possible selection:
The Item (Whopper) is available in both In Restaurant and Delivery and is not charged when sold into the combo.
For the Drinks Combo Group, which has multiple selections:
The Item (Sm Regular Pepsi) is available only in Restaurant and is not charged when sold into the combo.
This item should only appear for selection if order mode is In Restaurant.
The Item (Md Regular Pepsi) is available only in Restaurant and is charged at price 44 when sold into the combo.
This item should only appear for selection if order mode is In Restaurant.
The Item (400ml Bottle Regular Pepsi) is available only in Delivery and is not charged when sold into the combo.
This item should only appear for selection if order mode is Delivery.
Calculating the total price of the combo
The total price will depend on the selections so let`s see some examples.
Whopper Cmb with Sm Regular Pepsi (In Restaurant)
Whopper Cmb $144 + Whopper $0 + Sm Regular Pepsi $0 = $144
Whopper Cmb with Md Regular Pepsi (In Restaurant)
Whopper Cmb $144 + Whopper $0 + Md Regular Pepsi $44 = $188
Whopper Cmb with 400ml Bottle Regular Pepsi (Delivery)
Whopper Cmb $169 + Whopper $0 + 400ml Bottle Regular Pepsi $0 = $169
Note: when selections are customized (modifiers added) the price of the customization will be added to the price of the selection and by consequence to the total amount charged of the combo.
Whopper Cmb $144 + Whopper $0 (+ Bacon $15) + Sm Regular Pepsi $0 = $159
Â
The first layer is the combo Menu Item, it defines the price and the availability of the combo as well as other characteristics.
The second layer is the the Combo Meal, it associates the combo with the combo Menu Item and defines the list of Combo Groups that composes the Combo, there will always be a Primary Group which is the Group that contains the main item of the combo, normally the sandwich, and zero or more secondary groups, normally the side and drink groups.
The third layer are the Combo Meal Groups that defines the list of options available to complete the combo.
The primary Combo Meal Groups normally contains only one item (can contain more) which is the main item of the combo, for example the primary Combo Meal Group for a Whopper Combo will contain the Ala Carte Whopper sandwich.
The secondary Combo Meal Groups will contain one or more Ala Carte items that should be selected to complete the combo, for example the drink group that contains the list of drinks available for selection.
Besides defining the list of Ala Carte items available for selection the Combo Meal Group also defines the item that is selected by default and the Items related to Small, Medium and Large sizes of the item configured.
Another important attribute of the Combo Meal Group is the Quantity, the quantity defines how many items must be selected for the group. Quantity is always greater than 0, there is no optional Combo Group in Simphony.
Example: The 2102002 - Sm Regular Pepsi is the default selection for any combo that has the 202 - Drnk (S) combo Group.
In the Combo Meal Group it is also possible to set the price that will be charged if the item is selected inside the combo.
Example: The 2103002 - Md Regular Pespi will be charged at $10 when selected in a combo that has the 202 - Drnk (S) combo Group.
Example: The 1013401 - Lg Fries will be charged at $12.5 when selected in a combo that has the 102 - Sides combo Group.
Combo Availability:
The Combo Menu item is the entity used to define the combo availability. Same rules than the Ala Carte Menu Item are applied.
Combo Pricing:
The price of the combo is composed of the sum of the price of the combo Menu Item and the Combo Meal Group price of the selections.
Combo Menu Item Price
Example: Whopper Combo with Md Regular Pepsi and Lg Fries will be charged at $166.5 = Whopper Combo Menu Item Price $144 + Md Regular Pepsi Combo Meal Group price at 202 - Drnk (S) $10 + Lg Fries Combo Meal Group Price at 102 - Sides $12.5.
A combo meal is formed of comboGroups, each group has a list of possible selections.
In the example above (Whopper Cmb) we have 3 comboGroups, the 1001 which has the main item, the Whopper 1001001, the 202 which has the list of sides and the 102 (not appearing in the screenshot) that have the list of sides.
In order to understand if the combo is available you have to check if the Menu Item defined in the "menuItemRef": 1001002 is available.
In this case it is available because it has a price defined:
Â
Â
It would also be available if the price were defined as 0:
Â
And would not be available if the price was not defined:
Â
The for each comboGroup you need to check if the item has a price defined in the menuItems section of the JSON.
For instance for each of the drinks in the group 202, being 2102003, 2103003, 2104003, ... you should check if the related Menu Item is available by evaluating the price of the menu item, regardless if there is a price set in the comboMeal/comboGroups/menuItems/price.
Â
In this case the Sm Pepsi is available because it has an ALC price set in the menuItems structure:
Â
If price was set to 0 then the Sm Pepsi would still be available (and displayed as a valid option for the drink choice).
Â
However if the Sm Pepsi did not have a price set then it would not be available and should not be presented as an option.
Â
Note that for the combos, the price of the ALC item is only used to verify its availability. The price (or the upcharge) charged in the combo if the item is selected is the price defined inside the combo Meal and combo group.
In the example:
2102003 (Sm Pepsi) would not be charged when ordered as the drink option for the Whopper Cmb
2103003 would be charged as 10
2104003 would be charged as 12.5
Â
Â
Â
Â