Perfex Sales Growth documentation
Perfex Sales Growth adds sales commission and customer rewards to Perfex CRM: commission programs with approvals, payouts and statements, customer points with membership tiers, coupons and promotions, and referral links and partners. Everything is calculated from Perfex invoices, payments, credit notes and refunds and written to one append-only ledger.
Installation
Requirements
- Perfex CRM 3.4 or newer. Tested with Perfex 3.4.1.
- PHP 8.1 or newer with the
bcmathextension; MySQL or MariaDB with InnoDB tables. - Perfex's cron job (Setup › Settings › Cron Job shows the command), ideally every minute. Invoice changes, imports, e-mails, expenses, point expiry and the integrity check run in the background.
- Perfex Cash & Capacity, Brain Pro, Flow Studio, Connect, Inbox, AI Staff, Document Studio, Client Hub and Product Hub are optional.
Install
- Back up the CRM database and files.
- Extract the download
perfex-sales-growth-1.0.0.zipon your computer. Inside are the installableperfex_sales_growth-1.0.0.zip, this documentation, the changelog and the licenses. - In Perfex, open Setup › Modules, upload the inner
perfex_sales_growth-1.0.0.zip, then activate Perfex Sales Growth. - Check that the cron job runs. Sales Growth appears in the left menu.
Files and tables
The module lives in modules/perfex_sales_growth. Its tables start with tblpsg_ (your table prefix may differ). It adds no columns to Perfex's own tables and changes no Perfex core files.
First steps
- In Setup › Staff › Roles, give your sales team View own, your sales manager View and Approve, and whoever pays commission Payout.
- Open Sales Growth › Programs and add a program, for example: reward kind Commission, reward type Percent, value 10, beneficiary Sale Agent, earn timing Payment.
- If you invoice in more than one currency, enter this month's rates in Engine And Exchange Rates.
- Record a payment on an invoice that has a sale agent. After the next cron run the commission appears as Pending on Commissions And Rewards.
- For customer rewards, open Growth Settings And Tools, set the value of a point and switch on the customer area options, then add a Points program.
Permissions
| Permission | Allows |
|---|---|
| View | All ledger entries, reports, statements and exports. |
| View own | Only one's own entries, statement, next payout and exports. |
| Create / Edit / Delete | Programs, teams, partners, coupons and promotions; Edit also maps invoice lines, splits commission and attributes refunds; Delete deactivates offers. |
| Approve | Approve pending entries, resolve disputes and close periods. Self-approval is off unless enabled in settings; an approver list can narrow it further. |
| Payout | Create payout batches and record payments. |
| Adjust Loyalty | Grant or redeem points for a customer and run loyalty imports. |
| Settings | Settings, engine, exchange rates, range recalculation and imports. |
Customer and contact names always follow Perfex's own customer access: a staff member who cannot see a customer in Perfex cannot pick or grant to it here.
Programs
A program is one earning rule. Several programs can apply to the same invoice: Cumulative programs add up, an Exclusive program keeps only the best one. Priority decides the order. Rules apply by invoice date between the program's From and Until dates, so changing a program does not rewrite the past. Every save keeps a version in the program's history.
Reward types
- Percent of the line amount (without tax).
- Profit: percent of the line amount less its cost. The cost comes from Perfex Product Hub when it is active.
- Fixed per invoice and Fixed per unit.
- Points per base amount for customer points.
Beneficiaries
- Sale Agent: the invoice's sale agent in Perfex.
- Splits: shares per invoice, set on the invoice's Rewards tab; they must add up to 100%.
- Team: every member of a sales team (Sales Growth › Teams And Partners).
- Role: staff with a Perfex role.
- Manager: managers earn a share of what their people earn, set under Growth Settings And Tools › Manager Hierarchy.
- Partner: an outside partner.
- Customer: points for the invoice's customer.
Scope a program to customers, customer groups, staff, items, item groups, roles, partners or teams, and with Product Hub to products and product categories. Customer type limits it to new or existing customers, First N invoices to a customer's first invoices.
When it is earned
- Payment (default): earned in proportion to each payment, including fixed rewards. Applied credits are not cash and earn nothing.
- Invoice: the full amount when the invoice is issued.
- Full: only once the invoice is fully paid.
Rule date picks whether the invoice date or the payment date decides which program version and period apply. Credit notes and refunds reduce earnings; Clawback window limits how long after the invoice that happens.
Bands and multipliers
Commission bands change the rate once a person's volume in the month, quarter or year passes a threshold. Retroactive applies the reached rate to the whole period, Marginal only to the part above each threshold. Volume can be an amount or a quantity. Points multipliers raise or lower the reward for chosen items, item groups, product categories or customer groups.
Invoice lines
Item-based rules need to know which catalogue item an invoice line is. Sales Growth uses, in this order: the Product Hub product, the item picked in Perfex's invoice editor, an exact and unique item description, otherwise the line stays unlinked. Include unlinked invoice lines decides whether unlinked lines still count for programs without an item scope. Fix a line under Engine And Exchange Rates › Invoice Line Identity.
Approvals and disputes
New entries are Pending. On Commissions And Rewards, approvers tick entries and press Approve Selected. Entries without an exchange rate wait as Needs Rate. Click a beneficiary to open the entry: its invoice, history and disputes. Anyone who can see an entry can open a dispute with a note; an approver resolves it with an answer. Approved, paid and redeemed entries never change.
Payouts and statements
Open an approved commission entry and create a payout batch for the amount to pay. Batches reserve approved commission so it is never paid twice. Record payments on the batch as they happen — in full or in parts — with a reference; tick Create A Perfex Expense to add a Perfex expense in the category chosen in settings. Recording a payment keeps accounting history; it does not transfer money.
My Next Payout shows each person's approved balance less reservations and negative adjustments, per currency. Commission Statement creates a PDF for a person and period; Email My Statement sends your own.
Targets
Under Growth Settings And Tools › Sales Targets set a quota per person, currency and month, and an accelerator applied above the quota. Growth Reports › Target Attainment shows the qualifying amount, the quota and progress.
Points and tiers
A Points program gives customers points for what they pay. Points are kept in lots that expire after the number of months set in settings; customers get a reminder before points expire.
Redeeming points
Customers redeem points in the customer area on one of their unpaid invoices; staff with Adjust Loyalty can redeem on the invoice's Rewards tab. Redemption creates a Perfex credit note for the point value and applies it to the invoice. Settings set the value of one point, the minimum points and the maximum share of an invoice that points may pay.
Bonuses
Points for signup, birthday (from a customer or contact date custom field you choose), first purchase and reviews. A review bonus needs a trusted extension that announces the review with the psg_customer_reviewed action.
Membership tiers
Tiers are reached by points or by spend over a look-back period. Each tier has a rank, a member discount, a points multiplier, tags and a free-shipping flag that other modules can read through the psg_customer_benefits filter. Grace days keep a customer in a tier for a while after they drop below it. Earnings use the benefits valid on the payment date.
Coupons and promotions
Create coupons under Growth Settings And Tools › Create Coupon: percent or fixed amount, dates, minimum amount, total and per-customer limits, customers, customer groups, items and item groups, stackable and first-order-only options. Generate And Download CSV creates a batch of single-use codes and downloads them once as CSV; only hashes are stored, so keep the file.
Staff apply a coupon on an invoice or estimate's Rewards tab; customers enter a code in the customer area. Coupon mode in settings decides whether a coupon becomes a credit note or a negative discount line. Promotions (percent off or buy X get Y on items, groups or categories) are suggested on the document and applied only after a staff member confirms.
Referrals and partners
With referrals switched on, customers create a link in the customer area. Someone who registers or sends a web-to-lead form through it is attributed to the referrer, also after the lead is converted, and the referrer receives the points set in settings. Links expire and can be revoked; only hashes are stored.
Partners are added under Teams And Partners. Link a partner to a customer contact so they can open Partner Commissions in the customer area: earned, approved, paid and adjustments for a period, the PDF statement and their own referral link.
Customer area
My Rewards appears in the customer menu when the customer area is on. It shows the points balance, membership and progress to the next tier, expiring points, redeeming on unpaid invoices, coupons, the member discount, the referral link and the reward history. Each part can be switched off in settings. Contacts need Perfex's invoice permission to use rewards on invoices, and only see their own customer's data.
Ledger rules
Every commission, point, payout and correction is a ledger row linked to its invoice, rule and period. Amounts use exact decimal arithmetic. Approved, paid and redeemed rows are never edited: when a source changes later, Sales Growth adds a counter-entry for review. Pending rows are rebuilt.
Currencies
Entries keep the invoice's currency and are converted to your base currency with the monthly rate entered under Engine And Exchange Rates. Without a rate an entry waits as Needs Rate — it is never converted at 1.
Closed periods
Close Accounting Period (Approve permission, with a reason) locks a month. A later change that belongs to a closed month keeps its original period and is posted to the next open period for review.
Recalculate a date range
Recalculate By Date Range previews up to 366 days of invoices in the background and shows the difference per invoice. Nothing changes until you press Confirm. Only pending rows are rebuilt; approved and paid differences are shown and left alone. An invoice that changed after the preview is skipped and needs a new preview. Cancel stops the remaining invoices.
Refund attribution
When one refund belongs to a credit note linked to several invoices, Refund Attribution lets a staff member split it across those invoices. The amounts must add up to the full refund; a reason is required and the change is audited. If the refund changes in Perfex, the split must be reviewed again.
Integrity check
Once a day, and on demand under Engine And Exchange Rates, balances are compared with the ledger. Any difference is listed for review.
Imports
Loyalty Imports accepts a CSV with customer_id,points,tier_id,expires_at (tier and expiry may be empty) for opening balances. Administrators can also read an earlier commission or loyalty setup that stored its data in the same Perfex database. Every import is previewed first; Confirm and Undo run in the background. Undo adds counter-entries and refuses points that were already used. Imported programs stay inactive until you review them.
Reports and exports
Growth Reports: commission, payable, target attainment, points, liability history, tier distribution, coupon usage and the referral funnel, for any period, with CSV export. The ledger itself exports to CSV with its filters. View-own staff see only their own figures.
E-mails
Sales Growth adds e-mail templates under Setup › Email Templates. The statement e-mail is active; the notification templates (commission approved or paid, points earned or expiring, tier changed, coupons, disputes, birthday, target reached) are inactive after installation, so enable the ones you want. E-mails are sent from the queue.
Ask AI Staff
With Perfex AI Staff 1.1 or newer active, the assistant gets two read tools from Sales Growth. Ask in plain words, for example:
| Question | Tool | What it answers |
|---|---|---|
| Who earned the most commission last quarter? | Top Commission Earners | Earned, payable, paid and pending commission per staff member, top N, totals per currency, compared with the previous months. |
| How far is each rep from target this month? | Target Progress | Quota, achieved, attainment % and what is left per staff member and month. |
| Commission payable | Top Commission Earners | What is approved and waiting to be paid (a suggestion chip in the chat). |
- Same numbers as the Commissions and Targets reports; periods are whole commission months in the company time zone.
- "View own" staff see only their own commission and targets; other people's names stay hidden without staff view.
Integrations
Each integration switches on by itself when the other module is active:
- Perfex Cash & Capacity 1.1.4 or newer: approved and paid commission is a cost in project and customer margins; payout expenses created by Sales Growth are left out so the same money is not counted twice. A Cash & Capacity tab shows commission payable, points liability and commission cost by customer or project.
- Perfex Brain Pro: six widgets.
- Perfex Flow Studio: triggers (commission approved or paid, points earned or expiring, tier changed, coupon issued or redeemed, dispute, birthday, target reached) and actions (grant points, issue coupon, change tier, approve commission).
- Perfex Connect: REST resources for programs, ledger and balances, coupon validate and redeem, and webhooks for the same events.
- Perfex AI Staff: top earners and target progress answers (see Ask AI Staff), tools to read commission and points within the user's rights and to propose a coupon for approval.
- Perfex Inbox: points, tier, expiring points and coupon snippets for replies.
- Perfex Document Studio: a commission statement document type with merge fields.
- Perfex Client Hub: rewards and partner cards on the customer home page.
- Perfex Product Hub: product and category scopes and real costs for profit commission.
Settings
Growth Settings And Tools holds the value, minimum, maximum share, expiry and reminder of points; clawback days; referral and bonus points; the birthday field; coupon mode; the expense category for payouts; who is notified and who may approve; self-approval; and the customer area switches. The same page holds sales targets, manager overrides, closing periods, membership tiers and coupons.
Deactivate and uninstall
Deactivating stops the menus, the customer area pages and background work; all data stays. Uninstalling through Perfex removes the module folder; the tblpsg_ tables and the credit notes, expenses and invoices created in Perfex stay, as your accounting record.
Troubleshooting
- No commission appears. Check that the cron job runs, that a program is active for the invoice date and that the invoice has a sale agent. Engine And Exchange Rates shows the queue and any errors; preview a single invoice there.
- Entries stay in Needs Rate. Enter the month's exchange rate for that currency.
- An item rule ignores a line. The line may be unlinked; fix it under Invoice Line Identity.
- Customers do not see My Rewards. Switch on the customer area in settings; contacts need Perfex's invoice permission to redeem.
- No notification e-mails. Enable the Sales Growth notification templates under Setup › Email Templates.
FAQ
Does Sales Growth pay people? No. It calculates, approves and records commission; you pay as usual and record the payment.
Can I change a program after people were paid? Yes. Paid entries never change; differences become counter-entries for review.
Is there a rewards catalogue? Not in 1.0. Points are redeemed on invoices; a catalogue of fixed rewards is planned for 1.1.
Changelog
Current version 1.0.1 (24 Oct 2026). Release notes of every version, newest first: perfexcrm.app/sales-growth/changelog/.
1.0.1
- Perfex AI Staff answers commission and target questions: top earners and target progress, within each person's rights.
1.0.0
- Commission programs: percent, profit, fixed per invoice or unit, bands and multipliers; sale agent, splits, teams, roles, managers, partners and customers; payment, invoice or full-payment timing.
- Approvals with disputes, payout batches with partial payments and expenses, statements as PDF and e-mail, targets and next payout.
- Customer points with expiry, reminders and bonuses; membership tiers; redemption as Perfex credit notes.
- Coupons, one-time code batches and promotions; referral links; partner statements.
- Append-only ledger, monthly exchange rates, closed periods, range recalculation, refund attribution, integrity check, imports with undo.
- Reports with CSV export; integrations with Cash & Capacity, Brain Pro, Flow Studio, Connect, AI Staff, Inbox, Document Studio, Client Hub and Product Hub.
- Same look as our other modules, light and dark, phone layouts; nine languages; nine permissions.
The full list is in changelog.txt in the download.