← Back to Documentation
Notification Routing
Flexible routing rules that determine which notifications go to which recipients based on event type, severity, and branch scope.
Event Matching
Routes match events based on type (obligation_due, ssl_expiry, etc.) and minimum severity threshold.
Branch Scope
Routes can be global (all branches) or branch-specific. Allows different alert destinations per location.
Connector Targeting
Each route specifies a connector (Email, Telegram, etc.) and recipient reference (email, chat_id, etc.).
Severity Levels
Routes use minimum severity thresholds. Events at or above the threshold will be sent through the route.
LowInformational, digest-worthy
MediumAction needed within lead time
HighUrgent, due or expiring soon
CriticalImmediate attention required
Route Configuration
interface NotificationRoute {
id: uuid; // Route identifier
tenantId: uuid; // Organization
branchId: uuid | null; // Specific branch or all
connectorId: uuid; // Channel to use
eventType: NotificationEventType; // Event filter
severityMin: Severity; // Minimum severity
recipientRef: string; // Email, chat_id, webhook URL
isActive: boolean; // Enable/disable
}Example Routing Rules
| Rule | Condition | Action | Scope |
|---|---|---|---|
| Critical Alerts to Management | Severity = Critical | Send to Head Office Admin via Email + Telegram | All branches |
| SSL Failures to IT Team | Event Type = SSL Failure | Send to SSL recipients via Email | All branches |
| Branch Manager Alerts | Event Type = Obligation Due | Send to Branch Manager via preferred channel | Specific branch |
| Weekly Digest | Event Type = Digest | Send summary to all users | All branches |
Route Resolution Algorithm
1. Event Occurs
System generates event with type and severity
2. Find Matching Routes
Query routes where: eventType matches AND severityMin <= event severity
3. Filter by Branch
Include routes with matching branchId OR global routes (branchId = null)
4. Create Deliveries
For each matching route, create a delivery via the connector
Routing Best Practices
- Create severity-based tiers: Critical alerts to management, routine to operators
- Use multiple channels: Critical alerts via Email + Telegram for redundancy
- Branch-specific routes: Route branch issues to respective managers
- Test connectors first: Verify connector health before creating routes