Out-of-Stock Substitution Suggester: Stop Letting Stockouts Kill the Sale
When an ordered item is out of stock, this tool suggests only your pre-approved, in-stock substitutes, records the rep and customer go-ahead, and swaps the order line — so an out-of-stock turns into a saved sale instead of a lost one.
A web tool where a CSR pastes or imports an out-of-stock order line, sees only the in-stock, pre-approved substitutes for that item, records the rep and customer approval, and then swaps the line on the order — with every suggestion and go-ahead logged.
Before you start
- A Supabase account (free)
- A Vercel account (free)
- A Resend account (free)
- A substitution-rules CSV (approved equivalents)
- A current stock CSV (or Google Sheet export)
- Claude Code or any AI coding agent
The problem this kills
A customer wants item A, item A is out of stock, and right now your rep's best options are all bad: put it on backorder (and watch the customer cancel and buy it elsewhere), guess at "something similar" from memory, or just say "sorry, we don't have it." Every one of those is a sale slipping out the door, and the guess-from-memory version is worse than the stockout — it ships the customer the wrong thing and turns a near-miss into a return.
The fix isn't more product knowledge crammed into one CSR's head. The fix is a tool that knows your approved equivalents — the substitutes your product team already blessed — checks which of them are actually in stock right now, and shows the rep only those. Then it makes the rep do the one thing that protects you: get the customer's go-ahead on record before swapping the line. You don't need a developer to build this. You can build it this afternoon.
What you'll build
A simple internal web tool. You import two things: a substitution-rules CSV (for each item, the equivalents your team has approved, in priority order) and a stock CSV (what's on hand right now). A CSR enters an out-of-stock order line — the order number, the SKU the customer wanted, and the quantity. The tool looks up the approved equivalents for that SKU, filters to the ones with enough stock to cover the order, and presents the rep a short ranked list of in-stock, pre-approved substitutes — never a guess. The rep picks one, records who approved the swap (the rep's call, or an explicit customer yes), and confirms. Only then does the tool write the substituted line back to the order and log the whole exchange: what was out, what was offered, what was chosen, who approved it, and when.
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 your reps handle stockouts today, what system your orders and SKUs live in, exactly how your substitution-rules and stock files are laid out and named, your typical and peak order volumes, who's allowed to approve a swap, and your messy edge cases (partial coverage, price differences, multi-line orders) — and then it tailors the data model, the suggestion logic, and every later step to your answers. This is not a generic template; the agent reads a short spec back to you and waits for your thumbs-up before it builds anything. From there it walks the agent through importing the rules and stock, the lookup-and-rank suggestion engine, the rep approval screen, the line-swap write-back, and the optional confirmation email — each step with a ready-to-copy prompt. There's also a fallback so you can build and run the whole thing today even with no live connection to your order system.
The governance it includes (this is the point)
This is tooling that touches real orders, so it ships with the controls a fulfillment team needs: login so only your team can use it, row-level security so each rep only ever sees their own organization's orders and rules, a complete audit trail of which substitute was offered, chosen, and approved (and by whom), and a hard human-in-the-loop gate so no substitution is written to the order until a rep records the go-ahead. The engine only ever offers your pre-approved equivalents — never an AI guess — and a duplicate guard keyed on the order line plus the substitute SKU means the same swap can't be applied twice.
Who it's for
Customer service reps and inside sales teams who lose otherwise-good orders to "out of stock," and the ops leads who want those saves to happen the same way every time, on approved products, with a record. If you can describe how your team decides on a substitute today, you can build this.
You've got this — start with the plan, paste the first prompt, answer the interview, and you'll see your first in-stock substitute suggestion pop up the same afternoon.