Status: Accepted decision (roles-not-people) + Open defect (the id collision). 2026-07-21.

Context

A notification rule needs a target audience. Two obvious options: name individuals, or target roles. Individuals break the moment someone changes jobs; roles stay correct as membership changes.

Decision (the sound part)

Target roles. CustomNotificationEntity.RoleId stores the recipient role, and GetEntities offers the pickable set:

  1. A hardcoded list of admin tiers (Role.PRIMARY_ADMIN, SECONDARY_ADMIN, PAYROLL_ADMIN, PAYROLL_REPORTS_AND_TAX_FILINGS_ADMIN, then string literals "Benefits Admin", "IT Admin", "Assets Admin", "Performance Admin", …).
  2. The company's custom roles, appended from MembershipService.GetRoleList(false).

Roles-not-people is correct — a rule keeps working as staff churn (see user-journey D).

The defect

The hardcoded list is buggy. In GetEntities:

var item4 = new(...) { id = 4, text = Role.PAYROLL_REPORTS_AND_TAX_FILINGS_ADMIN };
var item5 = new(...) { id = 5, text = Role.PAYROLL_REPORTS_AND_TAX_FILINGS_ADMIN };
var item6 = new(...) { id = 6, text = Role.PAYROLL_REPORTS_AND_TAX_FILINGS_ADMIN };

Ids 4, 5, and 6 all map to the same role — a copy-paste error (they were presumably meant to be three different roles). A large commented-out block of ~20 further role items sits alongside, indicating an unfinished rework of this list.

Consequences

Good (the decision):

Bad (the defect):

Recommendation