A complete lead marketplace with transparent commission settlement.
3 active roles: Channel Partner · Sales Member · Admin (IdealWarren)
Originator (CP A) — Sarah from "Acme Realty" registers. Admin Mike approves. She uploads price list & bank details.
Allocated (CP B) — David from "Best Homes" also registers and gets approved. Ready to receive leads.
Sarah (Originator) submits "Luxury Villa — Mayfair" worth £10,000. Mike allocates it to David (Allocated CP B). David sees it in his Kanban at stage New.
Once a lead is won and the Admin approves the commission, this is what the Admin sees:
commissionAmount = 110feeOverrideType='fixed', feeOverrideValue=10 → platformFee = 10 (fixed branch)netCommission = 110 − 10 = 100originatorFeeType='fixed', originatorFeeValue=30 → originatorFeeAmount = 30 (fixed branch)adminRevenue = net − originatorFee = 100 − 30 = 70
Amend & Lock, commissionLocked = true. Platform fee editor and originator fee editor switch to display-only with "— locked". No further changes allowed — gross, platform fee, net, and originator fee are all frozen.
update() re-runs the math when feeOverrideType/Value changes and re-derives both netCommission and originatorFeeAmount. Changing the originator fee only recomputes originatorFeeAmount (commission + platform fee untouched).
Pays £110 gross commission. No visibility into the split. Their job is done.
Receives £30 originator payout. Never sees gross (£110), platform fee (£10), or net (£100). The maskForOriginator helper strips those fields.
Revenue = £70 (net − originator). Shown as "Admin Net" column. Responsible for settling platform fee to the Platform.
Receives the full platform fee = £10. Admin settles this via PlatformFeeSettlement (bulk).
commissionTx.originatorPayoutAmount — the CP A slice from Admin. CP sets fee & pays.
commissionTx.netCommission — Admin's pool after platform fee. Admin sets fee & pays.
Admin Mike has 3 won leads with platform fees: £10 + £25 + £15 = £50 total. He creates a PlatformFeeSettlement, pays £50 to the Platform's bank account, uploads the receipt → completed.
The Platform receives the full platform fee — no split, no deduction.
:3001. The Platform receives 100% of the platform fee amount.
| Role | Portal | Action | Receives / Sees |
|---|---|---|---|
| Originator (CP A) | :3000 | Submits leads | Receives originator fee. Only sees originatorPayoutAmount — never gross, platform fee, or net. |
| Allocated (CP B) | :3000 | Works leads, proposes commission, pays gross | Sees gross commission & status. No visibility into platform fee or originator split. |
| Sales Member | :3000 (limited sidebar) | Submits leads for parent (CP or IWFMS) | Sees lead list — hides allocated CP name & lead value. Shows Pending/Allocated pill. |
| Admin (IdealWarren) | :3001 | Approves CPs, allocates leads, approves commissions, settles platform fees | Keeps admin revenue (net − originator). Full transparency on all fields. |
| Platform | :3002 (Super Admin) | Configures platform fee rate, monitors | Receives full platform fee from Admin via PlatformFeeSettlement. |
✅ Complete LeadFlow Commission Engine
Propose → Approve → Platform Fee → Originator Fee → Amend & Lock → Payment → Settlement
Originator (CP A) only sees originator payout · Admin settles full platform fee to Platform · All flows locked after amend
LeadFlow PM v2.0 · IdealWarren