Orders API - Integration Test Cases

Contents

References

Restaurant Management

Action

How to test

Vendor Action

Expected Result

Action

How to test

Vendor Action

Expected Result

Update store status

  • To Online

User inputs restaurant address in the store locator in RBI’s platform.

Update store status to online via Update Store Status endpoint.

RBI's platform will request a recurring update on store status via the Store Heartbeat Webhook.

→ Partners API reports store is online through Get Store Status endpoint.

Select button is available and not grayed out.

image-20240918-120813.png

Store ordering availability is not only affected by the POS status, as there are other configurations required to activate stores.

→ RBI admins have access to the Store Diagnostics and can verify that isRestaurantPosOnline: true

image-20240815-141749.png

Update store status

  • To Offline

User inputs restaurant address in the store locator in RBI’s platform.

Update store status to offline via Update Store Status endpoint.

RBI's platform will request a recurring update on store status via the Store Heartbeat Webhook.

→ Partners API reports store is offline through Get Store Status endpoint.

→ Ordering buttons become grayed out for the store. Mobile ordering is not available at this store warning appears.

→ RBI admins have access to the Store Diagnostics and can verify that isRestaurantPosOnline: false

Menu Management

Availability

Action

Tests

Vendor Action

Expected Result

Action

Tests

Vendor Action

Expected Result

Make an item available for a certain store

User selects ordering for the corresponding store and navigates to the menu section of the item.

Make a request with price and availability : true for the respective PLU using the Update Store Menu PLUs endpoint.

→ Partners API GET Store Menu PLUs endpoint returns the PLUs with the corresponding price and availability.

→ Item appears in App Menu section with correct price.

Make an item unavailable for a certain store

User selects ordering for the corresponding store and navigates to the menu section of the item.

Make a request with price and availability : false for the respective PLU using the Update Store Menu PLUs endpoint.

→ Partners API GET Store Menu PLUs endpoint returns the PLUs with the corresponding price and availability.

→ Item disappears from App Menu section.

Make a combo available for a certain store

User selects ordering for the corresponding store and navigates to the menu section of the combo.

Make a request with price and availability : true for the respective PLU(s) using the Update Store Menu PLUs endpoint.

→ Partners API GET Store Menu PLUs endpoint returns the PLUs with the corresponding price and availability.

→ Combo appears in App Menu section with correct price.

Make a combo unavailable for a certain store

User selects ordering for the corresponding store and navigates to the menu section of the combo.

Make a request with price and availability : false for the respective PLU(s) using the Update Store Menu PLUs endpoint.

→ Partners API GET Store Menu PLUs endpoint returns the PLUs with the corresponding price and availability.

→ Combo disappears from App Menu section.

Make a modifier multiplier available for a certain store

User selects ordering for the corresponding store and navigates to the item containing the modifier multiplier.

Make a request with price and availability : true for the respective PLU using the Update Store Menu PLUs endpoint.

→ Partners API GET Store Menu PLUs endpoint returns the PLUs with the corresponding price and availability.

→ Modifier Multiplier appears in App Menu section with correct price.

Make a modifier multiplier unavailable for a certain store

User selects ordering for the corresponding store and navigates to the item containing the modifier multiplier.

Make a request with price and availability : false for the respective PLU using the Update Store Menu PLUs endpoint.

→ Partners API GET Store Menu PLUs endpoint returns the PLUs with the corresponding price and availability.

→ Modifier Multiplier disappears from App Menu section.

Make a Systemwide Offer available for a certain store

User selects ordering for the corresponding store and navigates to the offers page.

Make a request with price and availability : true for the respective PLU(s) to Partner’s API using the Update Store Menu PLUs endpoint.

→ Partners API GET Store Menu PLUs endpoint returns the PLUs with the corresponding price and availability.

→ Offer appears in App Offers page and is available for Mobile redemption with correct price.

Make a Systemwide Offer unavailable for a certain store

User selects ordering for the corresponding store and navigates to the offers page.

Make a request with price and availability : false for the respective PLU(s) to Partner’s API using the Update Store Menu PLUs endpoint.

→ Partners API GET Store Menu PLUs endpoint returns the PLUs with the corresponding price and availability.

→ Offer button for Mobile redemption is grayed out. Offer displays text indicating that it isn't available at the selected location.

Make a premium item (within a comboslot) available as part of a combo

User selects ordering for the corresponding store and navigates to the combo containing the premium item.

  • Internal configurations should be applied to serve Composite PLU for the given POS Vendor / market.

