Ecommerce

Your Profit Is Stuck in the Warehouse: The AI Inventory Forecasting System That Frees Cash

August 10, 20268 min read

Most ecommerce brands don't die unprofitable. They die profitable — with a healthy P&L, a proud margin, and every peso of it sitting on a pallet. AI inventory forecasting is the least glamorous system you will ever build and the one that decides whether you get to keep playing.

Nobody posts about it. No screenshot makes a reorder point look exciting.

But the brand that runs out of its hero SKU in week three while sitting on nine months of a colorway nobody wanted doesn't have a marketing problem. It has a cash problem wearing a marketing costume.

Why AI Inventory Forecasting Keeps Failing Real Brands

Because founders reach for the model before they fix the inputs, the policy, and the decision. The forecast is the last five percent of the problem and it gets ninety-five percent of the attention.

Three things go wrong, in the same order, every time.

The data is a fiction. Your stock number includes units that are damaged, allocated to an unshipped order, or still on a boat. You are forecasting against a quantity that does not exist, and no model repairs a lie in the input.

Every SKU gets the same treatment. Four hundred products, one reorder policy. Your top ten deserve a weekly conversation. Your bottom two hundred deserve a rule and total silence.

And the forecast never becomes a decision. It lands in a tab. Somebody eyeballs it, feels optimistic, and places the order they were always going to place. A prediction nobody acts on is entertainment.

A forecast is not an output. It is an instruction to spend money you cannot get back.

The Reframe: Run a Cash Cycle, Not a Forecast

Stop asking how many units you will sell. That question has no owner and no consequence. Ask the operator's version instead: how fast does a peso I put into inventory come back to me as a peso I can spend again?

That is your cash cycle, and it is the real scoreboard. Two brands with identical revenue and identical margin are not the same business if one turns its stock four times a year and the other turns it once.

I run every brand I touch on the Cash Cycle — four moves, in this order: Count, Segment, Predict, Commit. The order matters, because each move makes the next one cheaper to get right.

The Four Moves of AI Inventory Forecasting

  • Move 1 — Count. One table, one truth: units sellable, units committed, units in transit, units dead. Add supplier lead time and landed cost per SKU. Then compute the only number that should live on your wall — days of cover, per SKU. Not stock value. Days. A warehouse is not an asset until you know how many days it buys you.
  • Move 2 — Segment. Split the catalog on two axes: how fast it sells, and how unpredictably. Core is fast and steady — forecast it tightly, hold real safety stock, never go dark. Swing is fast and volatile — buy short, reorder often, pay for speed over unit price. Tail is slow — no forecast, just a hard cap and a kill date. Most of your SKUs belong in a policy, not a meeting.
  • Move 3 — Predict. Only now does a model earn its keep. Feed it daily units by SKU, the promo calendar, ad spend, launch dates, and lead times — and demand a range, not a number. P50 tells you what to plan for. P90 tells you what to protect against. You order against a service level you chose on purpose, not a single confident-looking integer.
  • Move 4 — Commit. Convert the range into a rule that fires without you: reorder when days of cover drops below lead time plus a buffer, size the order to P90 demand over that window, and cap every purchase order against the cash you actually have. Then rank. When the cap bites, you find out which SKUs you truly believe in.

Count kills the fiction. Segment kills the noise. Predict kills the guess. Commit turns all three into money.

The Stack I Build This On

One table that replaces four spreadsheets

A nightly job pulls Shopify orders and inventory levels plus your open purchase orders into Postgres — Supabase or Cloudflare D1. Daily units by SKU by day, going back as far as you have. This is the boring layer nobody wants to build, and it is the entire reason the rest works.

A buy list that arrives before you do

A scheduled Cloudflare Worker runs the cycle every Monday and posts a ranked reorder list to Slack: SKU, days of cover, recommended quantity, cash required, and one sentence of reasoning. You approve or you override. The decision takes ten minutes because the work already happened.

SQL does the math, the model does the judgment

Velocity, cover, and reorder points are arithmetic — compute them in the database where they are exact and free. Point the model at the exceptions instead: this SKU spiked because of a creator post, that one is decaying and the cap should drop, this supplier has slipped two weeks three times running. Most brands do it backwards and pay a language model to do division.

Where I Learned This

At Bayani Brands, the systems that touch cash get built before the systems that touch growth. Inventory sync, days of cover, a weekly buy list with a ceiling on it. Every scaling problem I have had in ecommerce eventually resolved into the same sentence: the money was real, it was just in the wrong form.

Building Marky AI taught me the other half. When you sell software, the cash cycle collapses to almost nothing — you ship a copy and get paid. Physical inventory is the opposite trade. A slow SKU is a subscription you pay to your own warehouse.

And inside AI Systems Club, this is the system founders skip and then rebuild in a panic. They automate content, ads, and support first, because those are visible. The reorder engine gets built the quarter after a stockout eats a launch.

The Takeaway

Open your store today and answer two questions per SKU: how many days of cover do I have, and what does it cost me to be wrong. If you cannot answer those in under a minute, no forecast is going to save you.

Count this week. Segment next week. The model can wait — it is the easy part.

Revenue is a story you tell. Cash is the only part of it that lets you keep building.

We build these systems — the tables, the buy lists, the caps — with 500+ founders and operators inside AI Systems Club. Come build with us.

Want the full playbook? Join 500+ founders building real AI systems.

Join AI Systems Club