Skip to content

Commission Scheme

Define how sales commissions and membership points are earned: which sales qualify, and how much each level earns. A scheme never pays anything by itself. Commission is worked out when a sales document is finalised, where your tenant has that follow-on job switched on, or when a cycle is processed in the Sales Commission applet; points come from a scheduled run.

Each commission figure is worked out once, from the document and the scheme as they stood at that moment, and stored, so changing either afterwards does not move it; the one exception is a Pricing Model figure, which is worked out again from the scheme as it is now. A sale returned or voided later keeps its commission until someone deducts it by hand.

Your job, and the screen for it

The jobScreen or tabRead
Set up a commission rate for sales agents — nothing reaches the server until SAVE, and a rate change is not retroactiveCommission Scheme › +, Edit Commission Scheme (Rules tabs, Treatment), SAVETreatment tab; Where a commission figure comes from
Decide which sales qualify — Sales Group, Relative Period and Sales Contract never match; Member Label ignores which labels; an empty pick list always passesRules - Doc Hdr, Rules - Multi Line, Rules - Single Line tabs, Rule Type in Add RuleRules tabs (Doc Hdr, Multi Line, Single Line)
Pay by tiered bands — a Pricing Model treatment gives 0 on a document and is applied only in a Sales Commission cyclePricing Model, then Operator PRICING MODEL on TreatmentPricing Model; How the treatment amount is computed
Award membership points — Pts Currency on every active scheme a document matches, the points run scheduled, and the company’s member-point configuration decides which documents it reads — with none, sales orders in any statusTreatment › Level 0 Membership Points block; the Scheduler applet; the company APIMembership points (scheduled); Before you can use it
Test a scheme on one invoice before the first payoutThe cycle’s three stages and the report’s Line Item tab, in the Sales Commission appletVerify a scheme on one invoice before the cycle closes
Set up what the rules pick fromCompanies, branches, employees, items, member classes and points currency in their own appletsBefore you can use it

Overview

The Commission Scheme applet is where you define how sales commissions and membership points are earned. A scheme is master data: a set of rules that decide which sales documents qualify (by branch, company, document type, date, customer type, member class, sales agent category, items or item categories) and a treatment that says how much is paid per downline level (a price source, an operator and a value, optionally through a formula or a tiered Pricing Model). Two supporting masters live in the same applet: Sales Groups (named groups of employees) and Pricing Models (range-to-rate tables).

The applet itself never pays anything. Active schemes are read by two backend processes: the sales-commission posting, which runs as a follow-on job of Finalise where your tenant has it switched on and as stage 1 of a cycle in the Sales Commission Applet (cash commission for sales agents and MLM uplines), and the scheduled membership-points run described under Membership points (scheduled) below (points on qualifying bills). A scheme can also be attached to an e-commerce website in CP Commerce Admin and to an MLM program in MLM Admin.

A Pricebook Point treatment or a Commission Scheme points treatment? Use the Pricebook for the ordinary earning rate: the points are on the bill line from the moment the cashier rings it up. Use a Commission Scheme for a rule the Pricebook has no rule type for, such as one on the document type, or for points worked out on the whole bill’s amount. Its points arrive later, from a run that must be scheduled in the Scheduler.

Both read the document type from a company’s member-point configuration: the Pricebook from the bill’s own company, the scheduled run from the one company its schedule names, applied to the bills of every company in the tenant. With no record, or a schedule that names no company, the scheduled points run takes what it sweeps in any status, drafts included. That is the points run only: commission amounts are still written only for sales that were finalised.

Where it fits

DirectionApplet / dataWhy
Upstream (master data the rules reference)Organisation (companies, branches), Employee (sales agents, employee categories, sales-group members), Customer (entity type flags), Inventory Item Maintenance (items, item categories), Membership Admin (member classes, member labels, the points currency picked on the treatment), MLM Admin Applet (MLM programs and lineage)Every rule and treatment picks from these lists
Upstream (documents evaluated)Sales Invoice (Internal), POS General cash bills, Sales Order (Internal), Receipt Voucher (Internal)The only server document types a Document Type rule can match (INTERNAL_SALES_INVOICE, INTERNAL_SALES_CASHBILL, INTERNAL_SALES_ORDER, INTERNAL_RECEIPT_VOUCHER)
Downstream (consumers)Sales Commission AppletRuns the posting that turns matching schemes into commission transaction lines and commission reports
Downstream (consumers)Membership Admin AppletScheduled membership-points run awards points from the Level 0 Membership Points treatment; MLM programs, kept in MLM Admin, reference a scheme
Downstream (consumers)CP Commerce AdminWebsite › Commission Scheme tab links a website to a scheme

