How Blackout Days, Cut Off Time and Delivery Lead Times are calculated
Last updated
Last updated
When a customer places an order, the Spice Order Delivery date app calculates the next available date for delivery based on Delivery Date Options and Delivery Availability and Blackout days settings.
Let us consider a small scenario and we will demonstrate how the app internally calculates the next available delivery date.
Available Days: Tuesday and Thursday
Blackout days: August 14, August 23, August 28, September 4, September 13, September 18, September 27
Order date: 9 August
Cut-off time: 4:00 PM
Delivery Lead Time: 10 days
Case 1 – Order Time – Before 4 PM
Case 2 – Order Time – After 4 PM
Based on the above criteria, here is how the app calculates the available delivery date in both the cases.
As the order is placed before the cut off time, the same date is also considered as an available day by the app, i.e., August 9 is also counted while calculating the next available day.
Next, the app checks for the next available day and also if the available day is a blackout day or not.
Let’s step by step calculate the available days using the calendar for case 1,
Order time before 4 PM before the cut off time i.e., 4 PM
Availbale days for the month of August
Let’s calculate the number of available days in the month of August –
Not considering and excluding the Black Out days and the Not Available days, the available days are – 09 August, 16 August, 21 August and 30 August.
As the order is placed before the cut off time, 09th August is considered as an available day.
The total number of available days in August is 4.
Available days for the month of September
Let’s calculate the number of available days in the month of September –
Not considering and excluding the Black Out days and the Not Available days, the available days are – 06 September, 11 September, 20 September and 25 September.
The total number of available days are – 4
Available days for the month of October
Let’s calculate the number of available days in the month of October –
Not considering and excluding the Black Out days and Not Available days, The total number of available days are 9, which are 02 October, 04 October, 09 October, 11 October, 16 October, 18 October, 23 October, 25 October, 30 October.
So, now the lead time for delivery is 10 days. Considering the available days which are 09 August, 16 August, 21 August, 30 August, 06 September, 13 September, 18 September, 27 September, 02 October, and 04 October.
So the next available day is 09 October and so on., i.e., the customer can choose any date from 09 October, 11 October, 16 October, 18 October and so on.
As the order is placed after the cut off time, the same date is not considered as an available day by the app, i.e., August 9 is not counted while calculating the next available day.
Next, the app checks for the next available day and also if the available day is a blackout day or not.
Let’s step by step calculate the available days using the calendar for case 2 Order time after 4 PM, after the cut off time i.e., 4 PM.
Available days in the month of August
Let’s calculate the number of available days in the month of August –
Not considering and excluding the Black Out days and Not Available days – the available days are – 16 August, 21 August and 30 August.
As the order is placed after the cut off time, 09th August is not considered as an available day.
The total number of available days are – 3
Available days for the month of September
Let’s calculate the number of available days in the month of September –
Not considering and excluding the Black Out days and Not Available days – the available days are – 06 September, 11 September, 20 September and 25 September.
The total number of available days are – 4
Available days for the month of October
Let’s calculate the number of available days in the month of October –
Not considering and excluding the Black Out days and Not Available days – the available days are 9, which are 02 October, 04 October, 09 October, 11 October, 16 October, 18 October, 23 October, 25 October, 30 October.
So now, as the lead time for delivery is 10 days. Considering the available days which are 16 August, 21 August, 30 August, 06 September, 11 September, 20 September, 25 September, 02 October, 04 October and 9 October.
So the next available day is 11 October and so on.