Sales Compensation
112%
Your attainment
38,400
Commission this period
2
Lines you have queried
Frozen
Q2, paid 14 July
Marginal tiers: the 9% applies only to attainment above 100%, not to everything. Whether a plan is marginal or whole-amount is the single most common source of disputes.
What matters here
- A commission calculator is four parts: versioned plan rules, qualifying transactions, a calculation that records its working, and a readable statement.
- Explainability is the requirement, not the feature. Every figure needs a line-by-line derivation a rep can follow without asking.
- Version the plan with effective dates. Recalculating an old period against a new plan is the fastest way to lose trust in the whole system.
- Clawbacks, splits and ramps are where real plans live. A calculator that only handles a flat rate on closed won will not survive its first month.
- Freeze a period once it is paid. Later corrections belong in the next period as an adjustment with a reason, never as a silent rewrite.
- A commission calculator decides what people are paid, so scoped access, managed credentials and a named owner are part of the build.
Who this is for
You run sales compensation, revenue operations or finance. You already know your plans. What you want is a calculation you can defend line by line, and a month end that does not disappear into reconciling a spreadsheet.
How it works in practice
What happens between a deal closing and someone getting paid, and why the working matters more than the total.
- 1
The plan is a version, not a document
Rates, tiers, caps and ramp, with the dates each version applies to. Changing a plan makes a new version and leaves old periods alone.
- 2
Deals qualify, and the reason is recorded
Which transactions count for this period, on which date, under which rule. Splits are apportioned and validated to 100 percent.
- 3
The calculation writes down its own working
Per deal: the plan version, the tier, the rate, the split, the arithmetic, and the amount. The total is just the last line.
- 4
A rep reads a statement, not a number
Attainment, every qualifying deal with its commission line, adjustments with reasons, and the period total.
- 5
Disputes happen on a line, not in an email
A rep queries a specific line, it routes to the plan administrator, and the resolution is recorded against it.
- 6
The period freezes on approval
Later corrections become adjustments in the next period. Nothing silently rewrites a period somebody has already been paid for.
What a commission calculator is made of
A commission calculator is not a rate multiplied by revenue. It is four parts, and the third is the one that decides how much of your month end it consumes.
Versioned plan rules
Each plan as data: base rate, accelerators and their thresholds, caps, quota period, split rules, ramp treatment, clawback conditions, and the dates the version applies to.
Qualifying transactions
What counts: closed won deals, bookings, recognized revenue or cash collected, depending on the plan. With the qualification date and the rule that decided it recorded on each row.
A calculation with its working
Not a total. Per transaction: which plan version applied, which tier the attainment fell in, what rate was used, what was multiplied by what, and the resulting amount.
A statement
What the rep sees: attainment against quota, every qualifying transaction, the commission on each, adjustments with reasons, and the period total. Readable without a phone call.
The prompts
Paste these into Claude Code, Codex or Cursor in order. Each one leaves you with something that runs, so you can stop after any step.
These prompts start from a Helix project, which is what handles sign-in, credentials and hosting. Start with Helix.
The plan, versioned properly
Getting the thing everyone argues about into a shape you can reproduce.
Create a Helix app: a commission calculator.
Start with plans, and get one detail right that causes more disputes than anything else. For each tier, I need to say whether the rate applies only to the portion of attainment inside that band, or to the whole amount once that band is reached. Both models exist in real plans and confusing them is the classic commission bug. Make it an explicit choice per tier.
A plan has an effective-from date, a quota period, a base rate, its tiers, and any cap. Never edit a published plan version. Editing creates a new version, and old periods keep pointing at the version they were calculated under.
Then assign reps to plans with a quota, a start date and a ramp. And give me a preview: type an attainment figure and show me what it would pay and why.
What counts, before what it pays
Qualification, splits and clawbacks, which is where real plans live.
Now decide what actually counts.
Load transactions with their booking, close, recognition and cash dates, and let the plan say which event and which date qualifies a deal for a period. Record on every row which rule qualified it and on what date.
Handle splits: a deal apportioned across several reps by percentage, with the total validated to 100.
And handle clawbacks properly. If a qualified deal is later canceled or refunded, create a negative adjustment in the current open period. Do not go back and edit the closed period. That period was correct given what was known at the time, and it needs to stay that way or nobody can reconcile a payment against a statement.
Show the working
The requirement people underestimate, and the one that decides your month end.
Now calculate, and treat the working as the output rather than the total.
For each rep and period, store a line per step. Attainment, with ramp applied and shown as its own line. Then for each deal: the plan version used, the tier the attainment fell in, the rate, the split, the calculation performed, and the resulting amount. Then adjustments, clawbacks, draws and guarantees, each with a reason and an approver.
The period total is derived from those lines and never entered directly.
Store the derivation as rows rather than computing it on demand. That is what lets me answer a question about a period six months after the plan changed, which is exactly when it gets asked.
Statements, disputes, and closing the period
Making it trustworthy enough that people stop rebuilding it in a spreadsheet.
Give each rep a statement: attainment against quota, every qualifying deal with its commission line, adjustments with reasons, and the total. Downloadable, and readable without an explanation.
Let them query a specific line rather than emailing about the total. The query routes to the plan administrator and the resolution is recorded against that line.
Add a review step before payment showing period totals by team, the largest payouts, and anything that changed since the last run. Then freeze the period on approval. After that, corrections become adjustments in the next open period, with a reason, never a silent rewrite.
Finally, an export for payroll, and a record of what was exported and when.
Connect it to real systems
The step that turns a working prototype into something with your data in it.
Now connect it to the systems we actually run, so it works on real data rather than the rows you seeded.
Anything in angle brackets is a placeholder. Swap it for whatever we use instead, and have the app name the connection it wants rather than assume a vendor, so changing my mind later is a config change and not a rewrite.
<Salesforce>. Read closed deals with their amounts, dates and splits, which is what qualifies a transaction.
<NetSuite>. Check invoices and cash received, if your plan pays on collection rather than closure.
<Workday>. Read plan assignments and quotas, and export the approved period for payment.
<Gmail>. Send each rep their statement, so a dispute happens on a line rather than in a thread.
<Snowflake>. Read closed bookings from the warehouse, where the CRM data has already been cleaned up.
<Gusto>. Export the approved period to payroll, and record exactly what was sent and when.
<Okta>. Authenticate reps and read the manager relationship, which is what lets the app show a statement to its owner and their manager and nobody else.
Only write where I have said to write. Everything else is read only.
Ship it
The last step of every build: a URL, and the right people on it.
Deploy my app.
What it connects to
This app decides what people get paid, so what it reads and what it writes both matter more than usual.
-
Salesforce Read closed deals with their amounts, dates and splits, which is what qualifies a transaction. Reads
-
NetSuite Check invoices and cash received, if your plan pays on collection rather than closure. Reads -
Workday Read plan assignments and quotas, and export the approved period for payment. Reads and writes -
Gmail Send each rep their statement, so a dispute happens on a line rather than in a thread. Writes
-
Snowflake Read closed bookings from the warehouse, where the CRM data has already been cleaned up. Reads -
Gusto Export the approved period to payroll, and record exactly what was sent and when. Writes -
Okta Authenticate reps and read the manager relationship, which is what lets the app show a statement to its owner and their manager and nobody else. Reads
Named systems are the ones most teams actually run, not a list of the only ones that work. Swap in whatever you use.
Running it for real
The build gets you a working calculator. It decides what people are paid, holds compensation data, and reads from your CRM and finance systems, so how it is run is part of the design.
- 1
Get it to a URL people can open
One command takes the app from your assistant to a live address, so the people who need it get a link rather than instructions for running it locally.
- 2
Put your identity provider in front of it
Compensation is among the most sensitive data in a company. SSO means people sign in with their existing account, and access is scoped so a rep sees only their own statement.
- 3
Connect the system of record with managed credentials
Pulling closed deals and pushing payroll exports needs real access to those systems. Granting it to the app rather than pasting keys into it means credentials can be rotated or revoked without a redeploy.
- 4
Put a name on it
Every app carries a named owner and an entry IT can see, so the tool does not become nobody's problem when the person who built it changes role.
- 5
Know what it costs to run
Per-app spend visibility, so an internal tool cannot quietly become a line item nobody can explain.
Do this as a workflow instead
An app is only as good as the data in it. These build the integrations and automations that keep this one current, on the Tray platform. Same kind of guide, same kind of prompts.