Where it started
The entire sales operation lived in a no-code tool where one status field triggered a cascade of automations. The status had become the data: there was no way to know what had actually happened, nor to recompute a commission without replaying history by hand. Signed and collected were mixed into the same table.
What we built
We inverted the causality. The application records facts — an appointment has an outcome, a sale is signed, a payment arrives — and the pipeline stage is now only a projection of that history. Commissions are emitted by explicit rules at the moment of the fact, and become immutable. Signed and collected are finally two distinct notions.
What changed
A commission is justified by tracing back to the sale that produced it. Reporting recomputes from facts rather than from a current state, and fixing a historical error no longer breaks the running month.