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 takeout order wait time

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

  • takeoutPrepTime - The time it takes to prepare a takeout order.

  • takeoutThrottlingTime - The time that restaurant employees have chosen to delay takeout orders.

For example, if takeoutPrepTime is 25 minutes, and takeoutThrottlingTime is 10 minutes, then the total estimated order wait time is 35 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 takeout service is available. For example, if the current time is 10:00 AM, but the restaurant does not accept open or accept online takeout 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.