Skip to content
Sqquid

Order routing tools

Order routing assigns incoming order items to Sqquid locations.

You can also configure and preview routing in Settings.

Use the routing tools in this order:

routing_definitions
→ routing_get
→ routing_simulate
→ show the simulation to the user
→ routing_save

Do not save a routing change before you simulate it on recent orders.

Sqquid evaluates each order item in this order:

  1. Dropship rules.
  2. Store and curbside pickup.
  3. Location rules, in their listed order.
  4. Out-of-stock fallback.

Each Location rule assigns the quantity it can. Remaining quantity passes to the next rule, so one item can be split across Locations.

The configuration can also apply Location-specific inventory buffers and open-order limits. See Order routing for how those constraints affect each rule.

Type Purpose
connection_assignment Keep the mapped Location assigned by a supported Connection, without checking Sqquid inventory. Uses an empty config object.
channel Use different location lists for different sales Connections.
priority Use the selected locations according to available inventory.
priority_by_location Try locations in a fixed priority order.
geo Use the delivery destination to select nearby locations.

Call routing_definitions for the current schema and the complete description of each rule type.

connection_assignment currently receives assignments from Shopify. The Connection needs fulfillment-order read permissions, inventory by location, and a Location map. This rule does not apply inventory buffers or open-order limits. Missing, unmapped, or partial assignments leave quantity for later rules. See Connection-assigned Locations.

All Location rule types accept conditionGroups. Conditions within a group must all match. Any matching group allows the rule to run. An empty array applies no condition restriction. Conditions do not change the order of rules or apply to dropship, pickup, or fallback settings.

Field Meaning Operators
catalog_integration_id Importing Connection ID. equals, not_equals
source Sales source recorded on the order. Comparisons ignore capitalization and surrounding whitespace. equals, not_equals, contains, not_contains, starts_with, ends_with
item_count Total quantity across all original order items, including quantities handled by earlier rules. equals, not_equals, greater_than, less_than, greater_or_equal, less_or_equal

For example, this condition limits a rule to orders with at least five units:

{
"conditionGroups": [
{
"conditions": [
{ "field": "item_count", "operator": "greater_or_equal", "value": 5 }
]
}
]
}

This is a fragment of a Location rule. Preserve its ID, type, enabled state, and config when applying it to the complete configuration. Test orders that match and orders that do not. A skipped rule’s trace includes condition_failures with expected and actual values.

Get the information that is required to draft and test a routing configuration.

Requires routing:read. Read-only.

No input is required.

The result contains:

  • the routing evaluation order
  • rule types and their JSON Schemas
  • condition fields, operators, and matching behavior
  • fixed configuration sections
  • the complete configuration JSON Schema
  • Account locations and their store_id values
  • Account Connections and their IDs
  • five recent orders for simulation.

Use only the location and Connection identifiers from this result or from their related list tools.

Read the saved routing configuration.

Requires routing:read. Read-only.

No input is required.

The result contains the complete configuration. It also contains a plain-language rendering of each rule in evaluation order.

Start from this configuration when you change an existing setup. This preserves sections that the user does not want to change.

Test saved or draft routing on a real order.

Requires routing:read. Read-only. The tool does not change the order or save the draft.

Input Required Description
order_id Conditional Sqquid order ID. This value takes priority over order_search.
order_search Conditional Order number or customer name. It must match one order.
draft No Complete unsaved routing configuration. Omit it to test the saved configuration.

Supply order_id or order_search.

Use an order from routing_definitions.recent_orders when possible. If a search matches several orders, use the returned IDs to select one order.

The result contains:

  • the order and its items
  • the allocation for each item
  • items that no rule assigned
  • a step-by-step routing trace.

Show the allocations and important trace events to the user before you save a draft.

Replace the complete order routing configuration.

Requires routing:write. Changes data.

User approval is required.

Input Required Description
configuration Yes Complete configuration from routing_get or a draft based on routing_definitions.

The tool validates all location and Connection references before it asks for approval. It also rejects duplicate rule IDs.

The approval request shows the changed sections. It shows the current configuration and the new configuration.

If the submitted configuration is unchanged, the tool does not write data.

The result shows the saved configuration, changed sections, and a plain-language rendering.