Screens and menus

The left menu has three listings plus Settings and Personalization.

Menu itemScreenWhat it holds
Commission Scheme (default landing)Listing (code, name, description, created date, modified date, status) with search and an advanced filter (status, created-date range, modified-date range, keyword). + opens Create Commission Scheme; clicking a row opens Edit Commission Scheme with tabs Main Details, Rules - Doc Hdr, Rules - Multi Line, Rules - Single Line, Treatment, a RESET/SAVE pair and a DELETE button that must be clicked twice within three secondsThe scheme, with its rules and its treatments
Sales GroupListing (code, name, creation date, modified date, status). Edit has two tabs: Group (the header) and Salesman (linked employees with a Weightage column)The group and its salesmen
Pricing ModelListing (code, name, logic code, logic type, dates). Edit shows the header plus a line grid (range from, range to, commission multiplier, commission absolute, membership point multiplier / value)The model and its bands
SettingsOpens on Feature Visibility, which has no menu entry of its own. The menu lists Field Settings, Default Selection, the Permission Wizard, Permission Set, User Permission and Role Permission listings, Release Notes, and an Audit Trail link that opens a not-found pageShared platform screens except Field Settings and Default Selection
PersonalizationDefault Selection, SidebarPer-user

Rules are added from inside the Edit screen: on a Rules tab, + opens Add Rule - Doc Hdr / Multi Line / Single Line, where a Rule Type dropdown reveals the form for that rule type. Adding a rule, adding filter values to a rule, or editing a treatment only updates the draft in the browser; nothing reaches the server until you click SAVE on the Edit screen. The message for each filter value added or removed ends with “Please save changes”; the messages for adding, editing or deleting a rule do not, but those changes wait for SAVE too.

Configuration

Before you can use it

  • Companies and branches exist in Organisation — needed for Company and Branch rules.
  • Employees exist in the Employee Applet, marked as employees: only such entities appear in the Sales Group › Salesman picker, and the Employee Category rule matches the categories (labels from the EMPLOYEE_CATEGORIES list) tagged on the document’s sales agent.
  • Items and item categories exist in Inventory Item Maintenance — the Item, Item Category and regex line rules read the line’s item, its code and name, and the item’s categories.
  • Member classes and labels exist in Membership Admin; a points currency exists in Membership Admin (PTS CCY Module) if the treatment awards points.
  • Pricing schemes (maintained outside this applet) exist if a treatment uses the Pricing Scheme price source; the Treatment tab lists the pricing schemes it can find.
  • For the money to be paid, the Sales Commission Applet must be installed and its cycle processed: even where Finalise writes the commission lines, only a cycle turns them into a report and a payout. For points, the company’s member-point configuration decides which document type and posting status the scheduled run picks up. It is set through the company API; the Organisation applet does not show it (Points Setup).
  • API permissions: TNT_API_COMMISSION_SCHEME_HDR_{READ, CREATE, UPDATE, DELETE, OWNER, ADMIN, MEMBER} (tenant owner/admin bypasses), and the corresponding TNT_API_SALE_COMMISSION_PRICING_MODEL_HDR_* / _LINE_* sets for pricing models. The commission and points runs read schemes on their own and need no user permission.

Applet settings

The applet has its own Field Settings and Default Selection screens; Default Selection saves for the whole tenant. Anyone with access to the applet’s Settings menu can change them.

Only one setting is shown, saved and actually used:

SettingWhereWhat it controlsDefaultEffect when changed
Details Tab Ordering (COMMISSION_SCHEME_DETAILS_TAB_ORDER)Settings › Default Selection › Details Tab Ordering (drag-and-drop list)The order of the five tabs on Edit Commission SchemeMain Details, Rules - Doc Hdr, Rules - Multi Line, Rules - Single Line, TreatmentEdit Commission Scheme shows its tabs in the saved order; a tab added in a later version is appended at the end

