Skip to content
P4 Software P4 Software / cifraHQ

Add these docs to Claude

Ask Claude questions about these docs. Claude reads the published pages and links you back to them. Copy this address:

https://p4-software.opendocs.page/mcp

In claude.ai or Claude Desktop: open Settings, then Connectors, choose Add custom connector and paste the address.

In Claude Code, run:

claude mcp add --transport http docs https://p4-software.opendocs.page/mcp

Commission Rules

Commission Rules

Commission rules tell CifraHQ exactly how much each salesperson earns when an invoice is posted - by product, customer, product group, or customer group. Once configured, commissions are tracked automatically: no spreadsheets, no manual tallying. Every posted invoice updates the salesperson's running balance.

Where to find it

Go to Master Data > Sales > Commission Rules.

Commission Rules list page in CifraHQ.

Commission Rules list, how salespeople earn commissions on sales.

How to create a Commission Rule

  1. Click New. The rule gets its Code (CR-...) when you save it; you do not type one.
  2. Optionally type a Description, the name you will recognise the rule by (for example "Dog food to wholesale Customers").
  3. Answer three questions. Each one is a single choice, and only the field that belongs to your choice appears, so a rule cannot contradict itself:
    • 1. Who earns the commission? - Anyone, or One salesperson (a CifraHQ user).
    • 2. Which Products? - exactly one of All Products, One product, Subcategory, Category or A product group. Picking a subcategory also stores its category.
    • 3. Which Customers? - Everyone, One customer or A customer group.
  4. Enter the Commission %, from 0 to 100 - the percentage of the invoice line amount the salesperson earns. A rule at 0% is allowed on purpose: when it is the most specific rule that fits a sale, nothing is paid, and it stops broader rules from paying for those sales.
  5. Set Starts and Ends if the rule is time-limited (e.g., a promotional spiff). Both are dates in your company's time zone and both days are included: a rule that Ends on 31 December still applies through the whole of 31 December. The rule is judged on the day the invoice (or the final payment) is posted. The End date cannot be before the Start date (the same day for both is fine): if it is, Save stays off and the reason is written next to it.
  6. Read the This rule says box, which writes the rule out in plain words, then click Save.

Save stays off until every question is answered, and the reason is written next to the button. The salesperson, Products and Customers choices are independent: a rule may combine one salesperson with one product and one customer.

Rules saved before the new dialog

Older rules could name two ways of choosing Products (for example a product and a product group) or both a customer and a customer group. Such a rule can silently never match. When you open one, the dialog shows a yellow notice and the unanswered question with nothing chosen; it also lists what is saved. Nothing is lost until you choose one option and save: you can try each option first. A subcategory saved together with its own category is not a problem and opens normally. The same combinations are refused when a rule is saved, with a message saying what to clear.

Rules saved before 15 November 2026 under the old convention (End = the day after the last selling day) now also apply on that End day: review them and move the End date back one day if needed.

An existing rule whose End date is before its Start date still appears in the list and still opens, but no change can be saved until one of the dates is fixed: the dialog shows the reason next to Save, and the API refuses the rule too. This does not open the amber message, which is only for a question that names both sides.

How commissions accrue

For each invoice line, CifraHQ picks one rule: the most specific active rule that matches the sale. Rates are never added together. A rule beats another at the first of these fields that one sets and the other does not: Sales Person, Product, Subcategory, Category, Product Group, Customer, Customer Group. For example, a rule for one product beats a rule for its subcategory, which beats a rule for its category. If two rules are equally specific, the one with the higher code wins.

The commission is added to the salesperson's Commissions Balance whenever a commission event fires. The event that triggers accrual is controlled by the Commission Calculation setting in Settings > Business Configuration > Business Operations > Sales.

Setting When commissions are credited
Invoice Paid (default) When a payment is posted against the invoice. Commissions accrue only on collected revenue.
Invoice Posted When the invoice is posted. Commissions accrue immediately regardless of whether the customer has paid.

Choose Invoice Paid when you want to ensure salespersons earn only on cash that has actually been collected. Choose Invoice Posted when your business practice is to recognize the sale at the time of invoicing.

After switching from Invoice Paid to Invoice Posted, bring the commission of Invoices posted before the switch up to date from the Invoices list (see Invoices).

