How routing works
Routing decides which site fulfils each line of an order. The result becomes the order's fulfilment groups — one per site.
:::note The engine has to be switched on
The routing engine is off until your organisation enables it, under the Order routing engine toggle in your organisation's settings.
While it is off, incoming orders are assigned to the channel's default site and none of the rules below run. Everything on this page assumes it is on.
:::
Rules narrow candidates, they do not score them
This is the thing to hold onto. The engine does not award points to each site and pick the highest. It begins with every site as a candidate and removes candidates until one is left.
Read it that way and your own configuration becomes predictable. Read it as scoring and rule order looks arbitrary, which it is not.
The stock gate runs first
Before any of your rules, sites that do not have enough stock for the line are removed. This is a hard gate: it is not one of your rules, you cannot reorder it, and you cannot turn it off.
It runs first because the alternative is absurd — a rule that picks the nearest site is worthless if the nearest site has nothing to send.
Then your rules, in order
Each enabled rule takes the surviving candidates and filters them further. They run in priority order, lowest number first — priority 1 before priority 2.
The engine stops as soon as one candidate remains. Rules further down the list never run. This is why order matters more than quantity: a rule that usually narrows to a single site makes everything below it decorative.
A disabled rule is skipped but keeps its configuration, so you can switch one off to see what changes without losing how it was set up.
The rules available to you are in routing rule kinds.
When nothing qualifies
If the hard gate leaves nothing — no eligible site has stock for the line — the line goes to the fallback site. A rule set cannot be activated without one.
After the rules
One more pass runs on top of the per-line results: if a single site could fulfil every line on the order, single-source preference prefers shipping the whole order from there rather than splitting it. It is on by default.
A worked example
Say your rules are: (1) stay in destination country, (2) ranked sites — Manchester, then Leeds.
An order ships to France, for a line held in Manchester, Leeds and Paris.
- Stock gate. All three hold it, so all three survive.
- Stay in destination country. Only Paris is in France. One candidate remains.
- Ranked sites never runs. The engine already has its answer.
The same order shipping to Leeds would have all three survive the country rule, then ranked sites picks Manchester.
What routing does not do
It does not re-evaluate. An order records which version of the rule set routed it the first time round, and that decision stands even after you change your rules — see rule sets and versions.
It does not always get the last word either: a channel can supply its own choice of site, and whether that wins is a per-channel setting. See when a channel disagrees.