Calculate sales team incentives
ERPNext calculates an incentive for each sales person in the Sales Team table of a sales document. The calculation uses the person's contribution and commission rate. ERPNext records the amount, but it does not pay it.
Prerequisites
- Enable tracking sales commissions is selected in Selling Settings.
- Each sales person has a Commission Rate.
- A written incentive policy: which document earns the incentive (order or invoice), and how returns and cancellations count. Use one document type, so that one sale is not rewarded twice.
Calculate the incentive
- Open the sales document and find the Sales Team table.
- Add each sales person and their Contribution (%). ERPNext fetches the Commission Rate from the sales person.
- Save. ERPNext fills Contribution to Net Total and Incentives on each row.
- Check the amounts, then submit.
ERPNext uses these formulas:
- Contribution to Net Total = Net Total × Contribution (%) ÷ 100
- Incentives = Contribution to Net Total × Commission Rate ÷ 100
| Sales Person | Contribution | Contribution to Net Total | Commission Rate | Incentives |
|---|---|---|---|---|
| Alex Morgan | 60% | 2,498.40 | 2.5% | 62.46 |
| Jordan Lee | 40% | 1,665.60 | 2% | 33.31 |
The example uses a Net Total of 4,164. The total incentive is 95.77.
Pay the incentive
The Incentives amount has no effect on the ledger or on payroll. To pay it:
- Review the incentives of submitted documents for the period, for example with the Sales Person Commission Summary report.
- Adjust for returns and cancellations, according to your policy.
- Approve the amounts.
- Pay them through payroll, for example with an Additional Salary in Frappe HR, or through your accounting process.
When you need custom logic
The standard calculation is a fixed rate on the credited Net Total. Rules such as tiered rates, rates on gross profit, incentives only after payment, caps, or clawbacks need a customization. Build it on the server, with tests, so that imports and integrations cannot skip it.
Troubleshooting
| Problem | Cause and fix |
|---|---|
| Commission Rate is 0 | The sales person has no rate. Set it, then add the row again. |
| The contribution looks wrong | Contribution uses the Net Total, after discounts and before taxes. |
| Incentives did not update | Save the document after you change the team or the rates. |