Credit notes and credit reduce commission

  • A credit note always reduces the commission of the invoice it credits.

    • Posted after the commission was earned, it takes back its share.
    • With Invoice Paid, a credit note posted before the invoice is paid reduces what the payment earns.
    • A fully credited invoice earns nothing.
  • Credit from a credit note or credit memo never earns commission when it pays an invoice. Money from a customer deposit (prepayment) does.

    Example: a 1,000 invoice with a 200 credit note, paid with that 200 of credit and 800 of bank money, earns commission on 800.

    For a customer who has made deposits, CifraHQ cannot yet tell deposit credit from Returns credit. Credit payments for those Customers still earn as before.

A second setting in the same place, Commission Sales Person Source, decides who earns the commission and how it is listed:

Setting Who earns it Listed by
SalesOrder (default) The salesperson on the sales order Sales order
Invoice The salesperson on the invoice; if the invoice has none, the sales order's Invoice

Every invoice carries its sales order's salesperson, and an administrator can add a missing one on a posted invoice, so with Invoice the Commissions tab shows each commission next to the invoice that earned it.

Every accrual writes a Commission Transaction row - a ledger entry showing the date, the reference (the sales order line or the invoice line, by the setting above), the percentage applied, and the running balance after the entry. Click Open full ledger on the Commissions tab to see the complete transaction history.

Paying out commissions

CifraHQ provides two payout paths depending on whether the salesperson is enrolled in Payroll:

Path 1 - Employee enrolled in Payroll (recommended)

If the salesperson is also an employee with an active Payroll contract, pay their commissions through the Payroll run so that CSS, ISR, and Decimo benefit bases are calculated correctly:

  1. Open the Payroll run for the relevant period (Payroll > Periods > [Period] > Run).
  2. Click Import Commissions in the run header.
  3. CifraHQ shows all salesperson-Employees with open commission balances. Select the ones to include.
  4. Click Import N lines. CifraHQ creates a COMMISSION concept line for each selected employee and zeros their balance.
  5. Run Calculate as normal - the engine adds the commission to the cotizable salary base for CSS, ISR, Decimo, and other benefit calculations.

The Import Commissions dialog is only available on draft runs. Once a period is closed, balances can no longer be imported into it.

Path 2 - Contractor or non-Payroll salesperson

If the salesperson is not enrolled in Payroll (independent contractor, commission-only rep):

  1. Go to Settings > Users > [Salesperson] > Commissions tab.
  2. Click Pay.
  3. Enter the amount and select the bank account to pay from.
  4. Save. CifraHQ creates an Expense entry and reduces the salesperson's balance by the paid amount.

The Pay button uses the Commission Payable account configured in Account Priming. Make sure this account is mapped before making your first payment.

Viewing the transaction ledger

Every accrual, payment, reassignment, and Payroll import is recorded in the salesperson's commission ledger. To view it:

  • From the user detail: go to Settings > Users > [Salesperson] > Commissions tab and scroll to the Transactions section, or click Open full ledger for the standalone page.
  • From the standalone page: navigate directly to /settings/Users/{id}/transactions.

Each row shows: Date, Reference type (SalesOrderLine, Expense, Reassign, Payroll), Reference link (clickable to the source document), Amount, Running Balance, and Comments.

Reassigning commission balances

If a salesperson leaves or transfers their accounts to another rep, you can move their open balance to the new rep:

  1. Go to Settings > Users > [Salesperson] > Commissions tab.
  2. Click Reassign.
  3. Select the target salesperson from the dropdown.
  4. Optionally check Also reassign open commission rules to move active (unexpired) rules to the new rep as well.
  5. Save. CifraHQ writes two ledger entries - one debit on the source, one credit on the target - and updates both balances atomically.

Tips

  • Salespeople are assigned to Customers on the Customer detail page. When that customer's Invoices post, CifraHQ automatically looks up commission rules for the assigned salesperson - no manual step required.
  • One salesperson can have multiple rules (e.g., 5% on a category, 8% on one premium product in that category). Only the most specific rule wins on each line, so the premium product pays 8%, not 13%.
  • Use date-limited rules to run time-bound incentives - promotional rates for a specific product line during a campaign period - without having to manually adjust rates afterwards.
  • A salesperson's current balance appears in the Balance column on the Users list page (/settings/Users) and on their user detail page at a glance.
  • If you create or change rules through the API, send Start and End as plain dates (yyyy-MM-dd, for example 2026-12-31). A value with a time zone offset is converted to the server's time before it is stored and can land on the next day.

Related: Customers · Users · Price Rules · Sales Orders · Invoices · Periods & Runs

Was this page helpful?