Shown and saved, and used by nothing:

  • Default Branch (DEFAULT_BRANCH) and Default Location (DEFAULT_LOCATION) on the same Default Selection screen. They are saved (picking a branch also fills in the branch’s main location), but commission schemes, sales groups and pricing models have no branch or location field, so nothing uses them. The screen has a SAVE button and no RESET.

Not functional:

  • Settings › Field Settings shows eight toggles (Unit Discount, SST/VAT/GST, WHT, Blanket Order, Segment, G/L Dimension, Profit Center, Project) and a SAVE button that does nothing. Treat the screen as a placeholder.
  • Personalization › Default Selection shows Default Branch / Default Location, but choosing a value fails and SAVE saves nothing.

There are no document-behaviour settings: schemes have no posting status, numbering or printables.

Feature visibility / permissions

No SHOW_* / HIDE_* client-side permission is checked anywhere in the applet, and none is defined for it. Access control is therefore the API permission set listed above plus the shared Feature Visibility screen.

Fields

Commission Scheme — Create and Main Details

FieldMeaningRequiredNotes / validation
Commission Scheme CodeIdentifier of the schemeYesMax 255; the input blocks special characters; read-only after creation (“The code cannot be modified after creation”). The backend CommissionSchemeHdrDataConsistencyObject does not check uniqueness — two schemes may carry the same code
StatusACTIVE / INACTIVEYesDefaults to ACTIVE. Only ACTIVE schemes are loaded by the posting and points processes (getActiveCommissionSchemes filters status = ACTIVE)
Commission Scheme NameDisplay nameYesMax 255, special characters blocked
DescriptionFree textNoMax 255 on create; character counter
Commission TypeSALES_AGENT or MLMYesDefaults to SALES_AGENT. Decides whether the posting run walks the customer’s MLM lineage (see Lifecycle)
Created By / Created Date / Updated By / Updated DateAudit columns—Read-only on Main Details

On CREATE the effect writes the header with all three rule groups set to Rules Logic AND / Negation DISABLED and one Level 0 treatment whose commission and membership-points price source and operator are NA.

Rules tabs (Doc Hdr, Multi Line, Single Line)

Each tab has two group-level fields and a grid of rules (Rule Name, Rule Type, Negation Logic):

FieldMeaningRequiredNotes
Rules LogicAND (every rule in the group must pass) or OR (any rule)YesDefault AND
Negation LogicENABLED inverts the result of the whole groupYesStored as true or false; default DISABLED

Every rule form carries Rule Name (required, max 255) and its own Negation Logic (inverts that one rule). Each rule type can be added once per tab — a second attempt shows “RuleType already exists. Cannot add rule with same ruleType again” and returns to the tab.

Edit Commission Scheme on the Rules - Doc Hdr tab: Rules Logic and Negation Logic drop-downs above a grid of three rules, one of them a Sales Group rule
A Rules - Doc Hdr tab with Rules Logic set to OR. The Sales Group rule in this grid always evaluates false (see the table below), so here it adds nothing; under AND it would disqualify every document.

Rules - Doc Hdr (document-level; rule types in the dropdown):

