# Facility connection

{% 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.
{% endhint %}

Facility connections specify for each facility which other facilities within the network can be supplied and whether the consumer can be directly supplied. Details for each facility connection can include the carrier used for transportation, available packaging units (and their dimensions), transport times, and associated costs. Fallback times and costs are considered if no specific packaging units are defined.

## Target

The `target` object allows restricting the connection's destination. For example, a connection can be defined for only one specific managed facility or to all managed facilities except for explicitly defined exceptions.

## Type

The `type` of the facility connection defines to which receiver category a facility can supply to. This can be either `SUPPLIER`, `MANAGED_FACILITY`, or `CUSTOMER` (consumer).

## Context

The `context` defines specifications for a facility connection depending on the selected context type:

* `FACILITY`:
  * Define the exact facility ID(s) to which the supplying facility is connected, or exclude specific facilities.
* `FACILITY_GROUP`:
  * Define the [facility groups](/documentation/getting-started/facilities/facility-groups.md) to which the supplying facility is connected, or exclude specific facility groups.
* `CATEGORY`:
  * Define a specific [category](/documentation/by-pillar/global-inventory-hub/categories.md) for which this facility connection can be used.
  * Example: The facility connection can only be used for shipping items in the dangerous goods category.
* `TAG_REFERENCE`
  * Define whether this connection can only be used in case the request/order has a defined tag.

{% hint style="info" %}
Contexts define which connections can be used by which request. A connection without context can be used by all requests (in routing).

The operator `NOT` allows users to exclude certain cases (for example, facility groups) from a connection.
{% endhint %}

## Carrier reference/key

This property defines which carrier represents the connection. In case carriers are connected to fulfillmenttools, the corresponding `carrierKey` can be referenced here as well.

## Fallback costs and times

If no shipping cost or transit time information for packaging units is defined for a connection, the fallback costs and/or times will be taken into account for a cost and time calculation during routing.

In case there are packaging unit specific prices and transit times defined, the fallback costs and times will be taken into account in case none of the available packaging units can be used for the requested items.

## Cutoff times

The cutoff time defines the time point when parcels are usually picked up at a location. This time point can vary depending on the weekday as well as on public holidays.

{% hint style="info" %}
**Example**

DHL picks up parcels at the store in New York on Monday-Friday at 17:00, Saturday at 15:00 and not at all on Sundays. Although January 1st is a Thursday, no pickup will be on this specific date since it is a holiday.
{% endhint %}

In the context of external suppliers the time point of the actual handover to the carrier is usually not known. However, the cutoff times should still be set in order to enable a correct [delivery time calculation](/documentation/by-pillar/advanced-order-routing/complex-routing-with-combinatorics/calculations-within-routing/delivery-time-calculation.md). In this case, the cutoff time can be interpreted as the latest point in time until an order needs to placed to guarantee a delivery within the defined transit days.

{% hint style="info" %}
E**xample**

* Transit time for the facility connection "Supplier 1 to Store New York" is 1 day.
* Cut-off time for this facility connection is Monday-Friday 16:00.
  * If the order is placed on Tuesday 14:00, the items will arrive in New York on Wednesday.
  * If the order is placed on Tuesday 17:00, the items will arrive in New York on Thursday.
    {% endhint %}

## Non-delivery days

Non-delivery days are days where carriers don't operate. To store this information in fulfillmenttools, it's possible to set up non-delivery-days in the respective carrier configurations. The stored information is then taken into account when calculating delivery times and possible delivery days.

Non-delivery days can be either specific calendar dates (1 January) or a day of the week (Sunday). While days are always recurring (`recurringNonDeliveryWeekdays`), a specific calendar date can be set up as `RECURRING` or `SINGLE` by using the `nonDeliveryType.`

Non-delivery days refer to the transit days (day after pickup until delivery day). There are differences depending on the carrier. While carrier X only delivers from Mondays till Fridays, carrier Y also operates on Saturdays. In addition, deliveries are usually not made on public holidays. Public holidays again vary from country to country and province to province.

## Packaging units

The packaging units define the different parcel/pallet sizes that are available for a specific facility connection.

{% hint style="info" %}
**Example**

When shipping items from "Store New York" to the end customer via DHL, parcel sizes S, M, L can be used.
{% endhint %}

By using the `context` within `packagingUnitsByContexts`, different packaging units with different prices and transit times can be defined depending on the following factors:

* `TARGET_POSTALCODE`/`TARGET_COUNTRY`
  * Prices and transit times might differ depending on where the parcel is shipped. Parcel sizes might differ between domestic and international destinations.
* `CATEGORY`
  * Define a specific [category](/documentation/by-pillar/global-inventory-hub/categories.md) for which this packaging unit can be used.
  * For example, there might be special parcels for items of category "dangerous goods".

See the [transport calculation cost logic article](/documentation/by-pillar/advanced-order-routing/complex-routing-with-combinatorics/calculations-within-routing/transport-cost-calculation-logic.md) for more information on packaging units.

## Cases

1. A managed facility can supply another managed facility within the network (interfacility transfer)

<figure><img src="/files/gGxpQne2GFkKfsfwgDlQ" alt=""><figcaption></figcaption></figure>

2. A managed facility can supply the consumer directly

<figure><img src="/files/am9hdoAAEEncbGR3yks0" alt=""><figcaption></figcaption></figure>

3. A supplier can supply the consumer directly

<figure><img src="/files/uMPYO2AVAkghwvmxHUgF" alt=""><figcaption></figcaption></figure>

4. A supplier can supply all managed facilities within the network

<figure><img src="/files/RIB5XoZFLI9ObBdY7sfl" alt=""><figcaption></figcaption></figure>

5. A supplier can supply all managed facilities within the network except a specific facility group or facility

<figure><img src="/files/dycLEpDWvqbLKR370meL" alt=""><figcaption></figcaption></figure>

6. A supplier can supply a facility group within the network

<figure><img src="/files/cBcGO7BobGpeiACWLbeg" alt=""><figcaption></figcaption></figure>

Example: Supplier XY can supply the consumer directly, all facilities that are part of the facility group USA, and the facility store Berlin.

<figure><img src="/files/IGyfCIq4K8XSfqlesUWs" alt=""><figcaption></figcaption></figure>

## Create facility connection

> Create a connections for a supplier facility with given ID.

```json
{"openapi":"3.0.1","info":{"title":"fulfillmenttools","version":"VERSIONLESS"},"tags":[{"description":"Facilities represent various locations that form part of the fulfillment network.","name":"Facilities (Core)"}],"servers":[{"url":"https://{tenant}.api.fulfillmenttools.com","variables":{"tenant":{"default":"your-tenant-name"}}}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"InterFacilityConnectionToSupplierForCreation":{"additionalProperties":false,"properties":{"carrierKey":{"description":"The key of the carrier that is used for this connection. References known and configured carriers in the system.","type":"string"},"carrierName":{"description":"The name of the carrier that is used for this connection.","type":"string"},"context":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionContext"},"maxItems":2000,"minItems":0,"type":"array"},"customAttributes":{"additionalProperties":true,"description":"Custom attributes that can be used to store additional information about the connection.","type":"object"},"cutoffTimes":{"$ref":"#/components/schemas/CarrierCutoffTimes"},"fallbackCosts":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionDeliveryCost"},"type":"array"},"fallbackTransitTime":{"$ref":"#/components/schemas/CarrierTransitTime"},"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDaysPerCountryAndProvince"},"type":"array"},"packagingUnitsByContexts":{"items":{"$ref":"#/components/schemas/PackagingUnitsByContext"},"maxItems":2000,"minItems":0,"type":"array"},"target":{"$ref":"#/components/schemas/InterFacilityConnectionSupplierTarget"},"type":{"$ref":"#/components/schemas/ConnectionType"}},"required":["target","type"],"type":"object","xml":{"name":"InterFacilityConnectionToSupplierForCreation"},"title":"InterFacilityConnectionToSupplierForCreation","description":"InterFacilityConnectionToSupplierForCreation"},"InterFacilityConnectionContext":{"additionalProperties":false,"properties":{"operator":{"$ref":"#/components/schemas/ContextOperator"},"type":{"$ref":"#/components/schemas/InterFacilityConnectionContextTypes"},"values":{"items":{"maxItems":2000,"minItems":0,"type":"string"},"type":"array"}},"required":["type","values"],"type":"object","title":"InterFacilityConnectionContext","description":"InterFacilityConnectionContext"},"ContextOperator":{"description":"The operator used to define how the context values are evaluated or compared.","enum":["NOT"],"type":"string","title":"ContextOperator"},"InterFacilityConnectionContextTypes":{"enum":["FACILITY","FACILITY_GROUP","CATEGORY","TAG_REFERENCE"],"type":"string","title":"InterFacilityConnectionContextTypes","description":"InterFacilityConnectionContextTypes"},"CarrierCutoffTimes":{"nullable":true,"properties":{"overwrites":{"items":{"$ref":"#/components/schemas/CarrierCutoffTimesOverwrite"},"type":"array"},"weekdays":{"items":{"$ref":"#/components/schemas/CarrierCutoffTimesWeekDay"},"type":"array"}},"required":["weekdays","overwrites"],"type":"object","xml":{"name":"CarrierCutoffTimes"},"title":"CarrierCutoffTimes","description":"CarrierCutoffTimes"},"CarrierCutoffTimesOverwrite":{"properties":{"cutoffConfigurations":{"items":{"$ref":"#/components/schemas/CarrierCutoffConfiguration"},"type":"array"},"date":{"format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"}},"required":["date","cutoffConfigurations"],"type":"object","xml":{"name":"CarrierCutoffTimes"},"title":"CarrierCutoffTimesOverwrite","description":"CarrierCutoffTimesOverwrite"},"CarrierCutoffConfiguration":{"properties":{"capacity":{"type":"number"},"time":{"pattern":"^(2[0-3]|[01]?[0-9]):([0-5]?[0-9])$","type":"string"}},"required":["time"],"type":"object","xml":{"name":"CarrierCutoffTimes"},"title":"CarrierCutoffConfiguration","description":"CarrierCutoffConfiguration"},"CarrierCutoffTimesWeekDay":{"properties":{"cutoffConfigurations":{"items":{"$ref":"#/components/schemas/CarrierCutoffConfiguration"},"type":"array"},"day":{"$ref":"#/components/schemas/WeekDay"}},"required":["day","cutoffConfigurations"],"type":"object","xml":{"name":"CarrierCutoffTimesWeekDay"},"title":"CarrierCutoffTimesWeekDay","description":"CarrierCutoffTimesWeekDay"},"WeekDay":{"description":"A weekday","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],"type":"string","xml":{"name":"WeekDay"},"title":"WeekDay"},"InterFacilityConnectionDeliveryCost":{"additionalProperties":false,"properties":{"currency":{"$ref":"#/components/schemas/CurrencyCode"},"decimalPlaces":{"description":"Number of decimal places for the given currency","minimum":0,"type":"integer"},"deliveryCostCoefficient":{"$ref":"#/components/schemas/DeliverCostCoefficient"},"value":{"description":"Value of operational cost of the facility. Value is configured in the smallest subunit, e.g. cents.","minimum":0,"type":"integer"}},"required":["value","currency"],"type":"object","title":"InterFacilityConnectionDeliveryCost","description":"InterFacilityConnectionDeliveryCost"},"CurrencyCode":{"description":"The currency code is a three-letter code that represents a currency in the ISO 4217 standard.","enum":["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLE","SOS","SRD","SSP","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UYW","UZS","VED","VES","VND","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMW","ZWL"],"type":"string","title":"CurrencyCode"},"DeliverCostCoefficient":{"additionalProperties":false,"properties":{"measurementUnit":{"$ref":"#/components/schemas/CostCoefficientMeasurementUnit"},"value":{"description":"The coefficient value","minimum":0,"type":"number"}},"required":["value","measurementUnit"],"type":"object","title":"DeliverCostCoefficient","description":"DeliverCostCoefficient"},"CostCoefficientMeasurementUnit":{"description":"The unit of measurement for the coefficient","enum":["GRAM"],"type":"string","title":"CostCoefficientMeasurementUnit"},"CarrierTransitTime":{"properties":{"maxTransitDays":{"description":"Maximum days a carrier needs for transit","format":"int32","minimum":0,"type":"number"},"minTransitDays":{"description":"Minimum days a carrier needs for transit","format":"int32","minimum":0,"type":"number"}},"required":["minTransitDays","maxTransitDays"],"title":"CarrierTransitTime","type":"object","description":"CarrierTransitTime"},"NonDeliveryDaysPerCountryAndProvince":{"properties":{"country":{"description":"The country code","type":"string"},"nonDeliveryDays":{"description":"Non-delivery days for this country","items":{"$ref":"#/components/schemas/NonDeliveryDays"},"maxItems":500,"type":"array"},"nonDeliveryDaysPerProvince":{"description":"Non-delivery days per province within this country","items":{"$ref":"#/components/schemas/NonDeliveryDaysPerProvince"},"maxItems":500,"type":"array"},"recurringNonDeliveryWeekdays":{"description":"Recurring non-delivery weekdays for this country","items":{"enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],"type":"string"},"maxItems":7,"type":"array"}},"required":["country","nonDeliveryDays","recurringNonDeliveryWeekdays","nonDeliveryDaysPerProvince"],"title":"NonDeliveryDaysPerCountryAndProvince","type":"object","description":"NonDeliveryDaysPerCountryAndProvince"},"NonDeliveryDays":{"properties":{"nonDeliveryDay":{"description":"The non-delivery day in YYYY-MM-DD format","format":"date","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"nonDeliveryType":{"default":"SINGLE","description":"Type of non-delivery day","enum":["SINGLE","RECURRING"],"type":"string"}},"required":["nonDeliveryDay"],"title":"NonDeliveryDays","type":"object","description":"NonDeliveryDays"},"NonDeliveryDaysPerProvince":{"properties":{"nonDeliveryDays":{"description":"Non-delivery days for this province","items":{"$ref":"#/components/schemas/NonDeliveryDays"},"maxItems":500,"type":"array"},"province":{"description":"The province identifier","type":"string"},"recurringNonDeliveryWeekdays":{"description":"Recurring non-delivery weekdays for this province","items":{"enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],"type":"string"},"maxItems":7,"type":"array"}},"required":["province","nonDeliveryDays","recurringNonDeliveryWeekdays"],"title":"NonDeliveryDaysPerProvince","type":"object","description":"NonDeliveryDaysPerProvince"},"PackagingUnitsByContext":{"additionalProperties":false,"properties":{"context":{"items":{"$ref":"#/components/schemas/PackagingUnitContext"},"maxItems":2000,"minItems":0,"type":"array"},"packagingUnits":{"items":{"$ref":"#/components/schemas/PackagingUnit"},"maxItems":2000,"minItems":1,"type":"array"}},"required":["context","packagingUnits"],"type":"object","title":"PackagingUnitsByContext","description":"PackagingUnitsByContext"},"PackagingUnitContext":{"additionalProperties":false,"properties":{"operator":{"$ref":"#/components/schemas/ContextOperator"},"type":{"$ref":"#/components/schemas/PackagingUnitContextTypes"},"values":{"items":{"maxItems":2000,"minItems":0,"type":"string"},"type":"array"}},"required":["type","values"],"type":"object","title":"PackagingUnitContext","description":"PackagingUnitContext"},"PackagingUnitContextTypes":{"enum":["TARGET_POSTALCODE","TARGET_COUNTRY","CATEGORY"],"type":"string","title":"PackagingUnitContextTypes","description":"PackagingUnitContextTypes"},"PackagingUnit":{"additionalProperties":false,"properties":{"dimensions":{"$ref":"#/components/schemas/PackagingUnitDimensions"},"maxItemQuantity":{"description":"The maximum item quantity of the packaging unit","minimum":0,"type":"integer"},"name":{"description":"The name of the packaging unit","type":"string"},"packagingUnitRef":{"description":"The reference ID of the packaging unit","type":"string"},"prices":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionDeliveryCost"},"type":"array"},"priority":{"description":"The priority of the packaging unit. Lowest value has the highest priority. Must be unique per context","minimum":0,"type":"integer"},"tenantPackagingUnitId":{"description":"The tenant-specific ID of the packaging unit","type":"string"},"transitTime":{"$ref":"#/components/schemas/CarrierTransitTime"},"volumeBufferInPercent":{"description":"The volume buffer of PackagingUnit in percent","minimum":0,"type":"integer"}},"required":["name","priority"],"type":"object","title":"PackagingUnit","description":"PackagingUnit"},"PackagingUnitDimensions":{"additionalProperties":false,"properties":{"height":{"description":"The height of the packaging unit","minimum":0,"type":"number"},"length":{"description":"The length of the packaging unit","minimum":0,"type":"number"},"maxWeightInGram":{"description":"The weight of the packaging unit","minimum":0,"type":"number"},"width":{"description":"The width of the packaging unit","minimum":0,"type":"number"}},"required":["length","width","height","maxWeightInGram"],"type":"object","title":"PackagingUnitDimensions","description":"PackagingUnitDimensions"},"InterFacilityConnectionSupplierTarget":{"allOf":[{"$ref":"#/components/schemas/InterFacilityConnectionBaseTarget"}],"properties":{"excludedFacilityGroupRefs":{"items":{"type":"string"},"type":"array"},"excludedFacilityRefs":{"items":{"type":"string"},"type":"array"},"facilityRef":{"type":"string"}},"type":"object","title":"InterFacilityConnectionSupplierTarget","description":"InterFacilityConnectionSupplierTarget"},"InterFacilityConnectionBaseTarget":{"discriminator":{"propertyName":"type"},"properties":{"type":{"$ref":"#/components/schemas/ConnectionType"}},"required":["type"],"type":"object","xml":{"name":"InterFacilityConnectionBaseTarget"},"title":"InterFacilityConnectionBaseTarget","description":"InterFacilityConnectionBaseTarget"},"ConnectionType":{"enum":["SUPPLIER","MANAGED_FACILITY","CUSTOMER"],"type":"string","title":"ConnectionType","description":"ConnectionType"},"InterFacilityConnectionToManagedFacilityForCreation":{"additionalProperties":false,"properties":{"carrierKey":{"description":"The key of the carrier that is used for this connection. References known and configured carriers in the system.","type":"string"},"carrierName":{"description":"The name of the carrier that is used for this connection.","type":"string"},"context":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionContext"},"maxItems":2000,"minItems":0,"type":"array"},"customAttributes":{"additionalProperties":true,"description":"Custom attributes that can be used to store additional information about the connection.","type":"object"},"cutoffTimes":{"$ref":"#/components/schemas/CarrierCutoffTimes"},"fallbackCosts":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionDeliveryCost"},"type":"array"},"fallbackTransitTime":{"$ref":"#/components/schemas/CarrierTransitTime"},"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDaysPerCountryAndProvince"},"type":"array"},"packagingUnitsByContexts":{"items":{"$ref":"#/components/schemas/PackagingUnitsByContext"},"maxItems":2000,"minItems":0,"type":"array"},"target":{"$ref":"#/components/schemas/InterFacilityConnectionManagedFacilityTarget"},"type":{"$ref":"#/components/schemas/ConnectionType"}},"required":["target","type"],"type":"object","xml":{"name":"InterFacilityConnectionToManagedFacilityForCreation"},"title":"InterFacilityConnectionToManagedFacilityForCreation","description":"InterFacilityConnectionToManagedFacilityForCreation"},"InterFacilityConnectionManagedFacilityTarget":{"allOf":[{"$ref":"#/components/schemas/InterFacilityConnectionBaseTarget"}],"properties":{"excludedFacilityGroupRefs":{"items":{"type":"string"},"type":"array"},"excludedFacilityRefs":{"items":{"type":"string"},"type":"array"},"facilityRef":{"type":"string"}},"type":"object","title":"InterFacilityConnectionManagedFacilityTarget","description":"InterFacilityConnectionManagedFacilityTarget"},"InterFacilityConnectionToCustomerForCreation":{"additionalProperties":false,"properties":{"carrierKey":{"description":"The key of the carrier that is used for this connection. References known and configured carriers in the system.","type":"string"},"carrierName":{"description":"The name of the carrier that is used for this connection.","type":"string"},"context":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionContext"},"maxItems":2000,"minItems":0,"type":"array"},"customAttributes":{"additionalProperties":true,"description":"Custom attributes that can be used to store additional information about the connection.","type":"object"},"cutoffTimes":{"$ref":"#/components/schemas/CarrierCutoffTimes"},"fallbackCosts":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionDeliveryCost"},"type":"array"},"fallbackTransitTime":{"$ref":"#/components/schemas/CarrierTransitTime"},"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDaysPerCountryAndProvince"},"type":"array"},"packagingUnitsByContexts":{"items":{"$ref":"#/components/schemas/PackagingUnitsByContext"},"maxItems":2000,"minItems":0,"type":"array"},"target":{"$ref":"#/components/schemas/InterFacilityConnectionCustomerTarget"},"type":{"$ref":"#/components/schemas/ConnectionType"}},"required":["target","type"],"type":"object","xml":{"name":"InterFacilityConnectionToCustomerForCreation"},"title":"InterFacilityConnectionToCustomerForCreation","description":"InterFacilityConnectionToCustomerForCreation"},"InterFacilityConnectionCustomerTarget":{"allOf":[{"$ref":"#/components/schemas/InterFacilityConnectionBaseTarget"}],"type":"object","title":"InterFacilityConnectionCustomerTarget","description":"InterFacilityConnectionCustomerTarget"},"InterFacilityConnection":{"additionalProperties":false,"allOf":[{"$ref":"#/components/schemas/VersionedResource"}],"properties":{"carrierKey":{"description":"The key of the carrier that is used for this connection. References known and configured carriers in the system.","type":"string"},"carrierName":{"description":"The name of the carrier that is used for this connection.","type":"string"},"context":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionContext"},"maxItems":2000,"minItems":0,"type":"array"},"customAttributes":{"additionalProperties":true,"description":"Custom attributes that can be used to store additional information about the connection.","type":"object"},"cutoffTimes":{"$ref":"#/components/schemas/CarrierCutoffTimes"},"fallbackCosts":{"items":{"$ref":"#/components/schemas/InterFacilityConnectionDeliveryCost"},"type":"array"},"fallbackTransitTime":{"$ref":"#/components/schemas/CarrierTransitTime"},"id":{"type":"string"},"nonDeliveryDays":{"items":{"$ref":"#/components/schemas/NonDeliveryDaysPerCountryAndProvince"},"type":"array"},"packagingUnitsByContexts":{"items":{"$ref":"#/components/schemas/PackagingUnitsByContext"},"maxItems":2000,"minItems":0,"type":"array"},"sourceFacilityRef":{"type":"string"},"target":{"oneOf":[{"$ref":"#/components/schemas/InterFacilityConnectionCustomerTarget"},{"$ref":"#/components/schemas/InterFacilityConnectionManagedFacilityTarget"},{"$ref":"#/components/schemas/InterFacilityConnectionSupplierTarget"}],"discriminator":{"propertyName":"type","mapping":{"CUSTOMER":"#/components/schemas/InterFacilityConnectionCustomerTarget","MANAGED_FACILITY":"#/components/schemas/InterFacilityConnectionManagedFacilityTarget","SUPPLIER":"#/components/schemas/InterFacilityConnectionSupplierTarget"}}}},"required":["id","sourceFacilityRef","target"],"type":"object","xml":{"name":"InterFacilityConnection"},"title":"InterFacilityConnection","description":"InterFacilityConnection"},"VersionedResource":{"properties":{"created":{"description":"The date this entity was created at the platform. This value is generated by the service.","format":"date-time","type":"string"},"lastModified":{"description":"The date this entity was modified last. This value is generated by the service.","format":"date-time","type":"string"},"version":{"description":"The version of the document to be used in optimistic locking mechanisms.","format":"int64","type":"integer"}},"required":["version"],"type":"object","title":"VersionedResource","description":"VersionedResource"},"ApiError":{"items":{"$ref":"#/components/schemas/ErrorInner"},"type":"array","xml":{"name":"ApiError"},"title":"ApiError","description":"ApiError"},"ErrorInner":{"properties":{"description":{"type":"string"},"requestVersion":{"description":"The version provided within an invalid request.","format":"int64","type":"integer"},"summary":{"type":"string"},"version":{"format":"int64","type":"integer"}},"required":["summary"],"type":"object","title":"ErrorInner","description":"ErrorInner"}}},"paths":{"/api/facilities/{facilityId}/connections":{"post":{"description":"Create a connections for a supplier facility with given ID.","operationId":"createConnectionToFacility","parameters":[{"description":"ID of facility you want to create a connection for","in":"path","name":"facilityId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InterFacilityConnectionToSupplierForCreation"},{"$ref":"#/components/schemas/InterFacilityConnectionToManagedFacilityForCreation"},{"$ref":"#/components/schemas/InterFacilityConnectionToCustomerForCreation"}],"discriminator":{"propertyName":"type","mapping":{"CUSTOMER":"#/components/schemas/InterFacilityConnectionToCustomerForCreation","MANAGED_FACILITY":"#/components/schemas/InterFacilityConnectionToManagedFacilityForCreation","SUPPLIER":"#/components/schemas/InterFacilityConnectionToSupplierForCreation"}}}}},"description":"Representation that the connection","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InterFacilityConnection"}}},"description":"Creation was successful."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user is not allowed to operate against this API instance"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"description":"Your user, although recognized, is not authorized to use this endpoint"}},"summary":"Create facility connection","tags":["Facilities (Core)"]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fulfillmenttools.com/documentation/by-pillar/advanced-order-routing/complex-routing-with-combinatorics/network-model/facility-connection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
