Commissions are how the clinic pays for outcomes. a sales rep gets a cut of every package they sold, a provider gets a percentage of every service they delivered, a call-agent gets a fixed fee per consultation that actually shows up. The rules are tunable per tenant, accrual is automatic from invoice/session events, payout rides the existing pay run, and every cent is auditable. This article is the full operational playbook.
Where it lives#
- Settings → Commissions. master switch, defaults, base mode, rule on/off + rate, advanced (reversal, claw-back, splits, pay run, notifications). Every field maps 1:1 to a knob on the engine; see overview for the field-by-field table.
- Accounting → Commissions. each staff member's own rows (pending / approved / paid / reversed).
- Accounting → Commissions. all rows for HR with bulk approve and CSV export.
- Payroll. commissions land on the pay run as a separate earning line per employee.
Who can earn commission#
- Sales consultants. seller on the invoice. rule fires on invoice paid.
- Providers (doctors, nurses, therapists). through service lines or consultation sessions they deliver.
- Call-agents / consultants. agent on a session (arrived-consultation and paid-consultation rules).
- Team supervisors. resolved from team membership. each rule has a supervisor variant that mirrors the agent variant at a different rate.
Rate resolution — what wins when#
Per line, the rate is picked in this order; first match wins.
- Per-staff override. Employee compensation's custom commission rate.
- Per-product rate. The catalog product/service's own rate.
- Policy default. Service items use default service %; product items use default product %.
- Zero. If none resolves, no row is written.
The override may be bound to the rule's tier band — see the per-staff override bounds toggle.
The rule catalog#
Each row in Settings → Commissions → Who earns commission is one of these. Each rule has its own enable toggle and a fixed-rate field (tiered rules are edited in the advanced view).
Earn rules — who gets paid#
- Earn on each new invoice. fires when an invoice is paid and the patient carries the new-patient tag. agent and supervisor variants.
- Earn on upsell invoice. fires when the invoice is flagged as upsell. agent and supervisor variants.
- Arrived consultation (≥50% arrival rate). agent + supervisor. higher reward when the agent's arrival rate that day was 50% or above.
- Arrived consultation (low arrival rate). agent + supervisor. smaller per-session reward when arrival rate was under 50%.
- Paid consultation. agent + supervisor. fires per paid consultation session.
- Membership-paid services. when the line is paid via a membership discount, this rule decides whether commission still accrues.
Deduct rules — adjusting the base before the rate applies#
- Deduct cashback. Subtract any cashback applied to the line.
- Deduct discounts. Subtract invoice + membership discounts.
- Deduct taxes. Subtract the tax portion.
- Deduct service cost. Subtract the line's product cost when the item is a service.
- Deduct product cost. Same idea for retail product lines.
Gate rules#
- Apply only on fully paid invoices. Skip commission until the invoice's status is paid (not partial).
Agent vs supervisor — automatic detection#
You don't pick agent vs supervisor on a row. the engine resolves them at trigger time:
- Agent. invoice.seller (or invoice.consultant fallback) for invoice rules; session.created_by for session rules.
- Supervisor. the team manager of the agent's team, set in Business → Teams with role=manager.
If the agent has no team or no manager, the supervisor variant doesn't fire — the agent variant still does.
Accrual timing — when rows are written#
On invoice paid (the standard for sales rules)#
- An
InvoicePaidevent triggers the engine. - The engine resolves seller + supervisor, runs each enabled invoice rule, and bulk-creates rows.
- Each row carries the rule type that produced it. duplicate rows for the same line + person + rule type are ignored.
On session arrived / paid (the standard for consultation rules)#
- A scheduled job walks arrived and paid sessions per branch per date.
- It computes arrival rate per agent, picks the right rule variant (≥50% vs low), and bulk-creates rows.
- Sessions in follow-up status are skipped.
Auto-approval#
- If the policy's Auto-approve below amount is non-zero, newly created rows at or below that amount approve themselves immediately. otherwise rows land at pending for HR review.
Dispute and adjustment#
- The rep flags a missing or wrong row from Accounting → Commissions.
- HR reviews. was the rep tagged as seller? was the session attributed to the right agent? was the rate resolved correctly?
- Use the permitted amount-override action on an eligible pending, pending-payment, or approved row and provide a reason. Commission rows are system-generated; the ledger has no manual-create form.
- Common disputes: rep not tagged on the invoice (data entry mistake), session attributed to whoever was free at reception (not the actual deliverer), package transferred between patients without re-attribution.
The payout cycle#
The flow#
- Period close. Agree the pay-run cutoff with finance; the commission ledger does not provide a separate period-close workflow.
- Review. HR runs reports and walks the pending list. reps raise disputes; HR adjusts.
- Freeze. Review eligible rows and approvals before the pay run. A separate commission-period freeze action is not supplied by the ledger.
- Pay run. Commissions land on the pay run as a separate earning line per employee. once the run posts, status flips to paid.
The exact day-of-month is your operational choice — the engine is policy-driven, not calendar-driven.
Pay run options the policy controls#
- Include pending in pay run. off by default. when on, pending rows are paid alongside approved ones.
- Allow negative net pay run. off by default. when off, a claw-back that would make a pay run line go negative carries forward to the next period instead.
Contractor providers#
- Contractors (non-employees) are paid via vendor payment, not payroll. tax treatment differs; the accountant confirms each contractor's category at onboarding.
Claw-back rules#
- Refunds, voids, deletes, and cancelled / missed sessions create reversal rows for affected commissions.
- For already-paid rows, the policy's claw-back mode (adjustment / block / ignore) decides the outcome — see the reversal and payout article for the full state table.
- Resignation. any unpaid accrued commission is paid in the final pay run. future claw-back is forfeited (the rep is gone, no recovery).
Accounting treatment#
- By default, commission expense lands on the books through payroll.
- Tenants can opt in to GL auto-post on approval. when on, an approved Commission posts Dr Commission Expense, Cr Commission Payable on the calculation date. The payroll posting then handles the cash leg without double-counting.
- Reversal commissions post the inverse JE only if the original was posted. otherwise the reversal is a row-only adjustment.
- Visible on the income statement under Sales expense or Compensation expense per the chart of accounts.
Reports#
- Per-rep monthly. who earned what, broken down by source.
- Top earners. ranked list, useful for recognition.
- Refund-driven claw-back. refunds that triggered negative accrual, by reason.
- Outstanding accrual. liability balance, what's approved but not yet paid.
- CSV export. one row per commission with salesperson, amount, status, source, calculation date, rule type. Same filters as the list endpoint.
Who sees what#
- Rep. own rows, own payslip commission line.
- Manager. team rows. can adjust; cannot change rules.
- Owner / HR head. full view, edits rules, freezes periods, sets per-staff overrides.
- Accountant. ledger view, expense and liability lines. cannot edit rules or accruals.
- Finance approval. bulk update to approved requires this permission.
Common mistakes#
- Designing rules verbally, not in the system. Disputes have nothing to anchor against. document every rate change in Settings with effective date.
- Forgetting the new-patient tag. The new-invoice rule won't fire — first invoice for a new patient quietly skips commission.
- Forgetting to tag the seller on the invoice. No rep gets commission; the dispute happens at payout. Default to the logged-in user, allow correction.
- Switching base mode mid-period. Existing rows aren't recomputed. switch at period boundaries with a clear note.
- Adjusting accruals after the pay run. Reopens a closed period and breaks audit. Adjust in the next period instead.
- Paying contractors via payroll. They're not employees; they should invoice as vendors. wrong tax treatment otherwise.
- Turning the master switch off as a debugging shortcut. It silently strips commission from every active sale for the tenant. use a per-rule toggle instead.
How commissions connect to the rest of the system#
- Sales. every invoice carries seller + consultant tags; drives invoice-based accrual.
- Booking sessions. created_by is the agent; the scheduled job builds session-based accrual.
- Refunds + voids + deletes. typed events trigger reversal.
- Payroll. payout vehicle for employees.
- Vendors + AP. payout vehicle for contractors.
- Accounting. commission expense + payable lines on the GL.
- HR + Business teams. employee compensation owns per-staff overrides; team membership decides supervisor.
- Reports. per-rep + per-service performance.
Related#
- Commissions overview. start here; the field-by-field map of the Settings page lives in this article.
- Commission reversal and payout. the full lifecycle from accrual to claw-back to GL posting.
- Payroll. the payout vehicle.
- Accounting cycle. accrual liability at month-end.
- Refunds and credit notes. source of claw-back.
