The brief
Atlas/Ten ships outdoor gear from four warehouses across the US. Their Shopify Admin showed inventory at the SKU level; their 3PL (ShipHero) showed inventory at the warehouse level; reconciliation was a nightly job that frequently disagreed with itself. During Q4 last year, they oversold a $400 sleeping bag by 1,400 units in 36 hours.
They wanted a system of record they could trust.
What "trust" meant
- Inventory truth across warehouses within seconds, not the 4-hour sync gap they had
- Order allocation logic in their hands — split-ship rules, warehouse priority by region, backorder thresholds
- Operations dashboard inside Shopify Admin, not a separate app to log into
- No more nightly reconciliation jobs — events should be the source of truth
What we built
A private Shopify app, embedded in Admin via App Bridge + Polaris, sitting between Shopify and ShipHero. Inventory updates flow event-driven through webhooks (idempotent, queued, retryable) into a Postgres database that's the system of record for "available to promise" calculations.
When a customer checks out, a Shopify Function calls into our app's API to allocate inventory by warehouse before the order is created. If the allocation logic returns a split, the order is split before it hits Shopify's order pipeline — so customer service never sees a "partial" order they have to explain.
The whole thing is monitored with Sentry, queue depth metrics in Grafana, and a runbook the ops team helped write.
What changed
20,000 orders a day move through this system at peak. Order allocation runs in under 80ms p99. Ops tickets dropped 62% in the first 90 days because customer service stopped having to explain inventory mismatches to confused customers.
The reconciliation job still runs nightly but it's a verification, not a correction. It hasn't found drift in 4 months.
What was hard
Shopify's checkout doesn't natively expose inventory by location to discount and shipping rules at checkout time. We solved it with Shopify Functions (Rust, deployed to Shopify's edge) that call our app's API to enrich the cart. It works, but it's a part of the platform that's evolving fast — we re-checked our assumptions twice during the build as the API changed.
The runbook documents this as a "watch this if Shopify deprecates X" item. Honest engineering is admitting when you're depending on something that might move.
"We were duct-taping three apps to do this. Klaver shipped a private app that just works. Ops stopped hating Mondays."