Make a request with price and availability : true for the respective PLU(s) to Partner’s API using the Update Store Menu PLUs endpoint.

  • The PLU for the premium comboslot option should follow the pattern comboPlu-itemPlu. E.g. for the whopper meal medium (PLU=123) to have onion rings (PLU=456) as a premium comboslot option, the price would have to be posted using the plu 123-456.

→ Partners API GET Store Menu PLUs endpoint returns the PLUs with the corresponding price and availability.

→ Item appears inside the Combo with the desired premium price.

Make a premium item (within a comboslot) unavailable as part of a combo

User selects ordering for the corresponding store and navigates to the combo containing the premium item.

  • Internal configurations should be applied to serve Composite PLU for the given POS Vendor / market.

Make a request with price and availability : false for the respective PLU(s) to Partner’s API using the Update Store Menu PLUs endpoint.

  • The PLU for the premium comboslot option should follow the pattern comboPlu-itemPlu. E.g. for the whopper meal medium (PLU=123) to have onion rings (PLU=456) as a premium comboslot option, the price would have to be posted using the plu 123-456.

→ Partners API GET Store Menu PLUs endpoint returns the PLUs with the corresponding price and availability.

→ Item disappears from the Combo.

Make a Reward available for a certain store

Authenticated user selects ordering for the corresponding store and navigates to the rewards page.

User must have enough points to redeem applicable reward.

Make a request with price and availability : true for the respective PLU(s) to Partner’s API using the Update Store Menu PLUs endpoint.

→ Partners API GET Store Menu PLUs endpoint returns the PLUs with the corresponding price and availability.

→ Reward appears in App Rewards page and is available for Mobile redemption with correct price.

Make a Reward unavailable for a certain store

Authenticated user selects ordering for the corresponding store and navigates to the rewards page.

User must have enough points to redeem applicable reward.

Make a request with price and availability : false for the respective PLU(s) to Partner’s API using the Update Store Menu PLUs endpoint.

→ Partners API GET Store Menu PLUs endpoint returns the PLUs with the corresponding price and availability.

→ Reward button for Mobile redemption is grayed out. Rewards displays text indicating that it isn't available at the selected location.

Pricing

Action

Tests

Vendor Action

Expected Result

Action

Tests

Vendor Action

Expected Result

Change price for an item

User navigates through App Menu.

Make a request with updated price for the respective PLU using the Update Store Menu PLUs endpoint.

→ Partners API GET Store Menu PLUs endpoint returns the PLUs with the corresponding updated price.

→ Item price appears updated in the App Menu section with correct price.

This test should be run for all menu structures described in the previous section.

Checkout

Order Creation

You can learn about the checkout actions in the Partner API here:

Action

How to test

Vendor Action

Expected Result

Action

How to test

Vendor Action

Expected Result

Pricing Order

Authenticated user selects ordering for the corresponding store, adds items to cart and navigates to checkout.

All available Cart Structures must be tested:

  • Item

  • Item with modifiers

  • Combo

  • Combo with items with modifiers

  • Systemwide Offer Item

  • Systemwide Offer Combo

  • Systemwide Offer Combo with modifiers

  • Reward Item

  • Reward Combo

  • Reward Combo with modifiers

  • Promo Codes - Amount Discount

  • Promo Codes - Percentage Discount

Partner is subscribed to the Price Order webhook. The payload of the webhook includes the order contents for the selected store ID, service mode, and other details.

Partner must return the price and availability for each item in the order, the total price and any errors using the Price Webhook Callback endpoint.

Error Handling must follow the message and code standards:

  • Message: Include a clear and concise error message. Include information that would lead to the fixing and understanding of the error occurred. (e.g.: Offending PLUs, store status, etc.).
    Do not include redundant information like: Error occurred while processing request.

  • Code Enum: "MENU" "STORE" "TIMEOUT" "UNKNOWN"

/cart page loads total price of the cart, corresponding to the sum of all products within.

→ Loading time does not exceed 3 seconds for p99.

→ Tax, Subtotal, and Total are visible at checkout

→ (OPTIONAL) Fees, such as “Bag Fee”, are visible in the /cart page, separately from total cart amount.

 

 

Commit Order

After pricing an order, an authenticated user pays, and continues with the placement the order.

