Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Store Locator

Cart Confirmation

Store Confirmation

imageImage Removedimage-20240321-062613.pngImage AddedimageImage Removedimage-20240301-030702.pngImage AddedimageImage Removedimage-20240301-030713.pngImage Added

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

image-20240229-064507.pngImage Removedimage-20240301-030610.pngImage Addedimage-20240229-064742.pngImage Removedimage-20240301-052256.pngImage Addedimage-20240229-064812.png

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

...