Commission System
Sales Staff can calculate and store a commission amount when an order is first attributed to a representative. The representative's Staff record holds the percentage; the completed order stores the Staff ID, group and calculated amount used by reports.
Choose the calculation basis
Under Stores > Configuration > MageB2B > Staff > Commission settings, choose one method:
| Method | Calculation |
|---|---|
| Net total excluding tax | Staff percentage × order base subtotal |
| Net total including tax | Staff percentage × order base subtotal including tax |
| As discount on every product | Sum of commission parts calculated while Staff-adjusted product prices are applied |
The first two methods do not include shipping in their base. They use Magento base-currency totals and round the result through Magento's price-currency service before saving it on the order.
The product-discount method is tied to the quote session in which the adjusted prices were calculated. Test it especially carefully with configurable products, cart rules, reordered carts and Admin-created orders.
Set a representative's percentage
Open Staff > All Staff, edit the representative and enter the Commission percentage. A value of 5.0000 means five percent.
For an Admin-created order, the Admin form can supply a commission percentage for the selected representative. If left empty, the Staff account's percentage is used.
When Staff is attributed
For a new storefront order, the active Staff context is used. For an Admin-created order, the Staff selection on the order is used. If Set staff permanently on order is enabled, a customer's primary representative can override the normal context for a new customer order.
Once a normal existing order has been saved, routine saves do not recalculate or replace its Staff commission. An explicit Admin reassignment is handled separately. This preserves the original commercial record instead of silently applying today's representative settings to old orders.
Canceled orders have their stored Staff commission set to zero.
Order history and reporting
When a positive commission is calculated, the extension adds an order history comment naming the representative and formatted amount. The amount is also exposed through the order data used by the Staff order report and Magento API extension attributes.
Enable Show commission for Staff if representatives should see their percentage and commission values in the Staff storefront. It is disabled by default.
Worked examples
With a 5% Staff percentage:
- base subtotal €1,000 excluding tax → €50 commission
- base subtotal including tax €1,190 → €59.50 commission
These examples assume the corresponding calculation method. Shipping, later invoices and refunds do not change the original formula shown here.
Policy questions to settle first
Before enabling commission for compensation, document:
- whether tax is part of the base
- whether primary assignment or the person who placed the order owns the sale
- how Admin-created and reassigned orders are approved
- how cancellations, refunds and partial returns are handled outside the stored order commission
- who may change a Staff percentage
- whether representatives may see commission values
The extension stores a sales commission value; it does not replace payroll, payout approval or refund reconciliation.
When the amount is zero or unexpected
- Confirm a valid Staff account was attributed to the order.
- Check the representative's percentage and the selected calculation method at the relevant scope.
- Compare the order's base subtotal or base subtotal including tax with the chosen formula.
- For product-discount commission, reproduce the quote and price edits in the same Staff/Admin context.
- Check whether the order is canceled.
- Review whether permanent primary-Staff attribution or an Admin reassignment changed ownership.
- Read the order history comment and stored
sales_staff_commissionvalue rather than recalculating from today's settings.
Related: Sales Reports, Order Management and Customer Assignment.