Fences
If you would like to use these functionalities, contact our Support team for more information and activation support.
Note the difference between complex routing with combinatorics fences and regular fences.
Fences define hard constraints within the routing decision. They establish mandatory conditions that must be satisfied to be considered a valid routing option.
fulfillmenttools validates each potential routing option against all configured fences. Any routing option that doesn't meet all fence conditions is discarded immediately and excluded from further consideration.
This strict behavior ensures that only routing options that fully comply with non-negotiable business, operational, or contractual requirements remain eligible.
Because fences eliminate invalid options early, they directly influence which facilities or routing options can be selected. If all potential options violate at least one fence, routing may yield no valid option, and the order becomes unroutable.
Types of fences
There are two types of fences that fulfillmenttools distinguishes between:
Both can be added to the routing strategy via Backoffice or API.
Default fences
fulfillmenttools provides predefined fences that cover common and generally applicable restrictions by default.
Country borders
The country border fence excludes all routing options in which not all locations are located in the same country as the final recipient.
The final recipient can be either a consume or an ordering facility.
The country determination is based on:
Consumer: the delivery address (not the billing address)
Facility: the facility address
Any routing option that violates this condition is considered invalid and is excluded from the final routing decision.
The country border fence prevents cross‑border shipping in routing decisions. This restriction may be required, for example, due to licensing constraints, customs regulations, or other legal and regulatory requirements.
Order completeness
The order completeness fence ensures that only routing options are considered in which all items of an order can be successfully assigned to one or more facilities. A routing option must therefore achieve an assignment rate of 100%. If at least one item can't be assigned, the entire routing option is excluded from the routing decision.
The purpose of this fence is to ensure that the final recipient receives all items that were ordered. As a consequence, partial fulfillment is not permitted. If no routing option exists that allows a complete assignment of all order items, the routing process results in an unroutable outcome. In such cases, the order can't be fulfilled at all.
Example
A consumer places an order containing:
1 × item A
1 × item B
Two routing options are evaluated:
Option 1
Item A can be successfully assigned to a location
Item B can't be assigned to any location
The resulting assignment rate is 50%
Result: This option is filtered out by the order completeness fence

Option 2
Item A can be successfully assigned to a location
Item B can be successfully assigned to an additional location
This results in an assignment rate of 100%
Result: Provided that order split is active, this option isn't filtered out by the fence

Items may fail to be assigned to a location for various reasons, including:
No location has the item available.
Locations with available stock don't have a valid
facilityConnectionto deliver the item to the final recipient.Locations with stock and a valid
facilityConnectionare excluded by another fence.
In all of these cases, the routing option is rejected by the order completeness fence if full assignment can't be achieved.
Preselected facilities
The preselected facilities fence reduces the facility candidates to be considered from all facilities within the network to only specified ones. This list may contain from 1 to 500 facilityRefs and is only applicable for ship-from-store orders.
Custom fences
Custom fences extend the standard fence mechanism to support project‑specific or business‑specific requirements.
You can create custom fences that can be used on their own or alongside default fences. See the Custom routing rules article for full details.
Last updated
Was this helpful?