All available Cart Structures must be tested in this category:

  • Item

  • Item w/ modifiers

  • Combo

  • Combo with items w/ modifiers

  • Systemwide Offer Item

  • Systemwide Offer Combo

  • Systemwide Offer Combo w/ modifiers

  • Promo Codes - Amount Discount

  • Promo Codes - Percentage Discount

  • Reward Item

  • Reward Combo

  • Reward Combo with modifier

Partner is subscribed to the Commit Order webhook. The payload of the webhook includes the order id, total order price and customer details, among other details.

The POS must respond to the webhook request by using the Commit Webhook callback endpoint.

Error Handling must follow the message and code standards:

  • Message: Include a clear and concise error message. Include information that would lead to the fixing and understanding of the error occurred. (e.g.: Offending PLUs, store status, etc.).
    Do not include redundant information like: Error occurred while processing request.

  • Code Enum: "MENU" "STORE" "TIMEOUT" "UNKNOWN"

→ Order is registered in the POS.

Cancel Order – Initiated by guests or delivery fulfillment providers

  • Initiated by guest: for pick up order, guest selects the Cancel Order option.

  • Initiated by delivery provider: order is canceled by the delivery provider in their Driver Management Portal.

Partner is subscribed to the Order Event webhook. Upon cancelation, the webhook will return an event with status CANCELED.

The POS must acknowledge the cancelation and mark the order as canceled in the POS.

→ Order status is changed to CANCELED. You can check it using the GET Order endpoint.

→ An automatic refund is processed (if applicable).

→ A cancellation email is triggered.

Cancel Order – Initiated by POS

Restaurant team member cancels order in the POS.

Partner send status CANCELED using the Order Event endpoint.

→ Order status is changed to cancel. You can check it using the GET Order endpoint or in the Order Event webhook.

→ An automatic refund is processed (if applicable).

→ A cancellation email is triggered.

 

Order firing for in-restaurant service modes

Action

How to test

Vendor Action

Expected Result

Action

How to test

Vendor Action

Expected Result

Place a Dine In / Pickup

  • Immediate order (Now)

Authenticated user selects ordering for the corresponding store, builds a cart and navigates to checkout.

User selects Dine In or Pick Up and order time Now.

 

Partner injects order the POS using the corresponding service Mode and number.

The Partner would’ve received all relevant information to the order previously via the pricing webhook: service mode (TAKEOUT) , order number, etc.

All order information can also be fetched from the GET Order endpoint, at any time.

fireOrderInSeconds: 0 indicates the order should be fired to the kitchen immediately.

→ Order is injected in the POS.

→ KDS identifies the service mode.

→ DSS ticket printed according to the service mode.

→ Receipt printed with Order Number from RBI.

→ ORB displays Order Number from RBI.

Place a Drive-Thru order

  • Immediate order (Now)

Authenticated user selects ordering for the corresponding store, builds a cart and navigates to checkout.

User selects Drive Thru. No time selection appears at checkout.

Partner injects order the POS using the corresponding service Mode and number.

The Partner would’ve received all relevant information to the order previously via the from pricing webhook: service mode (DRIVE_THRU) , order number, etc.

All order information can also be fetched from the GET Order endpoint, at any time.

fireOrderInSeconds: null indicates the order should be held in the POS until the order is released.

→ Order is registered in the POS but not sent to the kitchen.

→ When the guest arrives at the restaurant, a team member manually fires the order to the kitchen from the POS.

At that point,

→ DSS ticket printed.

→ Receipt printed with Order Number from RBI.

→ ORB displays Order Number from RBI.

Place a Table Service order

  • Immediate order (Now)

 

Authenticated user selects ordering for the corresponding store, builds a cart and navigates to checkout.

User selects Table Service and inputs the desired table number.

No time selection appears.

Partner injects order the POS using the corresponding service Mode and number.

The Partner would’ve received all relevant information to the order previously via the from pricing webhook: service mode (TABLE_SERVICE) , order number, etc. The table service is provided under the instructions field.

All order information can also be fetched from the GET Order endpoint, at any time.

fireOrderInSeconds: 0 indicates the order should be fired to the kitchen immediately.

 

→ Order is injected in the POS with reference to the table number.

→ KDS identifies the service mode.

→ KDS identifies the table number.

→ DSS ticket printed according to the service mode.

→ DSS ticket printed with the table number.

→ Receipt printed with the table number.

→ Receipt printed with order number from RBI, though at a less relevant place, since table number should take precedence to the order number.

Place a Dine In / Pickup order

  • Future order (Scheduled)

Authenticated user selects ordering for the corresponding store, builds a cart and navigates to checkout.

