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

# Order Location Rules

> Set an order's pickup or delivery facility automatically when orders import or sync.

This page is for **Shippers**: teams that quote, tender, and pay for freight in Owlery. If the person you're helping isn't a shipper, this page doesn't apply to them.

> [!NOTE]
>
> If you are an Enterprise customer with individual subsidiary organizations, remember that **shipper settings are organization specific**. Settings must be configured at the individual subsidiary organization level to ensure each subsidiary's operations work as expected.

**Where to find it:** `Settings → Shipper Settings → Orders`, in the **Order location rules** section.

Order location rules fill in an order's pickup or delivery facility for you when orders come in from your integrations. For example, send every refrigerated order to your cold-storage warehouse.

## What You See

Each rule in the list shows the stop and facility it sets (for example, **Pickup → Main Warehouse**), followed by the orders it applies to: integrations, order type, customers, items, and SKUs.

Next to each rule:

| Icon | What happens |
| - | - |
| Pencil (**Edit rule**) | Opens the rule so you can change it. |
| Eye (**Preview rule**) | Checks the rule against one of your orders without changing anything. |

## How Rules Work

* **Timing**: rules apply on the next import or resync. Saving a rule never changes orders you already have.
* **Matching**: an order must meet every condition you set. A condition left open matches any order.
* **One rule per order**: if more than one rule matches an order, only one of them is applied. Keep your rules from overlapping, and use **Preview** to check.
* **Your edits win**: if someone on your team changed an order's stop by hand, rules don't overwrite it.

## Add a Rule

**1. Open the Rule Editor**

Go to `Settings → Shipper Settings → Orders`. In **Order location rules**, click **+** (**Add rule**).

**2. Choose Which Orders It Applies To**

Every condition is optional. Leave one open to match any order.

| Field | What it matches |
| - | - |
| **Integrations** | Orders from the integrations you pick. |
| **Order type** | **Sales**, **Purchase**, or **Transfer** orders. |
| **Customers** | **All customers**, including orders with no customer, or only the customers you pick under **Selected Customers**. |
| **Item condition** | Dry items, refrigerated items, or items in a temperature range you enter. |
| **SKUs** | Orders with any of these SKUs, spelled exactly as they appear on the order. Paste a list separated by commas or new lines to add several at once. |

For **Custom temperature range**, enter the minimum and maximum in the same unit your items use in the [Item Master](https://help.owlery.ai/shippers/item-master.md). Owlery doesn't convert units. For one exact temperature, enter it in both fields.

**3. Choose the Location**

Under **Location to set**, choose **Pickup** or **Delivery**. Then search for and select the **Facility**.

**4. Decide Whether to Replace Existing Locations**

With **Replace existing stop location** off, the rule skips any order that already has both a pickup and a delivery stop, even when the location on the stop is blank.

Turn it on to let the rule replace the location on the stop you chose.

**5. Save**

Click **Save rule**. You see **Rule saved. It applies on the next import or resync; no orders were changed.**

## Edit a Rule

Click the pencil next to the rule, make your changes, and click **Save rule**. Changes apply on the next import or resync.

If the pencil is grayed out, the rule has extra conditions that can only be changed by Owlery. They're listed under the rule. Contact support to change it.

### Rules That Match Customer Names

Older rules may show **Customer name contains:** instead of a list of customers. When you edit one, choose **Selected Customers** and pick the customers, or choose **All customers**. Saving replaces the name match.

## Preview a Rule

Preview checks a saved rule against one of your saved orders. It doesn't change anything.

**1. Open Preview**

Click the eye next to the rule.

**2. Pick an Order**

Under **Order**, search by order or reference number and select a sales, purchase, or transfer order.

**3. Click Preview**

You see **Rule matches** with the facility the rule would set, or **Rule does not match** with the reason.

Preview uses the order as it's saved now. The next sync may bring in different order details, and other rules or your team's edits can still change the final location.

## Troubleshooting

> [accordion] The order already has pickup and delivery stops
>
> The rule has **Replace existing stop location** turned off. Edit the rule and turn it on.

> [accordion] The configured facility is unavailable
>
> The facility on the rule is no longer available. Edit the rule and select another facility.

> [accordion] Customer unavailable — choose another
>
> A customer picked on the rule is no longer available. Remove it from **Customers** and pick another.

> [accordion] The rule saved, but orders didn't change
>
> Rules apply only to orders imported or resynced after you save. Orders you already had keep their facilities.


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