Rules & Automation Overview

Set up Rules in OmniOrders to route orders, modify data, send notifications, and control inventory sync automatically.

---
title: "Rules & Automation Overview"
description: Set up Rules in OmniOrders to route orders, modify data, send notifications, and control inventory sync automatically.
---

Rules handle the repetitive parts of order processing for you. You pick a trigger event (like an order import or inventory sync), add the actions you want, and the rule runs on its own from there.

<img
  src="/screenshots/rules-flow-editor.png"
  alt="Flow Editor showing a rule with triggers, conditions, routing, and notifications"
  style="max-width: 720px; width: 100%; border-radius: 8px; border: 1px solid var(--sl-color-gray-5);"
/>

:::tip[Quick Start]
Go to **Automation > Rules** from the sidebar to see your rules and start creating new ones. You can also start from a template to save time.
:::

## Why Use Rules?

<CardGrid>
  <IconCard title="Automatic Order Routing" icon="route">
    Send orders to the right warehouse based on inventory levels, ZIP codes, or address matching.
  </IconCard>

<IconCard title="Modify Orders on Import" icon="pencil">
  Change shipping methods, update order data, add SKUs, or apply charges and discounts before orders
  hit your system.
</IconCard>

<IconCard title="Email Notifications" icon="mail">
  Send email alerts when orders are imported, shipped, or match specific conditions.
</IconCard>

  <IconCard title="Inventory Sync Control" icon="refresh-cw">
    Choose which warehouses push inventory to your sales channels and filter what gets synced.
  </IconCard>
</CardGrid>

## How Rules Work

Every rule has three parts: **Trigger → Conditions → Actions**.

1. **Trigger** — The event that starts the rule (e.g., "Before Import Order")
2. **Conditions** — Optional IF/THEN/ELSE logic to check order data before acting
3. **Actions** — What happens when the rule runs (e.g., route to warehouse, send email)

You build rules in the **Flow Editor**, a drag-and-drop canvas where you wire up triggers, conditions, and actions. Chain as many actions as you need, and add IF/THEN/ELSE branches for conditional logic.

## Available Triggers

Triggers are the events that kick off a rule. The trigger you choose also determines which actions you can use.

<CardGrid>
  <IconCard title="Before Import Order" icon="download" bgColor="#eff6ff" bgColorDark="rgba(59, 130, 246, 0.12)">
    Runs before an order is imported from a sales channel. This is the most used trigger — it supports routing, order modification, and notification actions.
  </IconCard>

<IconCard
  title="Inventory Sync"
  icon="refresh-cw"
  bgColor="#f0fdf4"
  bgColorDark="rgba(34, 197, 94, 0.12)"
>
  Runs when inventory is synchronized with a sales channel. Use it to control which warehouses push
  inventory.
</IconCard>

<IconCard
  title="PO In Transit"
  icon="truck"
  bgColor="#faf5ff"
  bgColorDark="rgba(168, 85, 247, 0.12)"
>
  Runs when a purchase order shipment is in transit. Useful for sending webhooks to external
  systems.
</IconCard>

<IconCard
  title="PO Complete"
  icon="check-circle"
  bgColor="#f0fdf4"
  bgColorDark="rgba(34, 197, 94, 0.12)"
>
  Runs when a purchase order shipment is complete. Trigger notifications or HTTP requests on
  receipt.
</IconCard>

  <IconCard title="Tracking Update" icon="map-pin">
    Runs when tracking information is updated on an order.
  </IconCard>
</CardGrid>

## Available Actions

Actions are what the rule actually does. They're grouped by category in the sidebar.

### Routing

| Action                                                 | Description                                                                     |
| ------------------------------------------------------ | ------------------------------------------------------------------------------- |
| **Route to Warehouse**                                 | Send orders to a specific warehouse you choose                                  |
| **Route by Inventory**                                 | Auto-check stock and route only to warehouses that can fulfill the order        |
| **Closest Warehouse**                                  | Route to the nearest warehouse by customer address using geocoding              |
| **Route by ZIP Code**                                  | Assign warehouses based on the customer postal code range                       |
| **Route by SKU**                                       | Send specific products to designated warehouses                                 |
| **Address Match**                                      | Match the customer address against warehouse addresses for best fit             |
| **[Complex Order Routing](/automation/split-orders/)** | Split one order into multiple shipments when no single warehouse has everything |

### Modify Order

| Action                      | Description                                                            |
| --------------------------- | ---------------------------------------------------------------------- |
| **Change Shipping Method**  | Override the carrier and shipping service on the order                 |
| **Change Shipping Details** | Update the carrier and method saved on the order                       |
| **Change Order Status**     | Set the order to a different status (e.g., hold, ready, canceled)      |
| **Modify Order Data**       | Update address, dates, tags, references, or customer info              |
| **Add Charge / Discount**   | Apply a surcharge or discount to the order total                       |
| **Add SKUs to Order**       | Insert additional products into the order (e.g., gift inserts, promos) |
| **Find & Replace**          | Find and replace order values manually or via CSV upload               |

### Notifications

| Action         | Description                                                          |
| -------------- | -------------------------------------------------------------------- |
| **Send Email** | Send an email notification with customizable template and recipients |

### HTTP Request

| Action                     | Description                                                              |
| -------------------------- | ------------------------------------------------------------------------ |
| **Webhook / HTTP Request** | POST event data to an external URL with custom headers and field mapping |

### Inventory

| Action                | Description                                                      |
| --------------------- | ---------------------------------------------------------------- |
| **Select Warehouses** | Choose which warehouses push inventory data to the sales channel |

## The Rules Page

The Rules page at **Automation > Global Rules** has two main sections:

### Your Rules

This section lists all rules you've created. Each rule card shows:

- **Step badges** — Small colored icons showing the flow of actions (trigger → actions)
- **Rule name** — The name you gave the rule
- **Status indicator** — Green dot for active, "Disabled" label for inactive
- **Flow breadcrumb** — A text summary of the trigger and actions (e.g., "Before Import Order › Route to Warehouse")
- **Toggle switch** — Turn a rule on or off instantly
- **Edit and Delete buttons** — Modify or remove the rule

You can filter and search your rules using:

- **Search bar** — Find rules by name
- **Category filter** — Filter by trigger type (e.g., All rules, Before Import Order)
- **Status filter** — Show only active or disabled rules
- **Sort order** — Sort by newest, oldest, or name (A–Z / Z–A)

:::caution[Integration Rules]
If a rule is linked to an active integration, you cannot deactivate it from this list. Unlink it from the integration first.
:::

### Templates

Below your rules, you'll find pre-built **Templates** grouped by category. Pick one as a starting point and adjust it to fit your workflow.

| Category               | Templates                                                                 |
| ---------------------- | ------------------------------------------------------------------------- |
| **Order Routing**      | Route to Specific Warehouse, Route by ZIP / Region, Address Match Routing |
| **Order Modification** | SKU Find & Replace                                                        |
| **Notifications**      | Order Confirmation Email                                                  |
| **Inventory Sync**     | Warehouse Inventory Push, Inventory Sync with Filter                      |
| **Integrations**       | Webhook on PO Complete, Webhook on PO In-Transit                          |

Click any template card to preview its steps, then create a rule from it.

## Next Steps

For a walkthrough of the Flow Editor and how to manage your rules, see [Creating & Managing Rules](/automation/managing-rules/). To split one order across warehouses, see [Split Orders](/automation/split-orders/).

**Related pages:**

- [Split Orders](/automation/split-orders/)
- [Integrations Overview](/integrations/overview/)
- [Orders Overview](/orders/overview/)
Copied to clipboard!