User selects Dine In or Pick Up and order time equivalent to any slot in the future.

 

Partner collects the service mode (serviceMode) from the GET Order endpoint (EAT_IN TAKEOUT DRIVE_THRU) and injects in the POS.

Partner collects the order number (number) from the GET Order endpoint and injects in the POS.

  • fireOrderInSeconds: X indicates the order should be fired to the kitchen X seconds after the order is placed.

→ Order is injected in the POS.

→ Order appears in the KDS X seconds after POS order injection.

→ KDS identifies the service mode.

→ DSS ticket printed according to the service mode.

→ Receipt printed with Order Number from RBI.

→ ORB displays Order Number from RBI.

Place a Table Service order

  • Future order (Scheduled)

Authenticated user selects ordering for the corresponding store, builds a cart and navigates to checkout.

User selects table service and order time equivalent to any slot in the future.

User inputs the desired table number.

Partner collects the service mode (serviceMode) from the GET Order endpoint (TABLE_SERVICE) and injects in the POS.

Partner collects the order number (number) from the GET Order endpoint and injects in the POS.

  • fireOrderInSeconds: X indicates the order should be fired to the kitchen X seconds after the order is placed.

 

→ Order is injected in the POS with reference to the table number.

→ Order appears in the KDS X seconds after POS order injection.

→ KDS identifies the service mode.

→ KDS identifies the table number.

→ DSS ticket printed according to the service mode.

→ DSS ticket printed with the table number.

→ Receipt printed with the table number.

→ Receipt printed with order number from RBI, though at a less relevant place, since table number should take precedence to the order number.

Place a Curbside order

  • Future order (Scheduled)

Authenticated user selects ordering for the corresponding store, builds a cart and navigates to checkout.

User selects service mode and order time equivalent to any slot in the future.

User inputs the car plate number.

Partner collects the service mode (serviceMode) from the GET Order endpoint (CURBSIDE) and injects in the POS.

Partner collects the order number (number) from the GET Order endpoint and injects in the POS.

  • fireOrderInSeconds: X indicates the order should be fired to the kitchen X seconds after the order is placed.

→ Order is injected in the POS with reference to the table number.

→ Order appears in the KDS X seconds after POS order injection.

→ KDS identifies the service mode.

→ KDS identifies the table number.

→ DSS ticket printed according to the service mode.

→ DSS ticket printed with the table number.

→ Receipt printed with the car plate.

→ Receipt printed with order number from RBI, though at a less relevant place, since car plate should take precedence to the order number.

Place a Curbside order

Authenticated user selects ordering for the corresponding store, builds a cart and navigates to checkout.

User selects service mode and order time Now.

User inputs the car plate number.

Partner collects the service mode (serviceMode) from the GET Order endpoint (CURBSIDE) and injects in the POS.

Partner collects the order number (number) from the GET Order endpoint and injects in the POS.

  • fireOrderInSeconds: 0 indicates the order should be fired to the kitchen immediately.

 

→ Order is injected in the POS with reference to the table number.

→ KDS identifies the service mode.

→ KDS identifies the table number.

→ DSS ticket printed according to the service mode.

→ DSS ticket printed with the table number.

→ Receipt printed with the car plate.

→ Receipt printed with order number from RBI, though at a less relevant place, since car plate should take precedence to the order number.

Payment methods for in-restaurant orders

Action

How to test

Vendor Action

Expected Result

Action

How to test

Vendor Action

Expected Result

Place a cash (or any other unpaid) in-restaurant order

Same process described in previous table for any service mode (Dine In, Pick Up, Table Service…).

User selects cash in the payment page.

 

Partner collects the payment method from the GET Order endpoint (CASH or UNPAID) and injects in the appropriate POS field.

Typically, POS systems define Tender IDs for this purpose.

→ Order is injected in the POS.

→ Order is not sent to the kitchen.

→ Order is sent to the kitchen after user performs the payment.

E.g. guest places a Pick Up order for 5:30pm and pays with cash. Guest arrives at the restaurant and pays for order at front counter, team member sendd order to the kitchen.

Place an online payment (paid) in-restaurant order

Same process described in previous table for any service mode (Dine In, Pick Up, Table Service…).

In the payment page, user selects credit card or any other alternative payment method that leaves the order paid.

 

Partner collects the payment method from the GET Order endpoint and injects in the appropriate POS field.

Typically, POS systems define Tender IDs for this purpose.

Any payment method besides CASH and UNPAID falls under this category.

