...
The intent of this feature is to provide a way to managed manage orders at high traffic (e.g. store opening) so to not overwhelm the kitchen.
...
Store Locator | Cart Confirmation | Store Confirmation |
---|---|---|
Suppose that the user still wants to make the order, they can do it according to the normal flow. But, at the last step, instead of getting the order confirmation directly, they will see the queue information page. This page will refresh every 30 seconds with the new position and estimated waiting time.
Queued Order | Firing of Queued Order | Order Confirmation |
---|---|---|
The user have the option to Exit Queue
, which cancels their order and refunds their payment.
How to decide whether a restaurant is “Busy”?
At the time of writing, we don’t yet have visibility on orders made through channels other than the Mobile App.
Virtual Queue Strategy
At the time of writing, the only strategy we support now is the “Virtual Queue” strategy. This strategy is parameterised by two numerical values per Restaurant Document in Sanity, namely Processing Time
and Busy Kitchen Threshold
...
How this works is that each Mobile Order is given a fixed Processing Time
defined in this Sanity the Restaurant document above. Every time this service the Wait Time Service receives an order, it estimates, based on past orders, if the kitchen is busy. If it is busy, the service holds the order in a queue to be inserted to the POS later. Else, it inserts the order immediately, and increase the busyness of the kitchen.
We measure kitchen “busyness” by checking recent orders being made to the kitchen. Since each order has a Processing Time
we can estimate at any point in time, the Time to Clear Kitchen (TCK) off . This is the time needed for the kitchen to complete all mobile orders. We consider a kitchen to by be busy when the next order Processing Time + TCK
is larger than the Busy Kitchen Threshold
set above.
...
; in other words, the kitchen is busy when we cannot squeeze another order without TCK exceeding the Busy Kitchen Threshold
.
Example
Here is an example to illustrate this point. Let’s assume the above Wait Time Parameters such that Processing Time = 180, and Busy Kitchen Threshold = 500
.
...
Up to 10:30:00, the queue was empty and the kitchen is clear (off mobile orders)cleared. At 10:30:00 a user attempts to complete an order. Since the kitchen is not busy 0 + 180s < 500s, the order is inserted immediately. Notice that the
...