Split Rules
Split rules automatically divide orders into multiple child orders based on configurable criteria. This is useful when different line items need to ship from different warehouses or via different methods.
How Splitting Works
- An order comes in with multiple line items
- Split rules evaluate each line item against conditions
- If items match different rules, the order is split into child orders
- Each child order contains only the relevant line items
- The parent order tracks the overall status
Configuring Split Rules
Navigate to Settings > Split Rules in the portal, or use the API:
POST /api/split-rules
Content-Type: application/json
{
"name": "Split by warehouse",
"priority": 1,
"conditions": {
"field": "lineItems.sku",
"operator": "starts_with",
"value": "WH-EAST-"
},
"action": {
"type": "split",
"assignTo": "east-warehouse"
}
}Split Criteria
You can split orders based on:
| Criteria | Description | Example |
|---|---|---|
| SKU prefix | Items with specific SKU patterns | WH-EAST-* goes to East warehouse |
| Product tag | Items tagged with specific values | frozen items to cold storage |
| Weight threshold | Items above/below a weight | Heavy items via freight |
| Quantity | Items above a quantity threshold | Bulk orders to wholesale fulfillment |
| Custom metadata | Any metadata field | fulfillmentType: dropship |
Parent-Child Relationship
When an order is split:
- The parent order retains the original order number and customer info
- Child orders get a suffixed order number (e.g.,
#1234-A,#1234-B) - Each child order is independently fulfillable
- The parent order status reflects the combined status of all children
Managing via API
GET /api/split-rules # List all rules
POST /api/split-rules # Create a rule
PATCH /api/split-rules/:id # Update a rule
DELETE /api/split-rules/:id # Delete a ruleSee API Reference: Split Rules for details.