Skip to main content
The Commission domain does not emit its own domain events. Commission lines are derived data, so instead of broadcasting changes, the module subscribes to order lifecycle events and recomputes lines whenever an order’s composition changes.

Events it reacts to

Mercur ships a subscriber (order-commission-refresh-handler) that re-runs refreshOrderCommissionLinesWorkflow for the affected order on each of these events: Because the refresh is idempotent (delete-then-insert), reacting to several events for the same order never duplicates lines.

Run your own side effects

To run logic when an order’s commission changes, subscribe to the same order events the module listens to, then read the refreshed lines from the commission module.
src/subscribers/commission-changed.ts
Commission is also refreshed at checkout, as each per-seller order is created from the split cart. That refresh happens as a step inside the checkout workflow rather than via a separate event.