> For the complete documentation index, see [llms.txt](https://docs.fulfillmenttools.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fulfillmenttools.com/documentation/by-pillar/advanced-order-routing/fences.md).

# Fences

A fence can be part of the routing rules and is required for a routing decision. If a facility can't meet the requirements of an order, the facility is excluded from the routing decision. This can lead to a situation in which no facility can meet the order's requirements. If this is the case, the order is returned to the pool and either included in upcoming routing decisions or deemed [unroutable](/documentation/by-pillar/advanced-order-routing/unroutable-orders.md).

{% hint style="info" %}
See the [Routing strategy API documentation](/documentation/apis/api-reference/routing-strategies.md).
{% endhint %}

A fence can be static or reactive.&#x20;

A static fence has no event trigger. If an order becomes [unroutable](/documentation/by-pillar/advanced-order-routing/unroutable-orders.md) because of a static fence, this order will remain in the unroutable order section.

A reactive fence has an event trigger. This means fulfillmenttools constantly checks for events that might dissolve this fence so the order becomes routable.

For now, only the complete stock fence can be set as a reactive fence. If an order becomes unroutable due to an out-of-stock situation and the items are [preorderable or backorderable](/documentation/by-pillar/advanced-order-routing/pre-and-backorders.md), the order gets routed automatically if stock becomes available.

To determine which reactive fences would have made an order unroutable, fulfillmenttools sorts fences from static to reactive and ensures all reactive fences are processed with all entities.

## Standard fences

fulfillmenttools provides predefined fences. See the table below.

<table><thead><tr><th>Fence</th><th>Description</th><th>Notes</th><th>Fence type<select><option value="rABTXMiL4FjC" label="Reactive" color="blue"></option><option value="kIBll4CxdGzU" label="Static" color="blue"></option></select></th></tr></thead><tbody><tr><td>Complete stock</td><td>Checks if all ordered items are available in the facility. This check already accounts for reservations and other stock that is unavailable for certain reasons.</td><td>The complete stock fence can't be combined with an order split.</td><td><span data-option="rABTXMiL4FjC">Reactive</span></td></tr><tr><td>Service type</td><td>Checks whether the facility can fulfill the order's <a href="/documentation/getting-started/facilities.md#service-type">service type</a> (ship-from-store standard, ship-from-store same day, or click-and-collect).</td><td></td><td><span data-option="kIBll4CxdGzU">Static</span></td></tr><tr><td>Preselected facilities</td><td>Reduces the facility candidates considered from all facilities in the network to only the specified ones. This list must include at least one facility and applies only to ship-from-store orders.</td><td></td><td><span data-option="kIBll4CxdGzU">Static</span></td></tr><tr><td>Carrier availability</td><td>Checks whether the consumer's chosen carrier is enabled at a given facility and can fulfill the order.</td><td></td><td><span data-option="kIBll4CxdGzU">Static</span></td></tr><tr><td>Same-day delivery possible</td><td>Checks if there is a facility that has the service type ship-from-store and at least one active <a href="/documentation/by-pillar/store-operations/carrier-management/carrier-features-and-requirements.md#same-day-delivery">same-day</a> carrier, and whether there is enough time for the facility to perform a same-day delivery.</td><td></td><td><span data-option="kIBll4CxdGzU">Static</span></td></tr><tr><td>Country</td><td>Checks whether the facility's address is in the same country as the consumer's address. Only those facilities are considered.</td><td></td><td><span data-option="kIBll4CxdGzU">Static</span></td></tr><tr><td>Facility capacity</td><td>Checks if there are any free <a href="/documentation/getting-started/facilities.md#facilities-fulfillmentcapacity">fulfillment capacity slots</a> available for a facility within a predefined future timeframe.</td><td></td><td><span data-option="kIBll4CxdGzU">Static</span></td></tr><tr><td>Ensure minimum picking</td><td>Checks that at least one ordered item is in stock. If not, the facility is excluded from order routing. </td><td>Items bundled so they are not split during routing (see the <a href="/documentation/by-pillar/store-operations/services/custom-services.md">custom services article</a>) are treated as one in this fence. Meaning that if one item is missing in such a bundle, all items within this bundle are seen as missing.</td><td><span data-option="kIBll4CxdGzU">Static</span></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fulfillmenttools.com/documentation/by-pillar/advanced-order-routing/fences.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
