String
Running the operation

Cheapest Isn't Enough When the Order Is Frozen: Routing Orders Across Warehouses for a Food Brand

Published

Short answer: This is a write-up of the warehouse routing String runs for one customer, a frozen food brand that ships from its own warehouse and several third-party ones. Each order goes to the home warehouse if it can arrive within two days. If it can’t, the order goes to the cheapest other warehouse that can. Every decision is written onto the order. If your routing is “closest warehouse with stock,” you don’t need any of this. If it’s more like this brand’s, the pattern may be useful.

Most warehouse routing asks two questions: which warehouses have the items, and which is closest to the customer. That’s what ShipStation’s Auto-Routing does, and for most brands it’s the right default. A closer warehouse usually means a lower zone, a cheaper label and a shorter trip.

This brand needed different questions. Here’s what we built, and why each piece is there.

What the brand needed

  • The food is frozen. An economy order has to arrive within two days, so a cheap label that takes three days is no good.
  • The home warehouse comes first. The brand would rather ship from its own warehouse whenever it can make the delivery window.
  • The warehouses don’t share a carrier. Some of the third-party warehouses ship on a different carrier and account from the rest. Once the rates differ, the closest warehouse isn’t always the cheapest.
  • Economy orders only ship on certain days. They go out Monday to Wednesday, so the ship date can change which warehouse can make the window.
  • Some channels have their own rules. One sales channel must never ship from one particular warehouse, and another has its own routing altogether.

How each order gets routed

Faster services go to the home warehouse. If the customer paid for two-day or next-day delivery, the order ships from the home warehouse, unless its sales channel says otherwise.

Economy orders try the home warehouse first. String prices the order from the home warehouse for its ship date and checks the transit time. If it arrives within two days, the home warehouse wins, even if another warehouse is cheaper. If it can’t make it, String tries the later ship days that week, then the next Monday, before giving up on the home warehouse.

Then the cheapest other warehouse that makes the window. String prices the order from each of the other eligible warehouses, on their own carriers. It picks the cheapest one that delivers within two days.

There’s always a fallback. If no warehouse can make the window, the order goes to a set default warehouse and gets tagged, so the team knows it didn’t route the normal way.

Writing down why

Every routed order gets a note explaining how String decided. The note covers which service level it picked, whether the home warehouse could make the window, and, if it couldn’t, which warehouses were compared and why one won. So when someone on the team asks why an order shipped from where it did, the answer is on the order. That matters more than it sounds. Routing that nobody can explain is routing nobody trusts, and the team ends up overriding it.

What to take from this if you’re building your own

You don’t need String to use the same structure:

  1. Write your routing as a list of questions in order, like “can home make it?”, then “who’s cheapest that can?”, then “what if nobody can?” Most routing problems come from an order that doesn’t fit the questions you thought you had.
  2. Make the delivery deadline a hard limit, and price second. For perishables especially, the cheapest option that arrives late isn’t the cheapest.
  3. Price from each warehouse’s real carrier and rates. Distance is a good stand-in for cost until your warehouses use different carriers or contracts.
  4. Rate for the day the order will actually ship, not the day it was placed.
  5. Always have a fallback, and flag it. Every order needs somewhere to go, and you want to know when the normal path didn’t work.
  6. Record why each decision was made. A note on the order is enough.

When you don’t need this

If every warehouse uses the same carrier and rates, and nothing you sell spoils, closest-with-stock gets you most of the way. Auto-Routing or a simple Ship From rule is enough. This kind of routing is worth building when delivery windows are strict, your warehouses’ costs differ, or the business has preferences that a general tool can’t know about.



For operations past what rules can do

Your warehouse routing has rules a tool doesn't know?

String's Pro Automation routes each order to the warehouse that fits your rules, and writes down why it chose it.