Commission Calculator & Approval
Build an internal tool that turns your commission plan - rates, tiers, accelerators, quotas, splits, draws, and clawbacks - and your actual sales into per-rep statements, routes them for rep, manager, and finance sign-off, and exports a payroll file plus the GL accrual - so commissions stop living in a fragile spreadsheet.
A login-protected commission tool: import sales and your plan rules, compute commission per rep with tiers, accelerators, splits, draws, and clawbacks, generate a statement each rep reviews, get manager and finance approval, handle disputes and adjustments, and export a payroll payout CSV plus a commission-accrual entry for the GL - with a hard rule that nothing reaches payroll without the required sign-offs, and a full audit trail.
Before you start
- A free Vercel account
- A free Supabase account
- A free Resend account (and a sender address you can use)
- A sales/bookings CSV (deal ID, rep, amount, close date)
- Your commission plan rules (rates, tiers, quotas, splits, draws, clawbacks)
- A rep assignment / territory sheet
The problem this kills
It's the third business day of the month and the commission spreadsheet is open again. Somewhere in there is a VLOOKUP that breaks when a rep's name is spelled two ways. A deal got split 60/40 between two reps but the formula only paid one. Someone hit the accelerator tier - or did they? The quota cell points at last quarter's number. A deal that closed last month just got refunded, so there's a clawback to claw back, except it was already paid. And a rep just emailed: "My statement is wrong, you forgot the renewal."
Commissions are some of the most emotionally charged numbers in the company - people plan their lives around them - and in most ops/finance teams they're computed in a spreadsheet that one person understands and nobody can audit. Tiers and splits are done by hand. Draws and clawbacks get tracked in a side tab. Disputes happen over email. And when the rep, the sales manager, and finance all need to sign off before payroll runs, that "approval" is three replies in a thread.
This tool replaces the fragile spreadsheet with a real calculator and an enforced approval flow - and a clean record of exactly how every number was reached.
What you'll build
A small internal web app, just for your team, that:
- Imports a sales/bookings CSV (deal ID, rep, amount, product, close date) and your rep assignments.
- Reads your commission plan - base rates, tiers and accelerators, quotas, splits between reps, draws (advances to recover), and clawbacks (on refunds/cancellations) - and computes the commission per rep, showing the math.
- Dedupes on deal ID so the same deal can't be paid twice.
- Generates a clean commission statement for each rep: their deals, the rate/tier applied, splits, draw recovery, clawbacks, and the net payout.
- Routes each statement for sign-off: the rep reviews their own statement, then the sales manager and finance approve - before any amount moves toward payroll.
- Handles disputes and adjustments: a rep can flag a line, an adjustment is recorded with a reason, and the statement re-computes - with the change logged.
- Exports a payroll payout CSV in the exact columns your payroll system wants, plus a commission-accrual journal entry for the GL.
What's inside the Implementation Plan
The plan is a single markdown file you paste into Claude Code (a free AI coding agent). It walks the agent through building the whole tool, step by step, each step ending with a ready-to-paste prompt.
The most important part: the plan opens by interviewing you about your business. Before it writes a single line, the agent asks how you run commissions today, the exact mechanics of your plan (rates, the tier table, what resets quota, how splits are decided, how draws recover, when a clawback triggers), the real field names in your sales export, your typical and peak deal volumes, who signs off in what order, and your messiest edge cases (mid-period plan changes, a deal split three ways, a refund on an already-paid deal, a rep who left mid-quarter). It reads a short tailored spec back to you, you confirm it, and only then does it build - so you get a calculator shaped to your comp plan, not a generic template you have to bend to fit.
Inside you'll find:
- The discovery interview and how the agent turns your answers into the commission engine and data model.
- The full build: database, login, CSV import with duplicate guards, the calculation engine (tiers, accelerators, splits, draws, clawbacks), per-rep statements, the rep -> manager -> finance approval flow, and disputes/adjustments.
- The hard human approval gate and the multi-party sign-off logic.
- Verification steps so you can prove the math, and the CSV-export fallback (payroll file + GL accrual) so it's fully usable even before you connect it to payroll or your accounting system.
The governance it includes (this is the point)
This isn't a toy. The plan builds in the controls a finance team actually needs:
- Login so only your team can see or touch anything.
- Row-level security so people only see their own organization's data - and reps only see their own statement.
- A complete audit trail - every import, calculation, adjustment, dispute, approval, and export is logged with who and when, so you can always show how a number was reached.
- A hard human-in-the-loop gate - the AI computes and drafts the statements, but the rep, the manager, and finance must review and approve; nothing reaches payroll automatically.
- Required sign-offs enforced in code - a statement physically cannot be exported to payroll without its rep, manager, and finance approvals.
- Duplicate guards so the same deal ID can't be counted or paid twice.
Who it's for
Finance, sales-ops, and comp-admin staff who compute commissions in an error-prone spreadsheet every month and dread the disputes, the clawbacks, and the audit questions. If you want a real, auditable commission calculator with a proper approval flow - without hiring a developer or buying a heavyweight incentive-compensation platform - this is for you. You don't need to write code. You need your sales CSV, your commission plan, and an afternoon-to-a-weekend.
You've got this - paste the first prompt and let the agent interview you.