Rule typeFormWhat the backend compares it with
Valid Date RangeRelative Period (period + unit Day(s)/Month(s)/Year(s)) or Absolute Period (From / To dates)Absolute: the document’s transaction date between From and To inclusive (an unparsable bound is ignored). Relative is not implemented — it always evaluates false
Entity TypeAll Entity, or Selected Entity with All Customer / All Supplier / All Employee / All Merchant“All” passes; “Selected” checks whether the document’s customer is marked as a customer, supplier, employee or merchant
Member ClassPick member classesThe member on the document → their membership card → its member class is one of the picked classes; no member on the document → false
Member LabelPick member labelsPasses when the document’s member has any CRM label link — the picked labels are not compared
CompanyPick companiesThe document’s company
BranchPick branchesThe document’s branch
Sales GroupPick sales groupsNot implemented in the backend (// TODO): the rule always evaluates false, so with Rules Logic AND it disqualifies every document, and with Negation ENABLED it always passes
Document TypeCheckboxes Sales Contract, Receipt Voucher, Sales Order, Sales InvoiceSales Order = INTERNAL_SALES_ORDER; Sales Invoice = INTERNAL_SALES_INVOICE or INTERNAL_SALES_CASHBILL; Receipt Voucher = INTERNAL_RECEIPT_VOUCHER. Sales Contract is never evaluated
Employee CategoryPick employee categories (EMPLOYEE_CATEGORIES labels)Categories of the document’s sales agent; no sales agent → false

A Company, Branch, Member Class, Member Label, Sales Group or Employee Category rule saved with an empty pick list passes unconditionally (the negation is not applied either).

Rules - Multi Line and Rules - Single Line

Item-level rules; the same dropdown:

Rule typeFormMatch
ItemPick items; Min Quantity, Min Amount (default 0)The line’s item
Item CategoryPick categories; Min Quantity, Min AmountAny category of the line’s item
Item Code Regex / Item Name RegexName + Regular Expression rows; Min Quantity, Min AmountRegex found anywhere in the item code / item name
Category Code Regex / Category Name RegexName + Regular Expression rows; Min Quantity, Min AmountRegex found in any of the item’s category codes / names

Only lines with transaction type PNS (product and service lines) are considered. Multi Line is evaluated on the whole document: the matching lines are collected, then their summed base quantity must be ≥ Min Quantity and summed transaction amount ≥ Min Amount (no matching line → rule fails). Single Line is evaluated per line during treatment: each line must individually match and meet both minimums, and only matching lines earn commission or points.

Treatment tab

Edit Commission Scheme on the Treatment tab: the Level 0 (Self) block with a Commission row, the Below Cost checkbox, a Membership Points row with a Pts Currency drop-down and a validity period, and an Add Uplines button
The Level 0 block. Pts Currency is the box to check: the points run needs one on every active scheme a document matches, including schemes built only for commission.

One block per level; Level 0 (Self) always exists, Add Uplines appends Level 1 (Parent), Level 2 … up to 10 levels (MAX_DOWNLINE); the last level can be deleted.

FieldMeaningRequiredNotes
Commission › Price SourceBase amount for cash commissionNo (default NA)Doc Hdr Standard / Net / Transaction / Open Balance Amount; Doc Line Standard / Net / Transaction Amount; Base Quantity; Price Unit Cost; Pricing Scheme; NA
Commission › OperatorHow the value is appliedNo (default NA)MULTIPLY, ABSOLUTE, ADD, SUBTRACT, PRICING MODEL, FORMULA, NA
Commission › ValueNumberNo (default 0)Rate for MULTIPLY (0.05 = 5 %), fixed amount for ABSOLUTE
Commission › Pricing SchemeShown when Price Source = Pricing Scheme—Dropdown of pricing schemes
Commission › FormulaShown when Operator = FORMULA—Hint: {PRICE_SOURCE}*(150-{DAY})/150*0.016
Commission › Pricing ModelShown when Operator = PRICING MODEL—Dropdown of this applet’s pricing models
Commission › Below CostCheckbox, default checked—Read only where commission is worked out line by line (Single Line rules or an MLM scheme); a scheme computed once on the document ignores it. Unchecked: a line earns 0 when its price-source value is below the line’s moving-average cost divided by its quantity. For a one-unit line that is the unit cost; for several units the bar drops, so a multi-unit line sold below cost can still earn (recorded for engineering). The cost read is whatever the line carries when the commission is written
Membership Points › Price Source / Operator / ValueSame lists as commissionNo (defaults NA / NA / 0)Pricing Model gives 0 for points. Formula works for points on the server, but this screen has no formula box for points, so it gives 0 when set here, and saving the scheme here drops a points formula set through the API
Membership Points › Pts CurrencyPoints currency—From the PTS CCY Module in Membership Admin. The screen lets you leave it empty, but the scheduled points run needs one on every active scheme a document matches — including a scheme you built only for cash commission. If any matching scheme has none, the run fails for that document and no scheme awards it points. The currency’s code is copied onto the points report when it is created
Membership Points › Validity Period (Days)Days the points stay validNo (default 0)Validity starts at the document’s transaction date
Membership Points › Pricing SchemeShown when Price Source = Pricing Scheme—

Sales Group

FieldMeaningRequiredNotes
Sales Group CodeIdentifierYesBackend rejects a duplicate
StatusACTIVE / INACTIVEYesDefault ACTIVE
Salesman tab › +Multi-select grid of entities flagged as employees (Salesman Code = employee code, Salesman Name)—Adds the employee to the group; linking the same employee twice is rejected
Salesman tab › WeightageNumber on the link edit form (default 0)NoStored on the link; not read by the commission backend

A sales group also has a Sales Group Name (required) and a free-text Description.

Pricing Model

FieldMeaningRequiredNotes
Pricing Model Code / NameIdentifier and display nameYesNo uniqueness check in the backend DCO
Logic CodeFree textYesRequired, but only a label: nothing that calculates commission reads it. Use it for your own reference — for example, the sales-policy clause the bands come from
Logic TypeTIERED or VOLUMEYesDefault TIERED; stored only — the engine applies the same first-matching-band lookup for both
Line › Range From / Range ToBand boundariesYesMatched as from ≤ value < to against the price-source value, so a value exactly equal to one band’s To belongs to the next band. The band’s rate applies to the whole value, not only the part inside the band. A value below the lowest From or at or above the highest To earns 0, so give the top band a To well above any real sale. Nothing checks that From is below To or that bands do not overlap, and where two bands overlap which one applies is not defined — keep them end to end
Line › Commission Operator + ValueMULTIPLY or ABSOLUTE with a numberOne of commission or point valueMULTIPLY stores the number as the band’s multiplier, ABSOLUTE as its fixed amount (the other is written as 0); the edit form infers the operator from whichever is > 0
Line › Membership Point Operator + ValueSame patternStored on the band; not read by any backend service

The line form enforces “Please enter one of the following fields: Commission Value or Membership Point Value”.

Edit Pricing Model with code, name, logic code and logic type above a grid of two bands, each with Range From, Range To, a commission multiplier and a commission absolute value
Two bands laid end to end, one paying a multiplier and one a fixed amount. A sale at or above the top band's Range To earns 0, so the last band needs a To well above any real sale.

Lifecycle and effects

Commission schemes, sales groups and pricing models are master data: no posting status, no journal, no stock. DELETE does not check whether websites, MLM programs or existing commission reports still use the scheme.

How a scheme is evaluated

  1. Load every scheme with status ACTIVE.
  2. For each scheme, each rule group is checked. Doc Hdr and Multi Line groups are evaluated against the whole document and both must pass. Inside a group the rule results are combined with AND or OR and then the group’s negation is applied; an empty group passes.
  3. If the scheme has Single Line rules, the treatment is computed line by line (only PNS lines) and summed; otherwise it is computed once on the document. A header (Doc Hdr) price source on a line-by-line scheme returns the whole document’s amount for every matching line, so two matching lines on a RM 1,000 invoice at 2% earn RM 40, not RM 20 — use a Doc Line price source with Single Line rules. The same holds for points.
  4. A scheme is kept for cash commission only if at least one level has a commission price source other than NA and an operator other than NA.

How the treatment amount is computed

  • Price source: header amounts are the document’s standard, net, transaction or open-balance amount; line amounts and Base Quantity are summed over the goods lines (or the single line); Price Unit Cost = Σ moving-average cost price × base quantity; Pricing Scheme = the item’s sales unit price in the chosen scheme × base quantity.
  • Operator: MULTIPLY = source × value; ABSOLUTE = value; ADD / SUBTRACT = source ± value; FORMULA = the expression evaluated with {PRICE_SOURCE} replaced by the source (or, on a receipt’s per-knock-off lines, the knock-off amount) and {DAY} by the days between the invoice date and the knock-off date (0 on every other path) — a parse error, or a result of zero or less, yields 0; NA = 0.
  • PRICING MODEL is not applied when a document is evaluated (it gives 0 there). It is applied only to the intermediate lines of a commission cycle (create full commission in the Sales Commission Applet): the cycle’s lines for each sales agent and scheme are added up on the treatment’s price source, and the first band that contains that sum is used — its commission multiplier when non-zero, otherwise its commission value. Several combinations do not work there:
    • A document (header) amount adds up to zero, so only a band whose range contains 0 and that pays a fixed amount pays anything.
    • Pricing Scheme adds up the items’ unit prices without multiplying by quantity.
    • Base Quantity and Price Unit Cost add up to zero too unless the scheme has Single Line rules, because a scheme computed once on the document stores no quantity or cost on its line. A Doc Line amount source works either way.
    • On an invoice, order or cash bill an MLM scheme gets no Pricing Model figure at any level, the buyer’s included: its zero lines are not written, and stage 2 leaves out every line paid to an MLM member. A receipt is the exception, because its knock-off lines are paid to the invoice’s sales agent.
  • Below Cost unchecked: for line-level commission, if the price-source value is lower than the line’s moving-average cost divided by the line’s quantity, the commission for that line is 0 (see the Treatment tab row for what that does to a multi-unit line).

Cash commission (Sales Commission Applet)

The commission posting (a follow-on job, which runs after Finalise where your tenant has switched it on and has no clock of its own, or stage 1 of a cycle in the Sales Commission Applet) loads the document, refuses it if its commission has already been posted, finds the matching schemes with a usable treatment, and writes one intermediate commission line per scheme (per line when Single Line rules or MLM are involved). Then it marks the document’s commission as posted. Details that matter for scheme design:

  • SALES_AGENT schemes use the Level 0 treatment for the document’s sales agent.
  • MLM schemes look up the customer’s MLM lineage: the buying member takes the Level 0 treatment and each upline at level n the Level n treatment, computed per line. A customer who is in no MLM program earns nothing under an MLM scheme.
  • A Receipt Voucher earns commission only through its contra links to invoices; an RV with no contra produces nothing.
    • Under a scheme with Single Line rules, or an MLM scheme, each knock-off becomes its own line: paid to the invoice’s sales agent (no upline, even on an MLM scheme), worked on the knock-off amount where the price source is Doc Line Transaction Amount or the operator is FORMULA (any other source reads the receipt’s own amounts for every knock-off), scaled by the share of the invoice that is not GL-code lines, and the only path where {DAY} in a formula is not 0. The Single Line rules themselves are not checked on a receipt.
    • Under any other scheme the receipt earns one line, on its own amounts, for its own sales agent.

Membership points (scheduled)

The scheduled job MEMBERSHIP_POINTS_COMMISSION_QUEUE_PROCESSOR (schedule it in the Scheduler) selects documents of the type and status the company’s member-point settings name, whose points commission has not yet been posted, evaluates the rules (treatment presence is not checked) and applies only the first treatment’s Membership Points block (“Supports only 1 treatment”), creating a membership-points commission report valid from the transaction date to the transaction date + Validity Period. Four things to know before relying on it:

  • It reads bills of that type from every company in the tenant, using the settings of the one company its schedule names. Give every company the same document type and status for points, and put a Company rule on each scheme so it awards points only on its own company’s bills.
  • Each run takes the 10 oldest waiting documents unless its schedule sets a larger number, so a branch network that rings up more bills per interval than that builds a backlog. Compare the points reports created with the bills finalised for a day.
  • Points reach only a bill that names a member. A bill swept without one gets a points report and no points, and adding the member afterwards does not bring it back into the run.
  • A document is marked as swept before its points are worked out. If the run then fails on it (a matching scheme with no Pts Currency), the run never sweeps it again. Fix the scheme, then add those members’ points with Add Point Adjustment on each member’s Point Transaction tab in Membership Admin.

A preview for one document through the API (calculate-membership-treatment-value) adds up every matching scheme before any rounding and does not check the points currency, so it can show points the run will fail to award.

Where a commission figure comes from

Every number on a commission report is a sum of stored commission lines, and each line is a snapshot taken at the time of one posting:

FigureStored whenWorked out from
A commission lineAt Finalise, where your tenant has the commission follow-on job switched on (the line then carries no cycle); otherwise at stage 1 of a cycle whose dates cover the document’s date (a receipt is picked up by the date of its knock-off)The document’s amounts, copied onto the line at that moment, and the treatment of each matching active scheme as it was at that moment. The commission itself is stored on the line
The document’s “commission posted” markIn the same step, and only if at least one line was writtenA document that matched no scheme stays unmarked, so a scheme created later still picks it up in a cycle
A report’s MoneyStage 3 of the cycle, or REGENERATE on the reportThe stored lines dated inside the cycle, added up. Nothing is re-evaluated against the scheme, except Pricing Model treatments, which stage 2 and REGENERATE work out again from the stored line amounts with the scheme as it is now

Three things follow from that:

  • A rate change is not retroactive. Raise a scheme from 2% to 3% on the 10th and every line written before the 10th keeps 2%. The document is already marked, so no later run reads it again. A Pricing Model band is the exception: change a band and the next stage 2 or REGENERATE applies it to every line of the period. Do not turn a scheme already in use into a Pricing Model scheme: its old lines keep their stored commission, and stage 2 then adds the Pricing Model figure on the same lines, so the period pays twice. Create a new scheme and set the old one INACTIVE instead.
  • Every matching active scheme pays. A store-wide 1% scheme and a 2% smartphone scheme that both match the same line both write a line for it, and the agent earns 3%. Nothing picks the better one, so keep schemes from overlapping unless stacking is what you mean.
  • Cost-based settings read the cost the line carried when the commission was written. Costing reaches the document line in a later step of the Finalise chain, and Finalise queues the commission job alongside the other follow-on jobs rather than after costing. Where commission is written at Finalise, Below Cost and the Price Unit Cost source can therefore read a line whose cost has not arrived yet; a cycle processed days later reads the cost that has since been written.

Worked example: 2% on smartphones at GS-KV-01, and a return three weeks later

GadgetSphere pays its sales staff at branch GS-KV-01 2% on flagship smartphones and 5% on accessories, settled monthly. A scheme has one rate per level, so this is two schemes:

Smartphones schemeAccessories scheme
Commission TypeSales agentSales agent
Rules - Doc HdrBranch GS-KV-01; Document Type ticked for Sales InvoiceThe same
Rules - Single LineItem Category: flagship smartphonesItem Category: accessories
Treatment, Level 0Doc Line Net Amount, MULTIPLY, 0.02Doc Line Net Amount, MULTIPLY, 0.05

On 3 March you sell a flagship smartphone at RM 4,200 and wireless earbuds at RM 300 on one sales invoice, with yourself as the sales agent (leave tax aside). When the commission is written, at Finalise or at the March cycle’s stage 1, each scheme passes the header rules and writes a line for the item line its category rule matches: RM 84 on the phone and RM 15 on the earbuds. The March report shows RM 99, and its Line Item tab shows both rows with the scheme beside each.

On 24 March the customer brings the phone back and a sales return is raised against the invoice. The commission does not move. A cycle reads only sales orders, sales invoices, cash bills and knocked-off receipts, and the Document Type rule has no box for a return; the RM 84 line was stored on 3 March and nothing removes or offsets it. The March report still says RM 99, and whoever approves the payout deducts RM 84 on the payment voucher, as the Sales Commission page describes. Had the return come in April, after March was paid, the deduction belongs to April’s payout, and the April report does not mention it either.

That is also why both schemes carry a Document Type rule. Without it, where commission is written at Finalise, the return itself is offered to the schemes like a sale. A return’s lines hold positive amounts and keep their sign in a separate field, and the commission is worked out from the amounts, so the return would add RM 84 instead of taking it back. This has not yet been tested on a live tenant or seen in tenant data; the Document Type rule prevents it either way.

If the invoice is voided instead, timing decides. Voided before any commission was written, a cycle never reads it, because a cycle takes only FINAL sales. The Finalise-time job does not check the status again when it runs, so a void made in the moments between Finalise and that job can still leave lines (not yet seen on a live tenant). Voided after, its lines stay, and stage 3 and REGENERATE still count them, because they select lines by date, not by the document’s state. Whether a return or a void should reduce commission automatically is a policy question still open with BigLedger; today the deduction is a person’s job, done at payout.

Verify a scheme on one invoice before the cycle closes

A scheme can be wrong in ways the Edit screen will never show, so test it on a real document before the first payout:

  1. Pick one finalised sales invoice from the current period that the scheme should match, at the branch it names, with at least one item each rule should catch.
  2. In the Sales Commission applet, run the cycle’s three stages in order. Stage 3 replaces the cycle’s reports, which is harmless before a payout is raised.
  3. Open the agent’s report and its Line Item tab. Expect one row per matching item line, naming the scheme you meant, with Money equal to the rate times the line amount: RM 84 and RM 15 in the example.
What you see insteadWhat it means
No row for the invoiceIt is not FINAL, it is dated outside the cycle, or no scheme matched. A document that matched nothing is not marked, so correct the scheme and run the stages again. Or the invoice had no sales agent: a non-MLM scheme wrote its lines with none and marked it, and a line with no agent lands on no report, and under a Pricing Model scheme it makes stage 2 fail for the whole company; adding the agent afterwards does not bring it back, so pay it on the payout
A row from a scheme you did not expectTwo active schemes match the line, and both pay
The right scheme with Money 0Price source or operator left at NA, value 0, a formula that failed, or Below Cost unchecked
The right scheme at an old rateThe line was written before you changed the scheme; it keeps the old rate

Other references

  • CP Commerce Admin › Website › Commission Scheme links a website to a scheme.
  • MLM Admin programs carry a commission scheme.

Related applets

Troubleshooting

SymptomCauseFix
A scheme with a Sales Group rule never matches any documentThe backend has no evaluation for SALES_GROUP (CommissionSchemeGenericRuleNode falls through to false)Remove the rule; restrict by Employee Category on the sales agent instead, or by Branch / Company. Do not rely on Negation to “fix” it — a negated Sales Group rule passes every document
A Valid Date Range rule set to Relative Period never matchesOnly ABSOLUTE is implemented; RELATIVE returns falseUse Absolute Period with explicit From / To dates
Member Label rule pays every member, not just the labelled onesThe rule only checks that the member has some label link; the picked labels are ignoredUse Member Class, or accept the behaviour until the rule is fixed
Commission expected on Sales Contracts never appearsThe Sales Contract checkbox is stored but never evaluated; only SO, SI/cash bill and RV server types matchPay on the resulting invoice instead
Treatment with Operator PRICING MODEL yields 0 in the commission transaction linesThe document path returns 0 for PRICING MODEL; it is applied only during the cycle’s full-commission pass on intermediate linesRun the full commission generation in the Sales Commission Applet, or use MULTIPLY / ABSOLUTE for per-document amounts. On an MLM scheme a Pricing Model pays nothing on sales documents (receipts aside); use MULTIPLY or ABSOLUTE there
Points from Level 1 or higher are never awardedThe points run uses the first treatment onlyPut the points logic on Level 0
Scheme matches but the commission amount is 0Price source or operator left at NA, Value 0, a FORMULA that fails to parse or evaluates negative, or Below Cost unchecked with a selling price below unit costCheck the treatment values; test a formula with {PRICE_SOURCE} only before adding {DAY}
An empty Company / Branch / Item rule “applies to everything”A rule with no picked values passes unconditionallyPick at least one value or delete the rule
“RuleType already exists. Cannot add rule with same ruleType again”One rule per type per tabEdit the existing rule (click its row) and add values there
Rule or treatment changes vanished after navigating awayRules and filter values only live in the browser draft until SAVE on Edit Commission SchemeSave before leaving the scheme
Two schemes with the same codeThe backend does not enforce code uniquenessThe Edit screen shows the code read-only, so create the scheme again under a new code and set the old one INACTIVE at once. A Pricing Model scheme is the exception: it must stay ACTIVE until its last cycle is paid, because an inactive scheme gets no Pricing Model figure at the next stage 2 or REGENERATE, so give the old and new schemes Absolute Valid Date Ranges that do not overlap meanwhile, or every sale pays under both. Downstream reports show the scheme guid, so duplicates are confusing rather than blocking
Re-running the posting for a document is refused as already postedThe document’s commission posting status already reads POSTEDExpected: its commission lines are already written. REGENERATE on a report re-adds the lines already written and re-reads the scheme only for a Pricing Model figure, so a corrected rate reaches only documents posted after the correction; adjust the earlier ones on the payout. A corrected Pricing Model band is the exception: REGENERATE applies it to the earlier lines, so do not adjust those on the payout as well
A returned or voided sale still counts on the reportCommission lines are stored when written; a return is never read by the commission run, and a void leaves the lines in place (see Worked example)Deduct it on the payout, and check the Line Item tab for returned or voided document numbers before approving
Field Settings / Personal Default Selection do nothingPlaceholder screens (see Configuration)Nothing to configure there

Related documentation

Last updated on