How to Automate Multi-Warehouse Inventory Routing

Operating multiple warehouses gives you faster delivery times and geographic redundancy. But it also creates a routing problem: which warehouse should fulfill each order? When this decision is made manually -- usually by a warehouse manager eyeballing a map and checking spreadsheets -- orders get misrouted, shipping costs bloat, and delivery times suffer. Automated multi-warehouse routing applies consistent logic to every order, selecting the optimal fulfillment location based on proximity, stock availability, shipping cost, and warehouse capacity.

This tutorial builds a production-grade routing engine using Make.com that integrates with your e-commerce platform, ShipStation, and your warehouse management system.

The Routing Decision Architecture

Multi-warehouse routing is fundamentally a scoring problem. For each incoming order, the automation evaluates every warehouse against multiple criteria and assigns the order to the highest-scoring location.

Multi-Warehouse Routing Decision Engine Incoming Order SKUs + Shipping Address Scoring Engine Evaluates each warehouse against 4 criteria Proximity ZIP-to-ZIP distance Stock Level All SKUs available? Shipping Cost Rate API estimate Capacity Current queue depth Route to Highest-Scoring Warehouse

Fig. 1 — Routing decision engine evaluating four criteria per warehouse

Step 1: Build the Warehouse Configuration Table

Start by creating a data store or Airtable base that defines each warehouse. For every location, record the warehouse ID and name, physical address and ZIP code, geographic coordinates (latitude/longitude for distance calculations), supported shipping carriers and account numbers, operating hours and cutoff times, current capacity status (percentage of daily fulfillment capacity used), and any product restrictions (e.g., hazmat, cold chain, oversized items).

This table is the reference data that the routing engine queries for every order. Keep it current. If a warehouse is temporarily closed or at capacity, update the status and the routing engine automatically redirects orders.

Step 2: Implement the Proximity Scoring Module

When an order arrives, extract the customer's shipping ZIP code. For each warehouse, calculate the distance to the customer. You have two approaches. The simple approach uses a ZIP-to-zone mapping table (carrier zone charts). Map the customer ZIP to a zone relative to each warehouse, and score lower zones higher. The precise approach calls a geocoding API (Google Maps Distance Matrix or a free alternative like OpenRouteService) to calculate actual shipping distance or transit time.

For most businesses, the zone-based approach is sufficient and avoids API costs. Create a lookup table that maps ZIP code prefixes (first 3 digits) to zones for each warehouse. A customer in ZIP 94105 might be Zone 1 from your Oakland warehouse and Zone 5 from your New Jersey warehouse.

Step 3: Check Inventory Availability Per Warehouse

Proximity means nothing if the warehouse does not have the product. For each order line item, query the inventory levels at every warehouse. A warehouse scores highest on this criterion if it has all order items in stock. Partial availability gets a reduced score. Zero availability disqualifies the warehouse entirely.

Use Make.com's Iterator module to loop through each warehouse, query its inventory API (or a consolidated inventory data store), and build an availability matrix. The matrix tells you exactly which warehouses can fulfill the complete order versus which can only fulfill part of it.

Step 4: Estimate Shipping Cost Per Warehouse

For cost-optimized routing, call the ShipStation Rate API (or the carrier's rate API directly) for each candidate warehouse. Pass the warehouse's origin address, the customer's destination, and the package dimensions/weight. The API returns estimated shipping costs for each available service level. Score warehouses with lower shipping costs higher.

To avoid API rate limits and latency on every order, consider pre-calculating a shipping cost matrix. For your most common destination zones, pre-fetch rates for standard package sizes and cache them. Only call the live API for unusual destinations or package configurations.

Step 5: Calculate the Composite Score and Route

Combine the four scoring criteria with configurable weights. A typical starting configuration:

  • Stock availability: 40% -- A warehouse without stock cannot fulfill, so this gets the highest weight.
  • Proximity: 30% -- Closer warehouses generally mean faster delivery and lower cost.
  • Shipping cost: 20% -- Actual cost can differ from proximity due to carrier pricing quirks.
  • Capacity: 10% -- Spread load across warehouses to avoid bottlenecks.

Normalize each score to a 0-100 scale, apply the weights, and sum. The warehouse with the highest composite score wins. Route the order there by creating a fulfillment request in ShipStation tagged with the warehouse ID, or by pushing the order directly to the warehouse's WMS.

Step 6: Handle Split Shipments

Sometimes no single warehouse has all items. When the availability matrix shows that Warehouse A has items 1 and 2 while Warehouse B has item 3, you face a split shipment decision. Build a cost comparison: is it cheaper to split the order across two warehouses (two shipments) or to transfer inventory between warehouses first (one shipment, delayed)?

For most businesses, splitting is the right call when the combined shipping cost of two packages is less than the cost of one package plus the inter-warehouse transfer time. Automate this comparison and let the system decide. When splitting, create separate fulfillment requests for each warehouse and send the customer a single notification explaining they will receive two packages.

Split Shipment Decision Logic Single WH has all? Single Shipment Route to best warehouse Yes Compare Costs Split vs. transfer + wait No Split shipments save 1-3 days delivery time vs. inter-warehouse transfers

Fig. 2 — Decision flow for handling multi-warehouse split shipments

Step 7: Monitor and Optimize

Log every routing decision with the scores, the selected warehouse, and the actual shipping cost and delivery time. After 30 days, analyze the data to fine-tune your scoring weights. If proximity-based routing is consistently beaten by cost-based routing, increase the cost weight. If one warehouse is overloaded while another sits idle, increase the capacity weight.

Build a weekly summary report that shows orders routed per warehouse, average shipping cost per warehouse, average delivery time per warehouse, and split shipment frequency. This data also informs strategic decisions like where to open your next warehouse location.

"Automated routing across our three warehouses cut average shipping costs by 22% and reduced average delivery time from 4.1 days to 2.3 days. The ROI was immediate." — DTC brand with warehouses in NJ, TX, and CA

Multi-warehouse routing pairs with backorder management to create a resilient fulfillment network. When one warehouse runs out of stock, the routing engine automatically redirects to another. For more on handling stockouts gracefully, see our tutorial on automating backorder management. To explore the full spectrum of e-commerce automation solutions, visit our solutions page.

Need Help Setting This Up?

Our automation engineers can build this workflow for you in days, not weeks. Get a free process audit to see exactly how it would work for your business.

Book Your Free Process Audit