# Delivery time calculation

{% hint style="info" %}
If you would like to use these functionalities, [contact our Support team](https://ocfulfillment.atlassian.net/servicedesk/customer/portal/1) for more information and activation support.
{% endhint %}

The delivery time calculation determines, for each sourcing option, the estimated date on which the recipient (either the end customer or an ordering facility) will receive the requested goods.

The calculation takes the following factors into account:

* **Earliest possible picking start**, considering [stock availability](https://docs.fulfillmenttools.com/documentation/by-pillar/global-inventory-hub/stock/stock-availability), fulfillment times, and capacity constraints
* [**Average fulfillment buffer**](https://docs.fulfillmenttools.com/documentation/store-operations/picking/pick-job-target-time#picking-fulfillment-buffer), representing the average time required to pick an order in a specific facility
* [**Facility connection cutoff times**](https://docs.fulfillmenttools.com/documentation/by-pillar/advanced-order-routing/complex-routing-with-combinatorics/network-model/facility-connection), indicating when goods are typically handed over to the carrier
* [**Facility connection transit time**](https://docs.fulfillmenttools.com/documentation/by-pillar/advanced-order-routing/complex-routing-with-combinatorics/network-model/facility-connection), specifying how long a particular transfer usually takes

**Example 1: Simple use case**

<figure><img src="https://4170739437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLrrr5jgTsDuR38gNJIrm%2Fuploads%2FGipu6xQaDKz4ksn2SBbg%2Fimage.png?alt=media&#x26;token=84fe108c-8c00-4c86-bda0-0c17aca49f3b" alt=""><figcaption></figcaption></figure>

In this simple example, the facility **"Store Hamburg"** delivers directly to the end customer without any intermediate stops or internal supply steps.

**Store Hamburg to customer via DHL**

The calculation of the **`estimatedDeliveryDate`** in this case would proceed as follows:

* Time point of request: **Monday, 25/08/2025: 09:00**
* `earliestPickingStart`: **Monday, 25/08/2025: 10:00**
  * `fulfillmentTimes` of Store Hamburg: **Monday-Friday: 10:00-18:00**
  * no capacity limitations are set
* `fulfillmentprocessbuffer` of Store Hamburg: **120 minutes**
* `CutoffTimes` for facilityConnection Store Hamburg to Customer: **Monday-Friday: 16:00**
* `TransitTimes` for facilityConnection Store Hamburg to Customer:
  * no `packagingUnitsbyContext` defined
  * `fallbackTransitTime`: **1-2 days**
  * transitTime `calculationStrategy`: **earliest**
* no `nonDeliveryDay` within transitTime

***

\= **`estimatedDeliveryDate`: Tuesday, 26/08/2025**

**Example 2: complex use case**

<figure><img src="https://4170739437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLrrr5jgTsDuR38gNJIrm%2Fuploads%2FixS8CkO0lVgFDtR29ILx%2Fimage.png?alt=media&#x26;token=bbb2b677-138c-4e50-9457-a660a4c16f35" alt=""><figcaption></figcaption></figure>

In this more complex use case, the customer will receive **two partial deliveries**. Additionally, an **external supplier** ships the goods first to the **Berlin store**, where they are consolidated with items already in stock. After consolidation, the goods are forwarded to the customer.

The calculation of the **`estimatedDeliveryDate`** in this case would proceed as follows:

* Time point of request: **Monday, 25/08/2025: 09:00**

***

1. **Store Hamburg to customer via DHL**

* `earliestPickingStart`: **Monday, 25/08/2025: 10:00**
  * `fulfillmentTimes` of Store Hamburg: **Monday-Friday: 10:00-18:00**
  * no capacity limitations are set
* `fulfillmentprocessbuffer` of Store Hamburg: **120 minutes**
* `CutoffTimes` for facilityConnection Store Hamburg to customer: **Monday-Friday: 16:00**
* Calculated `targetTime` is **Monday, 25/08/2025: 16:00** (at this point in time DHL picks up the goods in Hamburg)
* `TransitTimes` for facilityConnection Store Hamburg to Customer:
  * no `packagingUnitsbyContext` defined
  * `fallbackTransitTime`: **1-2 days**
  * transitTime `calculationStrategy`: **earliest**
* no `nonDeliveryDay` within transitTime

\--> estimated arrival date of requested item 1 at customer: **Tuesday, 26/08/2025**

***

2. **Supplier XY GmbH to Store Berlin via GLS**

* as facilities of type "SUPPLIER" are externally operated, there is no information about fulfillment times, fulfillment process buffer, or capacities
* `CutoffTimes` for facilityConnection Supplier XY GmbH to Store Berlin: **Monday-Saturday: 14:00**
* Calculated `targetTime` is **Monday, 25/08/2025: 14:00** (at this point in time GLS picks up the goods at Supplier XY)
* `TransitTimes` for facilityConnection Supplier XY GmbH to Store Berlin:
  * `packagingUnitsbyContext`s are defined and the ordered items 2 and 3 are fitting in packagingUnit **M**
  * `transitTime` for packagingUnit M: is **3 -3 days**
  * transitTime `calculationStrategy`: **earliest**
* no `nonDeliveryDay` within transitTime

\--> estimated arrival date of requested item 2 and 3 at Store Berlin: **Thursday, 28/08/2025**

***

3. **Store Berlin --> Customer via DHL**

* since the goods are scheduled to arrive in Berlin on **28/08/2025** and the exact arrival time cannot be predicted, it is assumed that processing of the goods will only begin **one day later**, which in this case means on **28/08/2025**.
* `earliestPickingStart`: **Friday, 29/08/2025: 08:00**
  * `fulfillmentTimes` of Store Berlin: **Monday-Friday: 08:00- 17:00**
  * no capacity limitations are set
* `fulfillmentprocessbuffer` of Store Berlin: **180 minutes**
* `CutoffTimes` for facilityConnection Store Berlin --> Customer: **Monday-Friday: 17:00**
* Calculated `targetTime` is **Friday, 29/08/2025: 17:00** (at this point in time DHL picks up the goods in Berlin)
* `TransitTimes` for facilityConnection Store Berlin --> Customer:
  * no `packagingUnitsbyContext` defined
  * `fallbackTransitTime`: **2-3 days**
  * transitTime `calculationStrategy`: **earliest**
* Sunday is a `nonDeliveryDay`

\--> estimated arrival date of requested item 2 and 3 at Store Berlin: **Monday, 01/09/2025**

***

In total, the customer will receive two partial deliveries with this sourcing option: one on 26/08/2025 and another on 01/09/2025. For the delivery time rating, the date considered is always the point at which the customer has received all partial deliveries. In this case, 01/09/2025.
