Fair-Share Inventory Allocation Engine: Stop Filling the Wrong Orders First
When stock is short, import your open demand and on-hand supply, let the engine propose how to split scarce inventory across orders by your rules — priority, fair-share proration, oldest-first — and have a planner approve before any allocation is committed.
A logged-in tool where you import open demand and on-hand supply, the engine proposes an allocation across short-stock items by your rules (priority, fair-share proration, oldest-first), a planner reviews and approves the proposal, and only then is it committed and exported as a clean allocation CSV for your ERP.
Before you start
- A Supabase account (free)
- A Vercel account (free)
- A Resend account (free)
- An open-demand export (open order lines) and an on-hand supply export (CSV is fine)
- Your allocation priority rules (customer tiers, order dates)
- Claude Code or any AI coding agent
The problem this kills
When you're short on a popular SKU, the question is never "how much do we have?" It's "who gets it?" And right now that decision is made by whoever happens to run the allocation report first, or by the loudest account manager, or by a tribal spreadsheet only one planner understands. The result: a brand-new walk-in order gets fully filled while your largest contract customer — the one with the penalty clause — sits on backorder, and the order that's been waiting six weeks gets skipped again.
Most teams "allocate" by exporting open orders, eyeballing the on-hand, and hand-typing ship quantities into the ERP under deadline pressure. It's slow, it's inconsistent week to week, and it's impossible to defend when a customer asks "why did they get theirs and I didn't?" Nobody can reconstruct the logic, because the logic lived in someone's head. Worse, a double-run of the same report can commit the same unit twice and oversell stock you don't have.
Allocating scarce inventory is a rules problem, not a gut-feel problem. It deserves a real, governed tool that applies your priority rules the same way every time — and makes a human sign off before anything touches an order.
What you'll build
A simple internal web app for your planning and customer-service teams. You import your open demand (every open order line that wants the short item) and your on-hand supply (what's actually available to promise). You tell the tool your allocation rules — customer tier priority, oldest-order-first, and fair-share proration when you genuinely can't pick a winner.
The engine then proposes, line by line, how much of the scarce stock each order should get: it serves higher-priority tiers first, breaks ties by order date, and when a tier still can't be fully covered it spreads the remaining stock proportionally (fair-share) so no single account is starved. It shows the fill rate per order and per customer, flags the lines left short, and — critically — a planner reviews the whole proposal and approves it before a single allocation is committed. Only then does it produce a clean allocation CSV you can push into your ERP.
What's inside the Implementation Plan
The downloadable plan is a step-by-step file you paste into an AI coding agent. It opens by interviewing you about your business — how you allocate short stock today, what your customer tiers actually are, the real column names and order-line IDs in your demand and supply exports, your typical and peak shortage volumes, your exact priority and fair-share rules, and the messy exceptions (partial-ship rules, minimum order quantities, reserved stock, must-ship contracts). It reads a short tailored spec back to you and waits for your thumbs-up before it builds anything, so the engine matches how your business decides — not a generic template.
From there it walks the agent through the data model, the demand/supply import with duplicate guards, the allocation engine (priority → date → fair-share proration), the planner review screen, the human approval gate, and the allocation CSV export. Every step ends with a ready-to-copy prompt. There's a full "No API yet?" path that uses Google Sheet / CSV imports as the data source and produces a clean export in the exact columns your ERP expects — so you can build and run the whole thing this weekend regardless of what order system you're on.
The governance it includes (this is the point)
This tool decides who gets scarce product, so the controls aren't optional. The plan builds in login so only your team can use it, row-level security so you only ever see your own organization's orders and stock, a complete audit trail of who changed which rule and who approved which allocation, a hard human-approval gate so no proposal is committed until a planner signs off, and duplicate guards keyed on the order line ID so the same line can't be allocated — or oversold — twice across re-runs.
Who it's for
Planners, supply/demand and allocation analysts, ops managers, and CSR leads — anyone who has to divide short stock across competing orders and is tired of doing it by gut feel in a fragile spreadsheet, then defending it after the fact. If you can describe your customer tiers and your "who gets it first" rules, you can build this.
You've got this — start with the plan, paste the first prompt, and answer the interview. You'll have your first defensible allocation proposal on screen before the weekend's out.