Preferences as a matrix
Users want control over what they hear about and how. The model is usually a matrix of category by channel: marketing email on, product push off, security alerts always on.
Storing choices
- A preference store keyed by user and category holds the allowed channels.
- Defaults apply when a user has never chosen, often opt in for marketing and on for critical alerts.
- Some categories are mandatory, like security or legal notices, and cannot be disabled.
Enforcing at send time
Before any channel worker runs, the processing layer checks preferences and drops or reroutes the message. Doing this once in the core prevents teams from accidentally bypassing a user opt out.
Edge cases
A user may opt out of a channel entirely, like all SMS, which overrides per category settings. Preference changes must take effect quickly, so caches need short lifetimes or invalidation.
Key idea
User preferences form a category by channel matrix the core enforces at send time so opt outs are always respected.