Blog
November 3, 2026
Order Routing in Ecommerce: How OMS Determines Where Orders Are Fulfilled
.jpg)
A customer in Faisalabad places an order at 10 pm. You have stock in a Lahore warehouse, a Karachi warehouse and two retail stores. Which one should ship it?
That decision is called order routing. Get it right and the parcel arrives the next day, the COD cash comes back fast, and you pay less for shipping. Get it wrong and the order travels across the country, the customer loses interest, and the parcel comes back as a return.
This guide explains how an order management system (OMS) makes that decision automatically, in plain terms, for brands selling in Pakistan.
Quick answer: Order routing is the process an OMS uses to decide which warehouse or store fulfills each order. It checks live stock, the customer's city, courier coverage, shipping cost and location capacity, then assigns the order to the best location and books the courier. In a COD-heavy market like Pakistan, faster routing means fewer refused parcels and faster cash collection.
Key takeaways
- Order routing decides where an order ships from, not just how it ships.
- An OMS routes orders using stock, distance, courier performance, cost and capacity.
- Shipping from the nearest location with stock cuts delivery time and COD refusals.
- Brands with more than one warehouse or store need automated routing to scale.
- XStak OMS routes orders automatically and books the best courier for each city.
What is order routing in ecommerce?
Order routing is the automated process of assigning each customer order to the fulfillment location best placed to ship it. That location can be a central warehouse, a regional warehouse, a dark store or a retail store.
The OMS makes this decision in seconds, using rules you set. It is sometimes called order allocation, order orchestration or distributed order management. They all describe the same idea: one brain that sees every order and every unit of stock, and matches them in the smartest way.
If you sell from a single warehouse, routing is simple: everything ships from there. The moment you add a second warehouse, a store in another city, or a 3PL partner, you need a system to make that call for every order.
Why order routing matters for sellers in Pakistan
Most online orders in Pakistan are paid by Cash on Delivery. With COD, you don't get paid until the parcel reaches the door and the customer accepts it. Every extra day in transit is another day for the customer to change their mind.
That makes routing a cash problem, not just a logistics one. Here's how it affects your business:
- Delivery speed. Shipping from the nearest location with stock can turn a multi-day inter-city delivery into a same-day or next-day intra-city one.
- COD success rate. Faster delivery means fewer "I don't need it anymore" refusals at the door.
- Cash cycle. Delivered parcels convert to cash. Returned parcels convert to costs. Good routing moves money back to you faster.
- Shipping cost. Intra-city shipments usually cost less than inter-city ones, and avoiding split shipments saves you a second courier charge.
- Stock accuracy. Routing from real-time inventory stops you from accepting orders no location can fill, so fewer cancellations and angry customers.
- Peak season control. During Eid, 11.11 and Black Friday, routing spreads orders across locations so no single warehouse gets buried.
In short, routing decides how fast you deliver, what you pay to deliver, and how much of your COD revenue actually reaches your bank account.
How does an OMS decide where an order is fulfilled?
An OMS scores every possible location against a set of rules, then picks the best one. These are the six factors that matter most.
1. Stock availability
The first check is simple: which locations have every item in the order, right now? A good OMS reads live stock from your warehouses, stores and POS, so it never assigns an order to a location that has already sold out.
2. Customer location
Next, the OMS compares the delivery address with each location. An order to Gulberg, Lahore should ship from your Lahore warehouse or store, not from Karachi. Closer usually means faster and cheaper.
3. Courier coverage and performance
Not every courier performs equally in every city. The OMS checks which courier has the best delivery success rate on that route, and which ones actually cover the destination, including smaller towns.
4. Fulfillment cost
The OMS compares the total cost of fulfilling from each location: shipping rate, packaging and handling. When two locations can deliver equally fast, the cheaper one wins.
5. Location capacity
A store busy with walk-in customers can only pack so many online orders a day. The OMS respects each location's daily capacity, so orders don't pile up and miss the courier pickup.
6. Order type and business rules
Some orders follow special rules: store pickup, ship-from-store, prepaid vs COD, high-value orders, or fragile items. You can also set your own rules, such as "keep flagship store stock for walk-in customers" or "send high-value COD orders only through our top courier."
How order routing works, step by step
Here is what happens to a single order inside an OMS, from checkout to dispatch.
- The order comes in. A customer buys on your website, Instagram, Facebook, a marketplace or your app. The OMS pulls every order from every channel into one dashboard.
- The order is verified. COD orders can be confirmed by call, SMS or WhatsApp before any stock is reserved. Fake or duplicate orders are filtered out early.
- Live stock is checked. The OMS looks at real-time inventory across all your warehouses and stores.
- Routing rules are applied. Every location that can fill the order is ranked by distance, cost, courier performance and capacity.
- The order is assigned. The top-ranked location receives the order, and its manager gets an email or SMS alert.
- The courier is booked. The OMS books the best-performing courier for that route and generates the airway bill (AWB) automatically.
- The customer is kept updated. Tracking updates go out by SMS or email until the parcel is delivered.
What if no single location has the full order? The OMS follows your rules. It can split the order into two shipments, or transfer stock between locations first and ship once. Splitting is faster; transferring saves a second courier charge.
Example: one order, three locations
Let's make this real. A fashion brand gets a COD order from a customer in Rawalpindi for two items: a lawn suit and a matching dupatta. The brand has three locations.
The OMS picks Lahore because it can ship the full order in one parcel over a short route. It books the courier with the best delivery record into Rawalpindi and sends the customer a tracking link.
Now change one thing: the Islamabad store gets both items back in stock. The next identical order goes to Islamabad instead, for a faster delivery. No one on your team has to make that call. The rules do it.
Common order routing strategies
Most brands use one of these strategies, or a mix of them.
Which one should you choose? A growing brand usually starts with "central warehouse first." As it opens stores in more cities, it moves to "nearest location" plus ship-from-store, with single-shipment rules to keep courier costs down.
Signs your business needs automated order routing
You probably need an OMS with routing if any of these sound familiar:
- Your team checks stock by phone, WhatsApp or spreadsheet before confirming orders.
- Orders ship from Karachi to customers in Lahore while Lahore stock sits unsold.
- You cancel orders because the website showed stock that was already sold in-store.
- Multi-item orders often go out as two parcels, with two courier charges.
- Your COD refusal rate climbs during sales, when deliveries slow down.
- Store managers find out about online orders late, and pickups get missed.
- You can't tell which courier performs best in which city.
Each of these is a routing problem. Each one costs you money on every order.
How XStak OMS routes orders
XStak OMS is a cloud-based, multichannel order management system built for brands in Pakistan that sell across websites, marketplaces, social channels and physical stores. It automates routing from checkout to courier booking.
What XStak OMS does for you
- Real-time inventory sync. Stock stays in sync across your web store, warehouses, retail stores, POS and ERP. You can list your full inventory online without holding buffer stock.
- Automatic order assignment. Orders go to the nearest location that has the stock, and the store or warehouse manager is alerted by email and SMS.
- Smart courier selection. XStak books the best-performing courier for each location and city, using courier performance data, to cut delivery time and cost.
- Every fulfillment model. Home delivery, buy online pick up in store, buy online return in store, buy in store, and ship from store, all from one system.
- Live tracking and customer alerts. Customers get SMS and email updates at each stage of the order.
- Role-based access. Separate views for business managers, store managers and customer service teams.
- Business intelligence. Sales, inventory and courier insights in one place, so you can see what is working.
- Easy integrations. Connects with leading storefronts, POS, ERP, accounting and shipping platforms through an API-first design.
- Transaction-based pricing. No heavy setup or yearly licence fees.
Part of a complete e-commerce ecosystem
XStak OMS works with the rest of the PostEx ecosystem, so every order is tracked from sale to cash:
- Sell with XPay online payments and COD.
- Operate with XStak OMS and WMS.
- Deliver through PostEx courier aggregation.
- Collect cash faster with PostEx upfront COD payments.
Metrics to track after you automate routing
Routing is only as good as its results. Track these numbers every week:
If a metric moves the wrong way, adjust your rules. For example, if the split shipment rate is high, give "single shipment first" more weight.
Frequently asked questions
What is order routing in an OMS?
Order routing is the OMS feature that automatically assigns each order to the warehouse or store best placed to fulfill it, based on stock, customer location, courier performance, cost and capacity.
What is the difference between order routing and order management?
Order management covers the full order lifecycle, from capture to delivery and returns. Order routing is one step inside it: deciding which location ships the order.
Is order routing the same as courier allocation?
No. Order routing decides which location ships the order. Courier allocation decides which courier delivers it. A good OMS, like XStak OMS, does both automatically.
Do I need order routing if I have only one warehouse?
Not for choosing a location. You still benefit from automated courier selection, COD order verification and tracking. Routing becomes essential once you add a second warehouse or start shipping from stores.
Can order routing reduce COD returns in Pakistan?
Yes. Shipping from the nearest location, through the courier with the best delivery record in that city, shortens delivery time. Faster delivery leads to fewer refusals at the door.
What is ship-from-store?
Ship-from-store means using retail store stock to fulfill online orders. It turns each store into a mini warehouse and speeds up delivery in that city.
What happens if no location has the full order?
The OMS follows your rules. It can split the order into separate shipments, or move stock between locations and ship once.
Does XStak OMS work with Shopify and my POS?
XStak OMS integrates with leading storefronts, POS and ERP systems through its API, so orders and inventory stay in sync in one place.
How is XStak OMS priced?
XStak OMS uses transaction-based pricing, with no heavy setup or yearly licence fees.
Route every order to the right place
Order routing decides how fast your customer gets their parcel, what you pay to ship it, and whether a COD order turns into cash. When you sell across cities, channels and stores, routing by phone and spreadsheet stops working.
XStak OMS automates the whole decision: live stock across every location, automatic order assignment, smart courier booking and real-time tracking, all from one dashboard.
Become An Omnichannel Retailer
Take a personalized tour of XStak's retail operating modules with our Sales experts and learn how XStak can enable you to grow.
