Notifications

Status: Accepted Owner: @bilal Last Updated: 2026-02-15

When, what, and how notifications are sent across the platform.

Notification Matrix

EventLandlordTenantVendor
Issue createdSMS + EmailSMS (confirmation)
Vendor assignedSMS + Email
Vendor acceptsSMSSMS
Vendor declinesSMS
Issue completedEmailSMS + Email
Rating requestedSMS
SLA breachSMS

Channels

ChannelProviderBest For
SMSTwilioUrgent notifications, tenant confirmations
EmailSendGridDetailed info, landlord summaries
WhatsAppTwilio / Meta APITenant conversations (future)

Channel Selection

UrgencyLandlordTenantVendor
EmergencySMS immediatelySMSSMS
HighSMS + EmailSMSSMS + Email
MediumEmailSMSSMS + Email
LowEmail (batched)SMSEmail

Processing

All notifications routed through n8n workflows:

Database trigger → n8n webhook → Route by event type → Send via channel

Error Handling

ScenarioHandling
SMS failsRetry 3x, fallback to email
Email failsRetry 3x, log error
Invalid phoneSkip SMS, log warning
Rate limitQueue and retry with backoff

Logging

All notifications logged to events table with: issue_id, type (notification_sent), channel, recipient, template.

Templates

Templates managed in SendGrid (email) and code (SMS). Key variables:

{{organisation_name}}, {{property_address}}, {{room_number}}, {{issue_description}}, {{issue_category}}, {{issue_urgency}}, {{vendor_name}}, {{accept_link}}, {{dashboard_link}}

Future: Notification Preferences

See ADR-005 Notification Preferences.

Planned: per-user channel preference, quiet hours, digest mode, per-event opt-out.