> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryoto.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Order routing across warehouses and stores

> Set up the rules that decide which of your warehouses, stores or 3PLs fulfills each order, and learn how OTO evaluates them and what limits apply.

> [!NOTE]
>
> **Where to find it:** Settings → Advanced → Order OTOmation — [Open in OTO ↗](https://app.tryoto.com/order-automation)

Order routing decides which of your locations fulfills each order. It runs automatically on every order that reaches a routable state, and it is the highest-leverage set of rules in OTO — delivery cost, speed and success rate all move together when you change it.

> [!NOTE]
>
> **In the product**
>
> The screen is headed **Order Assignment OTOmation**. This page uses that name wherever it refers to the screen itself.

## When you'd use it

Any time you fulfill from more than one place. If you hold stock in two warehouses, ship from stores as well as a warehouse, or use a 3PL for part of the catalog, routing is what decides between them without a person looking at every order.

Merchants with a single location can skip this page — orders go to that location automatically.

## How rules are evaluated

Routing is a sorted list of rules. Each rule has conditions and a priority method. OTO walks the list from the top and stops at the first rule whose conditions the order satisfies. That rule decides the location. Rules below it never run.

![The Order Assignment OTOmation rule list](https://mintcdn.com/oto/YkJay8Y-1RDv8ciw/images/routing-1-rule-list.png?fit=max\&auto=format\&n=YkJay8Y-1RDv8ciw\&q=85\&s=ca2fe6dbe1f1cd5b64a553fbab393b0a)

Fig. 1 — The rule list. Each row shows the rule's position, name, whether Broadcast and Reassign are on, its Priority Method, and its Status — so the whole routing setup reads at a glance. Rule 1 here is in Test Mode; rule 2 is Active.

![Routing rules evaluated in priority order until one matches](https://mintcdn.com/oto/i18iHWUj0UsU2Wev/images/diagram-order-routing-light.png?fit=max\&auto=format\&n=i18iHWUj0UsU2Wev\&q=85\&s=8dea239174d3c8e6681f719523666eb1)

Conditions decide whether a rule applies. Location filters then remove locations that can't serve the order, and the Priority Method chooses between whatever is left.

> [!WARNING]
>
> **Order matters**
>
> A broad rule placed high in the list shadows every specific rule beneath it. Put your narrowest conditions first and your catch-all last.

## Building a rule

Open **Settings → Advanced → Order OTOmation** and choose **Add Order Otomation**. A rule is built in four blocks: identity, order filters, location assignment, and other details.

### Rule Name and Status

Both are required. **Status** is where you choose **Test Mode** or **Active** — set it to Test Mode while you are still shaping the rule.

### Order filters — the conditions

Conditions are `IF` rows, each a **Condition Type**, an **Operator** and a **Value**. Add as many as you need with **Add New**; every condition must be satisfied for the rule to match.

![The condition builder with the Condition Type list open](https://mintcdn.com/oto/YkJay8Y-1RDv8ciw/images/routing-2-conditions.png?fit=max\&auto=format\&n=YkJay8Y-1RDv8ciw\&q=85\&s=c5d5dee0b878c6c6c4c19c18bdae61ff)

Fig. 2 — The Condition Type list is searchable and covers order attributes (Brands, Category, SKU), timing (Order Time), source (Store Name) and destination (Destination City, Destination Country, Destination City Group), with more below the fold.

### Location assignment and location details

**Location Type** sets the pool: **All Locations**, **Only Branches** or only warehouses. You can then narrow further to **Specific Warehouses** or **Specific Branches**.

Below that sit six toggles. Each one removes locations that cannot actually serve this order, *before* the Priority Method picks a winner — so they are the difference between routing that looks right on paper and routing that survives contact with a real operation.

![Location filters and other details in the rule builder](https://mintcdn.com/oto/YkJay8Y-1RDv8ciw/images/routing-3-location-filters.png?fit=max\&auto=format\&n=YkJay8Y-1RDv8ciw\&q=85\&s=7b246b94cc054ab0e0454e3dd56dee27)

Fig. 3 — The six location filters, plus Other Details. The Broadcast Order tooltip states the behavior exactly: the order goes to multiple branches, and once one accepts it, it is no longer available to the others.

| Filter | What it does |
| - | - |
| **If origin city and destination city is same** | Keeps fulfillment within the destination city — the simplest lever for same-day economics. |
| **If order and location Brand are the same** | Stops one brand's orders being fulfilled from another brand's stock. |
| **If order is in Branch serving radius** | Respects the delivery radius configured on each branch. |
| **If order time is in location working hours** | Skips locations that are closed at the moment the order arrives. |
| **If order products stock is available** | Only considers locations that actually hold the items. |
| **If any driver is available in location** | Checks your own fleet before assigning — routing and [OTO FLEX](https://docs.tryoto.com/modules/oto-flex/overview.md) in one decision. |

## Features

13 features in this function.

### Rule-based order routing

The engine itself. A rule combines conditions with a priority method, and orders are matched against rules in the order the list is sorted. Conditions cover the order's commercial, timing and destination attributes, so a rule can be as broad as "everything going to Riyadh" or as narrow as one SKU from one store at one time of day.

### Routing by proximity

The **Closest Location** priority method picks the eligible location nearest the delivery address. Distance is real driving distance rather than straight-line, calculated by [Address and data correction](https://docs.tryoto.com/modules/omnichannel-oms/order-data-correction.md) — which is why routing depends on clean coordinates.

### Routing by available stock

**Highest Available Stock** sends the order to whichever eligible location holds the most of it. Useful for protecting stores from being stripped of a fast-moving line by online orders, and for draining a warehouse ahead of a season change. Pair it with the **If order products stock is available** filter so locations without the item are removed first.

### Forced routing to a location

**Specific Location** ignores proximity and stock and always assigns to the location you name. This is how you handle exceptions — a fragile category only one warehouse packs correctly, or a brand fulfilled exclusively from its own store.

### Live stock from ERP, POS and WMS

Stock-based routing is only as good as the number behind it. OTO can read quantities in real time from external systems — an ERP or POS for stores, a WMS for warehouses — rather than relying on a periodic sync, so the decision reflects what is actually on the shelf at the moment of routing.

### Broadcast to stores for acceptance

With **Broadcast Order** enabled, the order is offered to several branches at once and the first to accept it takes it; it then disappears for everyone else. **Location Count** sets how many locations it goes to. This suits store networks where staff availability varies through the day and a fixed assignment would strand orders.

### Reassignment on fulfillment timeout

**Reassign Order** covers the case where a location accepts an order and then does nothing. If the expected fulfillment action has not happened within the window you set, the order is pulled back and reassigned automatically. This is the safety net that stops a single unattended store aging a day's orders.

### Multi-location and 3PL routing

Routing treats every location the same way, whether it is your own warehouse, your own store, or a third-party fulfillment center. A 3PL integrated with OTO appears as a routable location, so you can move volume to and from it by editing a rule instead of changing a process.

### Rule priority ordering

Rules execute one at a time from the top of the list. **Sort Rules** opens a drag-and-drop view of the whole list so you can move a rule up or down without rebuilding it. Because evaluation stops at the first match, this ordering is effectively the logic of your entire routing setup.

### Automation Test and Test Mode

Rules do not have to go straight into production. Every rule carries a **Status** of either **Test Mode** or **Active**. A rule in Test Mode is evaluated and recorded but does not assign orders, so you can watch how it would behave against live traffic without moving a single shipment.

**Automation Test** is the other half. Give it an order number and it runs every rule against that order, showing which matched and which didn't — and for the ones that didn't, exactly which condition failed.

![Automation Test results for a single order](https://mintcdn.com/oto/ft-bRlLvOnJkbVoC/images/routing-4-automation-test.png?fit=max\&auto=format\&n=ft-bRlLvOnJkbVoC\&q=85\&s=b354dd91e249bb692538cf23311cf5c7)

Fig. 4 — Testing order 12345 against both rules. Rule 1 reports “Order conditions are not satisfied” and marks the failing condition. Rule 2 matches, passes its location filters, and resolves to DefaultWH. This is the fastest way to answer “why did this order go there?”

> [!TIP]
>
> **Debugging tip**
>
> When an order lands somewhere unexpected, run Automation Test on that order number before changing anything. The per-condition result usually shows that a rule higher in the list matched for a reason nobody expected.

### Manual reassignment

Operations and support staff can move an individual order at any point before pickup. Select it under **Shipments → Pending Orders**, then **Orders → Update Sender Location**. Choose a **Warehouse** or a **Branch**, set the resulting **Order Status**, and confirm.

![The Update Sender Location dialog](https://mintcdn.com/oto/YkJay8Y-1RDv8ciw/images/routing-5-update-sender-location.png?fit=max\&auto=format\&n=YkJay8Y-1RDv8ciw\&q=85\&s=cc30c59e6976e11829ec67cd849daf73)

Fig. 5 — Reassigning a single order. Order Status controls what the order becomes: Assigned to Warehouse, or Pickup From Store when it moves to a branch. If you have only one pickup location, or a default warehouse, that one is used automatically.

> [!WARNING]
>
> **Timing**
>
> An order can no longer be reassigned once it has been picked up.

### Order splitting across locations

When no single location can fill an order, OTO can split it and route each part separately. You set the maximum number of splits allowed, so a five-line order never becomes five shipments and five delivery fees unless you permit it. See [Order fulfillment](https://docs.tryoto.com/modules/omnichannel-oms/order-fulfillment.md) for what happens to split orders afterwards.

### Item consolidation across locations

The inverse of splitting. Items sitting in different locations can be brought together and sent as one shipment. Consolidation can be restricted to locations within the same city, or allowed across all of them — a trade-off between delivery cost and the extra leg each transfer adds.

## Limits and prerequisites

| Requirement | Detail |
| - | - |
| **Plan** | Order OTOmation is available on the Enterprise plan. |
| **Two or more locations** | Routing has nothing to decide with a single location. |
| **Stock visibility** | Highest Available Stock and the stock filter need live quantities — see [Inventory sync](https://docs.tryoto.com/modules/inventory-management/inventory-sync.md). |
| **Clean addresses** | Closest Location depends on geocoded coordinates from [Address and data correction](https://docs.tryoto.com/modules/omnichannel-oms/order-data-correction.md). |
| **Serving radius and hours** | Configured per branch and per location. The matching filters do nothing until those are set. |
| **Drivers** | The driver-availability filter requires [OTO FLEX](https://docs.tryoto.com/modules/oto-flex/overview.md) with drivers assigned to locations. |
| **Reassignment window** | Update Sender Location is unavailable once the order has been picked up. |

## Related

* [Address and data correction](https://docs.tryoto.com/modules/omnichannel-oms/order-data-correction.md) — produces the coordinates and corrected cities routing reads.
* [Pre-fulfillment checks](https://docs.tryoto.com/modules/omnichannel-oms/prefulfillment.md) — runs after routing and can hold an order routing has already placed.
* [Shipping automation](https://docs.tryoto.com/modules/shipping-management/shipping-automation.md) — the sibling rule engine for choosing a carrier, under the same Advanced settings menu.
* [Inventory sync](https://docs.tryoto.com/modules/inventory-management/inventory-sync.md) — where the stock numbers come from.
* [OTO FLEX](https://docs.tryoto.com/modules/oto-flex/overview.md) — the fleet whose driver availability routing can check.


## Related topics

- [Order fulfillment in warehouses and stores](https://docs.tryoto.com/modules/omnichannel-oms/order-fulfillment.md)
- [Inventory tracking](https://docs.tryoto.com/modules/inventory-management/inventory-tracking.md)
- [Omnichannel OMS](https://docs.tryoto.com/modules/omnichannel-oms/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.