Refund vs Replacement Decision Helper
Recommend the right remedy - refund, replacement, repair, or store credit - for every approved return, with a clear cost rationale and a human approval gate before anything is committed.
A private internal tool that takes approved returns, recommends a cost-aware remedy with rationale, routes it to a lead for approval or override, and exports the committed decision for your ERP or refund tool - with a full audit trail.
Before you start
- A list of approved returns/claims (Google Sheet or CSV) with item value, reason, stock status, and customer history
- Free accounts for Vercel, Supabase, and Resend (all have free tiers)
- Claude Code installed on your machine
The problem this kills
A return gets approved - now what? One agent refunds the full price on a $12 item that's back in stock. Another ships a replacement on something you can't restock, when a small credit would have kept the customer happy for half the cost. A third refunds $400 without a manager ever seeing it. Every remedy decision is a judgment call made under time pressure, and the results are all over the map: inconsistent for customers, expensive for you, and impossible to audit later.
The remedy choice should be the easy part. It's mostly rules - item value, whether you can restock, the reason for the return, how good a customer this is, and who's allowed to approve what. This tool encodes those rules, lets AI draft the recommendation with a plain-English cost rationale, and puts a human in charge of the final call.
What you'll build
A small, private web app your returns team logs into. It loads your approved returns/claims, and for each one it recommends a remedy - refund, replacement, repair, or store credit - with the dollar logic spelled out: item value, restock status, return reason, and customer history. A lead reviews each recommendation, approves it or overrides it with a reason, and only then is the decision committed. The committed remedies export as a clean CSV in exactly the columns your ERP or refund tool expects.
What's inside the Implementation Plan
The plan is a single file you paste into Claude Code. The first thing it does is interview you about your business - your return reasons, your value thresholds, who can approve what, how you check stock, and your messy edge cases - then it reflects a short tailored spec back to you for a thumbs-up. Nothing gets built until the tool fits how you actually run returns, not a generic template.
From there it walks you, one copy-paste prompt at a time, through standing up the database, the login, the import, the rules-plus-AI recommendation engine, the lead approval screen, the export, and the audit trail. Each step ends with a ready-to-paste prompt - you don't write code, you direct it.
The governance it includes (this is the point)
- Login so only your team can open the tool.
- Row-level security so people only ever see their own organization's data.
- A human approval gate - the AI drafts a remedy, a lead reviews the cost rationale and approves or overrides, and only an approved decision is ever committed.
- Authority limits - refunds over your chosen dollar amount require a manager, encoded from your interview answers.
- A duplicate guard keyed on RMA/claim ID, so the same case can never be processed twice.
- A complete audit trail - who recommended, who approved or overrode, what changed, and when.
Who it's for
Returns leads and operations people who are constantly balancing customer goodwill against cost, and who want remedy decisions to be consistent, defensible, and cheap to audit - without waiting on a developer or buying another SaaS seat.
You've got this - paste the first prompt and let the interview tailor the rest.