Notification Scenarios
Feature Detail
Description
Notification Scenarios defines the rule engine that determines when notifications are triggered, which channel is used, and who receives them. Scenarios cover events such as assignment dispatch requiring acknowledgement within a deadline, activity registration approaching a reporting cutoff, expense claims pending approval for more than a threshold period, and coordinator follow-up reminders when a peer mentor has had no recorded contact with a contact for a configurable number of days. Each scenario is independently configurable per organization, enabling organizations to opt in or out of specific alert types.
Analysis
Ad-hoc notification dispatch without a scenario framework leads to inconsistent alert volumes, coordinator fatigue, and missed critical events. HLF's workshop feedback directly cited poor peer mentor follow-up as a top dissatisfaction driver - scenario-based reminders systematically address this without requiring coordinators to manually track individual timelines. For Blindeforbundet, automated reminders after 10 days of no contact on an open assignment are a compliance requirement, not a nice-to-have. Scenario configurability per organization prevents alert fatigue by letting each tenant tune thresholds to their operational cadence, reducing unsubscribe rates and maintaining notification channel health.
Scenarios are evaluated by a scheduled job running on the Next.js backend (Vercel Cron or an external scheduler), querying the database for entities matching trigger conditions and cross-referencing the notification_rules table for per-organization thresholds and enabled scenarios. Each scenario evaluation produces a notification event record before dispatch, enabling idempotency checks to avoid re-triggering the same alert within a cooldown window. The rule engine is data-driven rather than hardcoded - new scenarios are added by inserting rows into the scenario registry table, referencing the trigger entity type, condition expression, cooldown period, and default enabled state. Scenario evaluation logic must handle tenant isolation rigorously, never cross-joining data across organizations.
Components (45)
Shared Components
These components are reused across multiple features
User Interface (9)
Service Layer (15)
Data Layer (8)
Infrastructure (7)
User Stories
No user stories have been generated for this feature yet.