This guide will be removed on April 29, 2022. Please use our new, easier-to-use Toast technical documentation site. All updated content is on the new site.

Estimating delivery order wait time

To calculate the estimated delivery order wait time, you add the amount of time it takes to prepare delivery orders and the amount of time that restaurant employees have chosen to delay delivery order firing.

  • deliveryPrepTime - The time it takes to prepare and deliver a delivery order.

  • deliveryThrottlingTime - the time that restaurant employees have chosen to delay delivery orders.

For example, if deliveryPrepTime is 50 minutes, and deliveryThrottlingTime is 10 minutes, then the total estimated order wait time is 60 minutes.

If the current time is outside of the restaurant's hours of operation, then you must include the amount of time until the restaurant is open. You can use the restaurant openTime and closeTime values to determine whether delivery service is available. For example, if the current time is 10:00 AM, but the restaurant does not open or accept delivery orders until 12:00 PM, then you need to add two hours to the order wait time.

For a scheduled order, you must also make sure that promisedDate is within the allowed maximum amount of time for future orders. For example, a restaurant might not accept scheduled orders for a date that is more than two weeks in the future.