Tiered Discount Approval Gate
Build an internal tool that takes a rep's proposed discount, computes the exact approval chain from your policy matrix, routes it to the right people in order, and logs every decision - so deals stop dying in Slack threads and email forwards.
A rep submits a discount request, the system figures out exactly who must approve it, notifies those approvers in order, records every Approve/Reject with comments, and only unlocks the quote once the full required chain has signed off - with a clean audit export.
Before you start
- A free Supabase account
- A free Vercel account
- A free Resend account
- Your discount approval matrix (thresholds and approver chain) - a spreadsheet is fine
- Your approver roster (names and emails)
The problem this kills
A rep wants to close a deal this quarter, so they offer a 22% discount and "flexible" payment terms. Now what? They Slack the manager. The manager forwards it to finance. Finance asks about margin. Nobody knows if a 22% discount even needs VP sign-off, or just the manager. Two days later the thread is buried, the customer has gone quiet, and the deal is slipping.
Meanwhile the deal desk has a beautiful approval matrix in a spreadsheet that nobody actually follows under pressure. Discounts get rubber-stamped because chasing the right approver is too slow. Margin leaks. And when finance asks "who approved this and why?", the answer is a screenshot of a Slack message - if anyone can find it at all.
This tool replaces all of that with one front door: submit the request, the system computes the required chain from your real policy, routes it in order, and refuses to mark anything approved until everyone who must sign off actually has.
What you'll build
A small, login-protected web app for your sales team and approvers:
- A submit screen where a rep enters a discount request: list price, proposed price, the discount it implies, margin, terms, and a quote ID.
- A policy engine that reads your uploaded approval matrix and computes the exact approval chain - based on discount depth, deal size, and product - for this request.
- An approver inbox where each named approver sees the request with full context (margin impact, deal history) and clicks Approve or Reject with a comment.
- Sequential routing that notifies approvers in order; the next person is only asked once the previous one approves. A rejection re-routes back to the rep.
- Reminder emails for approvals that have been sitting too long, so deals stop stalling.
- An unlock signal: once the full required chain approves, the quote is marked approved-to-send, and never before.
- An audit export: a CSV of every request, every decision, every timestamp, every comment.
What's inside the Implementation Plan
The plan is a single markdown file you paste into Claude Code, an AI coding agent. It builds the whole tool with you step by step - you never need to write code yourself.
It opens by interviewing you about your business - your discount tiers, who approves what, how your matrix is laid out, what a quote ID looks like in your CRM, your typical and peak request volume, and your messy exceptions (think founder overrides, partner deals, end-of-quarter rules). It then reflects a short tailored spec back to you for a thumbs-up before it builds anything, so the tool matches how your deal desk actually works - not a generic template.
From there it walks through standing up the database, the policy engine, the submit and approver screens, the email routing and reminders, and the audit export. Every build step ends with a ready-to-paste prompt. There's also a "No API yet?" fallback: load your matrix and requests from a Google Sheet or CSV and export decisions as a clean CSV, so you can run the tool today without wiring into your CRM.
The governance it includes (this is the point)
This isn't a toy form. The plan bakes in the controls a real deal desk needs:
- Login so only your team can submit or approve.
- Row-level security so people only see their own organization's requests.
- A complete audit trail - who submitted, who approved or rejected, with comments and timestamps.
- A hard human-in-the-loop gate: the system computes and routes, but nothing is ever marked approved-to-send until the named approvers actually click Approve. The AI drafts the chain; people decide.
- Duplicate guards: the quote/request ID is the dedupe key, so you can't open a second pending request for the same quote.
Who it's for
Sales ops, deal desks, and revenue teams that have a discount policy on paper but lose deals to slow, untracked approvals - and finance teams tired of asking "who approved this?" with no good answer. If you can fill in a spreadsheet, you can build this.
You've got this - paste the first prompt and let the agent interview you.