→ Order is injected in the POS and sent to the kitchen, following the fireOrderInSeconds logic explained in the table above.

Delivery orders

Action

Tests

Vendor Action

Expected Result

Action

Tests

Vendor Action

Expected Result

Place a Delivery order

Authenticated user inputs address within delivery area on restaurant search in App, builds a cart and navigates to checkout.

Authenticated user clicks on “Continue” on the checkout page, and confirms selecting any payment method by clicking “Place Secure Order”.

Partner collects the service mode (serviceMode) from the GET Order endpoint (DELIVERY) and injects in the POS.

  • fireOrderInSeconds: null indicates the order should not be fired to the kitchen, and instead be injected to the POS in suspended mode.

Partner collects the order number (number) from the GET Order endpoint and injects in the POS.

→ Order is injected in the POS.

→ Order does not appear in the KDS (not fired into the kitchen).

Fire a Delivery order into the kitchen

Delivery vendor request to move the order to kitchen

  • Based on driver’s geolocation OR driver’s ETA to the restaurant.

Partner is subscribed to the ORDER_FIRE webhook, which triggers a request to fire an order into the kitchen.

Partner fires the order through a POST call to the Fire Order endpoint.

  • Firing is expected to happen when the driver is at a distance / time from the restaurant equal or lower to the preparation time (prep time). The POS vendor is not required to compute any logic, as RBI is responsible for informing the POS vendor when to fire orders.

→ Order appears in the KDS (is fired into the kitchen).

→ KDS identifies the service mode.

→ DSS ticket printed according to the service mode.

→ Receipt printed with Order Number from RBI.

  • RBI’s order number is expected to substitute the POS order number.

  • RBI’s order number is configurable, allowing numerical interval restriction and / or utilization of an alphanumerical prefix.

Cancel a Delivery order

Delivery cancelation

→ Delivery Order successfully sent and placed in Partner’s POS.

→ If a delivery cancellation is requested:

  • The order should be canceled in the POS.

 

 

 

Order Events

Action

Tests

Vendor Action

Expected Result

Action

Tests

Vendor Action

Expected Result

  • Pre-Conditions:

    • User logged in

    • Restaurant Selected

  • Steps:

    • Navigate to menu

    • Add an Item in the cart

    • Place order (Checkout).

  • AC:

    • Partner API should receive the order with partner status as CREATED.

 

 

 

  • Pre-Conditions:

    • User logged in

    • Restaurant Selected

  • Steps:

    • Navigate to menu

    • Add an Item in the cart

    • Place order (Checkout).

  • AC:

    • The order needs to have total and tax applied

    • Partner API should receive the order with partner status as PRICED.

 

 

 

  • Pre-Conditions:

    • User logged in

    • Restaurant Selected

  • Steps:

    • Navigate to menu

    • Add an Item in the cart

    • Place order (Checkout).

    • Click to Continue

    • Choose the payment method

    • Fill the necessary informations

    • Click to pay

    • Wait the

  • AC:

    • The partner should receive the order payload

    • Partner API should receive the order with partner status as COMMITED

 

 

 

  • Steps:

    • Partner sends an event to update order status

  • AC:

    • Partner API should receive the order with partner status as PREPARING

 

 

 

  • Steps:

    • Partner sends an event to update order status

  • AC:

    • Partner API should receive the order with partner status as PREPARED

 

 

 

 

 

 

 

 


 

Menu Availability Validation

Object

Available

Object

Available

section

If any section options are available

combo

If combo.plu exists in restaurant pos data for the selected store &&

main item is available &&

All the combo slot are available

combo slot

At least Minimum Amount item under combo slot options is available

item

If item.plu exists in restaurant pos data for the selected store &&

If, for any item option that has inject default selection flag set to true, at least one item option modifier is available under the item option.

item option

If any item option modifier are available for the item option

item option modifier

If modifier multiplier.plu exists in the pos data for the selected store or the plu type is Ignore, and the modifier.plu is in the store pos data

picker

if any picker options are available

picker aspect value

if any picker options that have the picker aspect value mapped are available

Offer Availability Validation
  1. Pass all the Rules validation set in Mechanics-Rules, the important rules can be Service Mode, Valid Time Span, Authentication Required and so on, the full list can be found in .

  2. Ensure the benefit set in Mechanics-Benefits is available, the availability validation follows the same logic in the Menu Availability Validation section. Because the benefit can be item, combo and picker, so the important is to check accordingly.