
Order Management System
- 116 installs
- 41 repo stars
- Updated March 13, 2026
- finsilabs/awesome-ecommerce-skills
Design an order management system that routes orders to the right warehouse, handles split shipments, and manages backorders gracefully.
About
Designs an OMS that routes orders to warehouses, handles split shipments, and manages backorders. A developer uses it to coordinate order routing and fulfillment across a distributed inventory network.
- Warehouse routing and split-shipment handling
- Graceful backorder management
Order Management System by the numbers
- 116 all-time installs (skills.sh)
- Ranked #2,887 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
- Data as of Aug 3, 2026 (Skillselion catalog sync)
npx skills add https://github.com/finsilabs/awesome-ecommerce-skills --skill order-management-systemAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 116 |
|---|---|
| repo stars | ★ 41 |
| Last updated | March 13, 2026 |
| Repository | finsilabs/awesome-ecommerce-skills ↗ |
What it does
Design an order management system that routes orders to the right warehouse, handles split shipments, and manages backorders gracefully.
Files
Order Management System
Overview
An Order Management System (OMS) handles the full order lifecycle from placement to delivery: routing orders to the right fulfillment source (own warehouse, 3PL, or dropship supplier), splitting orders when items must ship from multiple locations, handling backorders, and maintaining a complete audit trail. For most merchants, platform-native features plus a shipping app cover 80–90% of OMS needs. A custom OMS is warranted when you have multiple fulfillment locations, complex routing rules, or are building a platform for other brands.
When to Use This Skill
- When your order volume has outgrown a single-warehouse workflow and you need multi-location routing
- When orders that mix in-stock and out-of-stock items need to ship in separate shipments without blocking fulfillment
- When integrating multiple fulfillment sources (own warehouse, 3PLs, dropship suppliers) into a unified routing engine
- When building the core order processing pipeline for a new platform that will support high order volume
- When you need a complete audit trail of every order state change for customer service and finance
Core Instructions
Step 1: Determine your platform and choose the right OMS approach
| Scenario | Recommended Approach | Why |
|---|---|---|
| Single warehouse, Shopify | Shopify + ShipStation | ShipStation handles order management, label creation, and tracking natively |
| Multi-location, Shopify | Shopify Locations + ShipStation or Shopify Fulfillment Network | Shopify supports up to 10 locations; ShipStation routes to the right location based on rules |
| 3PL integration | ShipBob, Whiplash, or Flexport + your platform's app | Each 3PL has native apps for Shopify, WooCommerce, and BigCommerce |
| Complex routing + backorders | Skubana (Extensiv), Linnworks, or ShipHero | These purpose-built OMS tools handle multi-warehouse routing, backorder queues, and split shipments |
| Custom / Headless | Build an OMS state machine + integrate Shippo/EasyPost for labels | Full control over routing rules, state transitions, and audit trail |
Step 2: Set up multi-location order routing
Shopify
Shopify Locations (up to 10 locations on standard plans): 1. Go to Settings → Locations → Add location for each warehouse or fulfillment center 2. In Settings → Shipping and delivery → Fulfill orders from, set your fulfillment priority:
- Shopify will automatically route orders to the location closest to the customer with available stock
3. For each product variant, set which locations stock that item: go to Products → [Product] → Inventory → Check each location's stock level 4. When an order is placed, Shopify selects the optimal fulfillment location automatically based on your priority rules
For 3PL integration:
- Install the 3PL's native Shopify app (ShipBob, Whiplash, Flexport all have Shopify apps)
- Configure which products are fulfilled by the 3PL vs. your own warehouse in the app settings
- The 3PL app creates an additional "location" in Shopify and receives order notifications automatically
For split shipments:
- Shopify automatically creates separate fulfillments when an order ships from multiple locations
- Each fulfillment gets its own tracking number and triggers its own shipping notification to the customer
WooCommerce
Using ATUM Inventory Management: 1. Install ATUM Inventory Management (free/premium, WordPress.org) 2. ATUM adds multi-location inventory tracking to WooCommerce 3. Configure fulfillment priority in ATUM → Settings → Multi-inventory 4. Orders are routed to the location with available stock based on your priority rules
For 3PL integration:
- ShipBob has a WooCommerce plugin; install it and configure which products ship from ShipBob
- ShipStation's WooCommerce plugin connects to multiple carriers and warehouses; configure routing rules in ShipStation → Automation → Rules
BigCommerce
1. Go to Inventory → Locations to add multiple fulfillment locations (available on Plus and above) 2. Set inventory levels per location for each product 3. BigCommerce routes orders to the location with stock closest to the customer based on your settings 4. For 3PL integration: ShipBob, Whiplash, and ShipStation all have native BigCommerce integrations via the App Marketplace
Step 3: Handle backorders
A backorder occurs when an order is placed for an item that is out of stock. The customer still wants the item; you need to fulfill it when stock arrives.
Shopify
Enable backorders: 1. Go to Products → [Product] → Variants → [Variant] 2. Set inventory tracking: check "Continue selling when out of stock" — this allows orders to come in even when stock = 0 3. Be transparent: show a "Ships in 2–3 weeks" message on the product page when stock is 0
Communicate backorders:
- When a product is backordered, Shopify's standard order confirmation doesn't flag this automatically
- Use Klaviyo or Shopify Email to create a trigger: when order has a line item with quantity > available stock → send a "Backordered" email with the estimated restock date
Fulfilling backordered orders:
- When stock arrives (you receive a shipment): manually fulfill the backordered orders in Shopify → Orders → filter by "Unfulfilled" and sort by order date
- For automatic backorder fulfillment: use Shopify Flow (Plus) or a webhook to trigger fulfillment when inventory is replenished
WooCommerce
1. Go to WooCommerce → Settings → Products → Inventory 2. Enable "Allow backorders" at the global level, or set per product: Products → [Product] → Inventory → Allow Backorders 3. Options: "Do not allow", "Allow but notify customer", "Allow without notification" 4. Recommend: "Allow but notify customer" — WooCommerce adds a "On backorder" badge and notifies the customer at checkout 5. Backordered orders appear in WooCommerce → Orders with status "On Hold" or "Processing" depending on your payment flow
BigCommerce
1. Go to Products → [Product] → Inventory 2. Enable "Allow Purchasing Out of Stock" — BigCommerce shows the product as "Available for Pre-Order" automatically when stock = 0 3. Set "Back Ordering" message text in Store Setup → Store Settings → Product Settings
Step 4: Maintain an order audit trail
Every order status change should be logged with who made the change and when. This is essential for customer service and fraud investigation.
Shopify
- Shopify automatically logs all order status changes in Orders → [Order] → Timeline
- The Timeline shows every event: payment confirmed, fulfillment created, shipping label purchased, tracking updated, etc.
- Add manual notes to the Timeline (visible to staff only) for any manual actions taken
WooCommerce
- WooCommerce logs order notes in each order's Order Notes section
- Status changes are logged automatically ("Order status changed from Processing to Completed")
- For more comprehensive audit logging: install WooCommerce Order Status Manager or Activity Log plugin
BigCommerce
- BigCommerce logs order status changes in the Order Activity section of each order
- The activity log shows all status changes, notes added, and system actions
Custom / Headless — order state machine with event log
// Order status state machine with full audit trail
type OrderStatus =
| 'pending'
| 'payment_processing'
| 'paid'
| 'awaiting_fulfillment'
| 'partially_fulfilled'
| 'fulfilled'
| 'delivered'
| 'cancelled'
| 'refunded';
const VALID_TRANSITIONS: Partial<Record<OrderStatus, OrderStatus[]>> = {
pending: ['payment_processing', 'cancelled'],
payment_processing: ['paid', 'cancelled'],
paid: ['awaiting_fulfillment', 'cancelled'],
awaiting_fulfillment: ['partially_fulfilled', 'fulfilled', 'cancelled'],
partially_fulfilled: ['fulfilled'],
fulfilled: ['delivered', 'refunded'],
delivered: ['refunded'],
};
async function transitionOrder(params: {
orderId: string;
newStatus: OrderStatus;
actorId: string;
note?: string;
}): Promise<void> {
const order = await db.orders.findById(params.orderId);
const allowed = VALID_TRANSITIONS[order.status] ?? [];
if (!allowed.includes(params.newStatus)) {
throw new Error(`Invalid transition: ${order.status} → ${params.newStatus}`);
}
await db.transaction(async tx => {
await tx.orders.update(params.orderId, { status: params.newStatus, updated_at: new Date() });
// Every transition is recorded — this IS the audit trail
await tx.orderEvents.insert({
order_id: params.orderId,
from_status: order.status,
to_status: params.newStatus,
actor_id: params.actorId,
note: params.note ?? null,
occurred_at: new Date(),
});
});
}
// Route an order to the right fulfillment source
async function routeOrder(orderId: string): Promise<void> {
const order = await db.orders.findById(orderId);
const lines = await db.orderLines.findByOrderId(orderId);
for (const line of lines) {
// Check own warehouse first
const warehouseStock = await db.inventory.findAvailable(line.sku, line.quantity);
if (warehouseStock) {
await db.fulfillmentLines.insert({
order_id: orderId,
order_line_id: line.id,
source: 'warehouse',
source_id: warehouseStock.location_id,
status: 'pending',
});
continue;
}
// Fall back to dropship supplier
const supplier = await db.supplierProducts.findBestSupplier(line.product_id, line.quantity);
if (supplier) {
await db.fulfillmentLines.insert({
order_id: orderId,
order_line_id: line.id,
source: 'dropship',
source_id: supplier.supplier_id,
status: 'pending',
});
continue;
}
// No source available — create a backorder
await db.backorders.insert({
order_id: orderId,
order_line_id: line.id,
product_id: line.product_id,
quantity: line.quantity,
status: 'pending',
});
// Notify customer about the backorder
}
}Best Practices
- Use a purpose-built OMS before building custom — Skubana/Extensiv ($500+/month) or Linnworks handles multi-warehouse routing, backorders, and split shipments with proven reliability; custom development should only start when these tools can't meet your specific needs
- Keep orders and fulfillments as separate entities — an order is a financial contract with the customer; fulfillments are physical shipments; one order can generate multiple fulfillments
- Queue fulfillment planning asynchronously — don't route orders synchronously during checkout; enqueue routing immediately after payment confirmation and process in a background worker
- Never silently drop backordered lines — always notify the customer and give them the option to wait or cancel; silent backorders erode trust when the customer discovers weeks later
- Alert on orders stuck in "awaiting fulfillment" for 24+ hours — set up a daily alert for orders that haven't moved to fulfillment; these usually indicate a routing error or system issue
Common Pitfalls
| Problem | Solution |
|---|---|
| Order splits into multiple shipments unexpectedly | Pre-warn customers at checkout if an order will ship from multiple locations; show estimated delivery per shipment separately |
| Backorder never fulfilled after stock arrives | Set up an automatic trigger: when inventory is replenished above the backorder quantity, trigger fulfillment for the oldest pending backorder (FIFO) |
| Partial cancellation leaves the order in a broken state | Implement partial cancellation — cancel only lines that haven't been picked; issue a refund for cancelled lines; update the order total |
| Shopify shows "partially fulfilled" but customer thinks full shipment is coming | Send a clear email explaining each shipment as it ships, with the items in that specific shipment and the remaining items to follow |
Related Skills
- @order-fulfillment-workflow
- @returns-management
- @multi-channel-selling
- @dropshipping-integration
- @demand-forecasting
{
"context": "Tests whether the agent correctly implements backorder creation with restock date tracking, customer notification using the correct email template, FIFO processing of backorders during replenishment, prevention of partial line fulfillment, re-queuing of fulfillment planning, derivation of order status from actual fulfillment records, and atomic updates to prevent double-fulfillment.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Backorder record insertion",
"max_score": 8,
"description": "A backorder record is inserted with fields including: order_id, order_line_id, product_id, quantity, estimated_restock_date (sourced from product data), and an initial status of 'pending'"
},
{
"name": "Order line status update",
"max_score": 8,
"description": "The order line's fulfillment_status is updated to 'backordered' when a backorder is created for it"
},
{
"name": "Customer notification sent",
"max_score": 8,
"description": "A customer email notification is sent when items are backordered — NOT silently skipped"
},
{
"name": "Correct email template",
"max_score": 8,
"description": "The notification uses the 'backorder-notification' template name (not a generic 'order-update' or custom inline template)"
},
{
"name": "Notification includes restock date",
"max_score": 5,
"description": "The backorder notification email data includes the estimated restock/arrival date for each backordered item"
},
{
"name": "FIFO fulfillment order",
"max_score": 10,
"description": "When allocating newly arrived inventory to pending backorders, backorders are processed in the order they were created (oldest first / ascending by created_at), not by priority, value, or arbitrary order"
},
{
"name": "No partial line fulfillment",
"max_score": 10,
"description": "If available stock is less than a backorder line's quantity, that backorder line is skipped entirely rather than being partially fulfilled"
},
{
"name": "Re-queue fulfillment planning",
"max_score": 10,
"description": "After a backorder is marked as fulfilled, fulfillment planning for the associated order is re-triggered via a background queue (not called synchronously and not omitted)"
},
{
"name": "Derived order fulfillment status",
"max_score": 8,
"description": "Order fulfillment status (partially_fulfilled vs fulfilled) is derived by querying actual fulfillment/shipment records, not by decrementing a counter or maintaining a separate boolean flag"
},
{
"name": "Status derived from shipped/delivered",
"max_score": 7,
"description": "The fulfillment status derivation checks each fulfillment's status against ['shipped', 'delivered'] (allShipped → 'fulfilled', someShipped → 'partially_fulfilled')"
},
{
"name": "Atomic backorder update",
"max_score": 10,
"description": "The backorder fulfillment update uses an atomic conditional UPDATE (WHERE status = 'pending') and checks that exactly one row was affected to prevent double-fulfillment race conditions"
},
{
"name": "Partial cancellation support",
"max_score": 8,
"description": "The cancellation logic (or design notes) addresses partially-shipped orders by only cancelling lines not yet picked/shipped, rather than blocking cancellation entirely"
}
]
}
Backorder Management and Inventory Replenishment
Problem/Feature Description
Nomad Outfitters is a specialty outdoor gear retailer with highly seasonal inventory. During peak season launches, many items sell out within hours, leaving hundreds of orders with one or more unfulfillable lines. Their current system simply drops these lines silently — customers discover items are missing only when their package arrives, generating a flood of support tickets. Finance has also reported cases where restocked inventory was "claimed" by multiple orders simultaneously (a race condition in the replenishment worker), leading to fulfillment promises that couldn't be kept.
The engineering team needs a proper backorder subsystem. When an order line cannot be fulfilled immediately, it should be tracked formally with the product's expected restock date, the customer should be informed, and once stock arrives the backorders should be processed fairly. When new inventory arrives for a product (from a purchase order receipt or a return), the system needs to allocate it to waiting backorders and re-trigger the fulfillment pipeline for the affected orders. Orders that have had some shipments go out but still have pending backorders need their status reflected accurately.
Output Specification
Produce the following TypeScript files:
backorder-handler.ts— handles recording new backorders and sending customer notifications when items cannot be fulfilledreplenishment-worker.ts— handles allocating newly arrived inventory to pending backorders and triggering downstream fulfillmentfulfillment-status.ts— handles computing and updating an order's fulfillment status based on its shipments
Also produce backorder-design.md that explains:
- How the system prevents an order from being double-claimed by concurrent replenishment workers
- How partial cancellation is handled for orders that have already had some items shipped
Stub out database and queue calls — the logic, data structures, and flow must be complete even if connections are mocked.
{
"context": "Tests whether the agent implements fulfillment routing that prefers own warehouses over dropship suppliers, selects the nearest warehouse by distance to destination ZIP, groups order lines by fulfillment source, wraps fulfillment creation in a transaction, queues planning asynchronously, models orders and fulfillments as separate entities, and warns customers about split shipments.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Warehouses tried first",
"max_score": 10,
"description": "The routing logic attempts to fulfill from own warehouses before considering dropship suppliers"
},
{
"name": "Dropship fallback order",
"max_score": 8,
"description": "When falling back to dropship suppliers, suppliers are evaluated/sorted by cost (ascending) rather than arbitrarily or by name"
},
{
"name": "Null for no source",
"max_score": 5,
"description": "When neither warehouse stock nor a dropship supplier is available for an item, the routing function returns null (or equivalent sentinel) rather than throwing or silently assigning a default"
},
{
"name": "Nearest warehouse selected",
"max_score": 10,
"description": "Among warehouses with sufficient stock, the one geographically closest to the customer's destination (by ZIP or coordinates) is selected — not just the first available"
},
{
"name": "Lines grouped by source",
"max_score": 10,
"description": "Order lines from the same fulfillment source are grouped together into a single shipment group rather than creating one fulfillment per line"
},
{
"name": "Source type included in key",
"max_score": 7,
"description": "The grouping key distinguishes both the source type ('warehouse' vs 'dropship') and the source id, so two sources with the same id but different types are not merged"
},
{
"name": "Fulfillment creation in transaction",
"max_score": 10,
"description": "The insertion of fulfillment records and fulfillment line records is wrapped in a single database transaction"
},
{
"name": "Separate order and fulfillment entities",
"max_score": 8,
"description": "Orders and fulfillments are modelled as separate tables/objects — fulfillment records reference the order by id rather than fulfillment data being embedded in the order record"
},
{
"name": "Async fulfillment queue",
"max_score": 10,
"description": "Fulfillment planning is triggered via a background queue or job (not called synchronously inline with payment confirmation)"
},
{
"name": "Split shipment customer warning",
"max_score": 10,
"description": "The design or output includes a mechanism (checkout warning, notification, or response field) to inform the customer when their order will arrive in multiple separate shipments"
},
{
"name": "FulfillmentSource type distinction",
"max_score": 7,
"description": "Fulfillment source records distinguish between type 'warehouse' and type 'dropship' (not just a generic 'source')"
},
{
"name": "Backordered lines handled",
"max_score": 5,
"description": "Lines with no available source are separated from the fulfilled lines rather than blocking the entire order fulfillment plan"
}
]
}
Distributed Fulfillment Routing Engine
Problem/Feature Description
RetailFlow is launching a new multi-channel e-commerce platform that will integrate three company-owned warehouses (in Seattle, Chicago, and Atlanta) with two dropship suppliers. When a customer places an order, the platform needs to automatically decide where each item should ship from — ideally the company's own stock (cheaper margins) and always from the location closest to the customer to minimize shipping time and cost. If no warehouse has stock, the system should fall back to a dropship supplier, preferring the cheapest one. Items that are unavailable anywhere should not block the rest of the order from shipping.
Because checkout latency is critical (the company targets sub-200ms API responses), the actual shipment planning and creation of fulfillment records must not happen synchronously during checkout. The checkout endpoint confirms payment and hands off to background processing. Additionally, the platform's product manager has flagged a user experience concern: customers who order both an in-stock and an out-of-stock item have previously complained about receiving an unexpected second shipment with no warning. The new system should address this.
Output Specification
Produce the following TypeScript files:
fulfillment-router.ts— contains the routing logic for a single order line and the fulfillment planning logic that groups lines into shipment groupsfulfillment-service.ts— contains the function that persists the fulfillment plan to the database and the integration point with the async background queue
Also produce fulfillment-design.md explaining:
- How the system handles orders that will arrive in multiple shipments from the customer's perspective
- The data model relationship between orders, fulfillments, and fulfillment lines
Stub out any database or queue calls — the code does not need to be runnable, but the logic, data structures, and flow must be complete.
Input Files
The following configuration file describes the available fulfillment sources. Extract it before beginning.
=============== FILE: inputs/fulfillment-sources.json =============== { "warehouses": [ { "id": "wh-sea", "name": "Seattle Warehouse", "location": { "lat": 47.6062, "lng": -122.3321 } }, { "id": "wh-chi", "name": "Chicago Warehouse", "location": { "lat": 41.8781, "lng": -87.6298 } }, { "id": "wh-atl", "name": "Atlanta Warehouse", "location": { "lat": 33.7490, "lng": -84.3880 } } ], "dropshipSuppliers": [ { "id": "sup-alpha", "name": "Alpha Goods", "costTier": "economy" }, { "id": "sup-beta", "name": "Beta Direct", "costTier": "premium" } ] }
{
"context": "Tests whether the agent implements the order status state machine using the correct status values, enforces valid transitions via a VALID_TRANSITIONS map, records every transition in an audit log within a transaction, protects against concurrent transition race conditions, and handles price adjustments correctly.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Correct status values",
"max_score": 10,
"description": "OrderStatus type (or equivalent) includes all of: 'pending', 'payment_processing', 'paid', 'awaiting_fulfillment', 'partially_fulfilled', 'fulfilled', 'partially_delivered', 'delivered', 'cancelled', 'refunded', 'partially_refunded'"
},
{
"name": "VALID_TRANSITIONS map",
"max_score": 10,
"description": "Code defines a VALID_TRANSITIONS structure (map, object, or enum) that constrains which statuses can follow which — not just ad-hoc if/else checks"
},
{
"name": "Correct transition rules",
"max_score": 10,
"description": "The transition rules match the skill: 'pending' can go to 'payment_processing' or 'cancelled'; 'paid' can go to 'awaiting_fulfillment' or 'cancelled'; 'partially_fulfilled' cannot directly go to 'delivered'"
},
{
"name": "Throws on invalid transition",
"max_score": 10,
"description": "Attempting an invalid transition throws an exception (or returns an error) rather than silently failing or allowing the update"
},
{
"name": "Transition wrapped in transaction",
"max_score": 10,
"description": "The order status update and the event log insertion are performed inside a single database transaction (not two separate independent queries)"
},
{
"name": "Order events audit record",
"max_score": 10,
"description": "Each transition inserts a record that includes: from_status, to_status, actor/actor_id, and a timestamp (occurred_at or equivalent)"
},
{
"name": "Note field in event log",
"max_score": 5,
"description": "The event log record includes an optional note field (nullable when not provided)"
},
{
"name": "Atomic state check on update",
"max_score": 10,
"description": "The code guards against race conditions by performing the status check and update atomically — either via a single UPDATE WHERE status = old_status, or by using an optimistic lock / SELECT FOR UPDATE pattern"
},
{
"name": "No direct price mutation",
"max_score": 10,
"description": "Order line prices are NOT updated/overwritten after order placement; any price adjustments are modelled as separate records (credit/debit lines, refund records, or equivalent)"
},
{
"name": "Strict enforcement at model layer",
"max_score": 10,
"description": "Transition validation happens inside the order update function/method itself, not only at the API/controller layer"
},
{
"name": "actor_id captured",
"max_score": 5,
"description": "The function/method that performs a transition accepts an actor identifier (user id, system token, etc.) and stores it in the event log"
}
]
}
Order Lifecycle Management Module
Problem/Feature Description
A growing e-commerce company is rebuilding its order processing backend after years of accumulated technical debt. Their current system uses a single status column with no enforcement of which transitions are legal — support tickets regularly show orders jumping from pending directly to fulfilled, or sitting in cancelled after a refund was already processed. Finance also complains that order line prices get overwritten when the warehouse applies discounts during pick-and-pack, making revenue reporting unreliable.
The team wants a clean TypeScript module that manages the order lifecycle correctly. The module must make illegal status changes impossible at the model level (not just in the API layer), keep a complete audit trail of every change so customer service can reconstruct what happened to any order, and handle concurrent updates safely so two workers processing the same order simultaneously can't corrupt its state.
Output Specification
Produce a TypeScript source file order-lifecycle.ts containing:
- The order status type definition
- The allowed transition rules
- A
transitionOrderfunction (or equivalent) that enforces the rules, records the change, and is safe under concurrency
Also produce a short design-notes.md explaining:
- How price adjustments after order placement should be handled (not modelled, just explained)
- How the concurrency safety approach works
The code does not need to be runnable end-to-end (no real DB connection required), but the logic and types must be complete and correct. Pseudo-code or stub implementations for the DB calls are fine.
{
"name": "finsi/order-management-system",
"version": "0.1.0",
"summary": "OMS design with distributed fulfillment, split orders, and backorder handling",
"skills": {
"order-management-system": {
"path": "SKILL.md"
}
}
}