The problem.
The client is an intermediary in industrial real estate based in San Sebastián de los Reyes, Madrid, with seven brokers. The difficulty was never the number of deals. It was the compensation model: three commission models coexist, and each deal is split internally across six roles.
On top of that, a commission is only earned when the client actually pays. Calculating it correctly means knowing, for every deal, who did what, which model applies to each person and whether the invoice in Holded has been collected.
What we built.
Role-based input webapp
Each deal is registered in a webapp with its data and the split across the six roles. Each role has its broker and its share.
Commission engine with 3 models
For each broker and deal, the engine knows which model applies and calculates the commission. The result is traceable to the rule that produced it.
Two-way Holded sync
Collections are synced with Holded. A commission only accrues when the invoice is paid, so nobody gets paid on money that has not come in.
Individual BI and monthly close
Each broker has a personal dashboard with their own deals and commissions. Management has the full view, and the close is done every month.
Where it stands.
The system works with real Holded data. As of 1 July 2026 it held 130 deals and 110 invoices. Phases 1 to 3 have been in production since 27 September 2026. It was built in about four weeks.
Stack used.
Next.jsSupabaseAutomationHoldedBI