Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Integration Scope

Delivery orders created in RBI App and Delivered by 1P or 3P Delivery Partners

Delivery UAT 1.png

This guide is destined at Delivery partners who wish to receive Delivery orders from RBI apps

How-to Guides

Create Quotes

Every delivery attempt at an RBI app is sent in the same format to the Create Quote webhook you provide us.

Step 1. Access your Customer Account


Step 2. Access store locator

By adding /store-locator to the base URL.

image-20240729-073541.png

Step 3. Access Delivery

image-20240729-074428.png

Step 4. Input Delivery address

image-20240729-074643.png

Step 5. Fill address details and click Deliver Here

image-20240729-081718.png

Create Test Orders

Every order Deliverect sends to a POS, regardless of the channel, is sent in the same format to the Create Quote webhook you provide us.

Step 1. After creating a Quote, build a basket.

image-20240729-080535.png

Step 2. Click to checkout

image-20240729-080750.png

Step 3. Fill details and click Continue

image-20240729-081524.png

Step 4. Click Place Secure Order

image-20240729-081638.png

Step 5. Arrive at Order Confirmation screen

image-20240729-081929.png

Integration Test Cases

Action

Tests

Expected Vendor Behavior

Expected Result

Eligible restaurant selection

Authenticated user inputs address on restaurant search in Whitelabel App

Vendor answers successfully to DELIVERY_QUOTE_CREATE webhook (docs).

Desired restaurant is selected for delivery.

Order confirmation

Authenticated user navigates to checkout page

The store must remain eligible

Vendor answers successfully to DELIVERY_QUOTE_APPLY webhook (docs).

The delivery fee amount is displayed on order description at the checkout page.

Order creation

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

Vendor answers successfully to DELIVERY_CREATE webhook (docs).

  • User navigates to order confirmation page.

  • First two progression status on the order are checked: “Order placed”, and “Order being prepared”.

  • ETA field must be correct as informed by vendor

Order is sent to kitchen

Delivery vendor request to move the order to kitchen

Vendor triggers a FIRE_ORDER event by sending a request to the fire order endpoint (docs).

Order is sent to kitchen, for preparation.

It can be validated by the GET request API

Order is picked up by driver

User remains in the order confirmation page, meanwhile the driver picks the order up at the restaurant.

Vendor sends a request to the delivery event endpoint (docs), updating the delivery to ORDER_PICKED_UP status.

“Driver Enroute” state is displayed in the order confirmation page.

Order is delivered to customer address

User remains in the order confirmation page, driver drops order at customer address.

Vendor sends a request to the delivery event endpoint (docs), updating the delivery to ORDER_DROPPED_OFF status.

“Delivered” state is displayed in the order confirmation page.

Alternative flows

Pre-order scheduling

User places a order with “Delivery Time“

Vendor should receive the DELIVERY_CREATE event with the fireOrderInSeconds field

Order must be send to the kicketn only in the right delivery time indicated in the fireOrderInSeconds field

Restaurant not eligible for selection

Inputs address on restaurant search in Whitelabel App.

The store tested must not be eligible

Vendor should not receive request for DELIVERY_QUOTE_CREATE for that restaurant.

Another restaurant is selected for delivery or “no-delivery-stores” modal should be displayed if any restaurant is eligible.

Quote failed by unavailability reason

Inputs address on restaurant search in Whitelabel App.

Vendor should receive the quote request DELIVERY_QUOTE_CREATE webhook (docs), but must return status QUOTE_ERROR with some of the reasons:

  • NO_DRIVERS_AVAILABLE

  • NUMBER_OF_ORDERS

  • REDUCED_CAPACITY

  • RESTAURANT_NEAR_TO_CLOSE

  • TECHNICAL_ISSUES

  • UNREACHABLE_RESTAURANT

  • WEATHER

Another restaurant is selected for delivery or “no-delivery-stores” modal should be displayed if any restaurant is eligible.

Order confirmation when the restaurant is no longer eligible

An authenticated user, select a restaurant, add some item to the cart and navigate to the checkout page.

The store should no longer be eligible

Vendor should not receive request for DELIVERY_QUOTE_CREATE for that restaurant.

A modal should be displayed to inform that the restaurant is unavailable.

Order is cancelled by delivery vendor

Order is cancelled during the delivery process.

Vendor sends a request to the delivery event endpoint (docs), updating the delivery to ORDER_CANCELLED status and another request to update the order status CANCELED (docs).

  • Ordered is cancelled, RBI broadcasts this status through Delivery (docs) / Order (docs) status webhook events.

  • The cancelled modal is displayed on the confirmation page

  • Money is refunded if online payment

Order is cancelled by another party (POS, RBI, etc.)

Order is cancelled by POS, RBI, or a different party than the delivery vendor.

We can simulate it by “Order Event” endpoint (docs)

Vendor reacts to delivery or order status changes from DELIVERY_EVENT (docs) / ORDER_EVENT (docs) webhooks.

Vendor must cancel the order and send delivery event (docs) to indicate that the delivery order has been canceled in full.

  • Consistent final status of order, and delivery, across all integrated systems.

  • The cancelled modal is displayed on the confirmation page

  • Money is refunded if online payment

Driver cancels the trip before collecting the order

After the driver has been assigned to deliver the order, he cancels the trip

Vendor should send the DRIVER_UNASSIGNED event (docs)

No order status change

It can be validated by the GET request API

Driver cancels the trip after collecting the order

After the driver has been picked up the order, he cancels the trip

Vendor should send the ORDER_CANCELLED event (docs)

  • Ordered is cancelled, RBI broadcasts this status through Delivery (docs) / Order (docs) status webhook events.

  • The cancelled modal is displayed on the confirmation page

  • Money is refunded if online payment

Optional flows

Set restaurant to available/unavailable

When the delivery provider changes store availability

It is used when the store stops receiving new delivery orders for a period of time (ie: Pause mode).

Send a event to the RBI to notify the change (docs)

Receive the event from the vendor

Refund order

The order paid with online payment is canceled by the vendor and the customer receives a refund

Vendor should send a request to refund the order (docs)

The refund must be made successfully

Create a loyalty vouncher

The order is delivered with problem (ie: missing fry), manager send a voucher to the customer by loyalty offer.

Vendor should send a request to create a voucher to the customer loyalty account (docs)

A voucher must be create in the customer loyalty account.

We consider the store ineligible for delivery if any criteria is true:

  • No mobile ordering (Sanity)

  • Restaurant closed (Delivery hours)

  • Restaurant heartbeat offline

  • Restaurant not enabled for delivery (Sanity)

References

/wiki/spaces/TRX/pages/4372824251

/wiki/spaces/TRX/pages/4345594036

/wiki/spaces/MS/pages/4136534079

/wiki/spaces/MS/pages/4349493249

Delivery State Flows

  • No labels