Status: Accepted (in force). Verified 2026-07-21.

Context

Notifications hook onto events that move through an approval lifecycle: something is created, then approved or rejected. Different audiences care about different points — approvers need the "created" signal, finance needs "approved," a manager needs "rejected." The routing model has to express which point.

Decision

Give every notification type exactly three stages — Creation, Approval, Rejection — and let a rule target one. In code, the three per-type records are addressed by composed name:

GetByName($"{notificationType.Description} Creation", companyId);
GetByName($"{notificationType.Description} Approval",  companyId);
GetByName($"{notificationType.Description} Rejection", companyId);

The frontend mirrors it: STAGES = [{1,Creation},{2,Approval},{3,Rejection}], and getStageIdFromDescription parses the stage back out of the "{Type} {Stage}" string.

Consequences

Good:

Bad / costs:

Alternatives

Guidance