Notifications
Overview
LandlordX uses a multi-channel notification system to keep landlords and tenants informed about important events throughout the rental lifecycle. Notifications are triggered automatically at key workflow stages and delivered via WhatsApp, email, SMS, or in-app channels.
Notification Channels
| Channel | Use Case | Priority |
|---|---|---|
| Primary for tenants, quick updates | Highest | |
| Formal notifications, document sharing | Medium | |
| SMS | Fallback when WhatsApp unavailable | Low |
| In-App | Real-time updates in PWA | Immediate |
Notification Types
enum NotificationType {
RENT_DUE = "rent_due", // Rent payment reminder
RENT_REMINDER = "rent_reminder", // Follow-up reminder
PAYMENT_RECEIVED = "payment_received", // Payment confirmation
AGREEMENT_EXPIRING = "agreement_expiring", // Agreement renewal notice
MAINTENANCE_REQUEST = "maintenance_request", // New maintenance ticket
MAINTENANCE_UPDATE = "maintenance_update", // Status update
GENERAL = "general", // Other notifications
}Notification Triggers by Workflow
User Onboarding
| Event | Recipients | Channels | Message |
|---|---|---|---|
| OTP requested | User | SMS | 6-digit OTP code |
| Profile created | User | Welcome + getting started guide | |
| KYC verified | User | WhatsApp, Email | Verification success + next steps |
| Account suspended | User | Email, SMS | Reason + appeal process |
Property Listing
| Event | Recipients | Channels | Message |
|---|---|---|---|
| Property created | Landlord | In-App | Property added successfully |
| Property approved | Landlord | WhatsApp, Email | Property ready for listings |
| Unit made available | Landlord | In-App | Unit available for agreements |
Lease Agreement
| Event | Recipients | Channels | Message |
|---|---|---|---|
| Draft saved | Landlord | In-App | Agreement saved as draft |
| Agreement published | Landlord, Tenant | WhatsApp, Email | Agreement ready for signing |
| Signature reminder | Pending signer | Reminder to complete signing | |
| Landlord signed | Tenant | Your turn to sign | |
| Agreement active | Landlord, Tenant | WhatsApp, Email, In-App | Agreement now active |
| Agreement expiring (30d) | Landlord, Tenant | WhatsApp, Email | Renewal reminder |
| Agreement expiring (7d) | Landlord, Tenant | WhatsApp, SMS | Urgent renewal notice |
| Agreement completed | Landlord, Tenant | Agreement ended, summary | |
| Agreement terminated | Landlord, Tenant | WhatsApp, Email | Early termination notice |
Rent Collection
| Event | Recipients | Channels | Message |
|---|---|---|---|
| Rent due (5 days before) | Tenant | Rent of ₹X due on [date] | |
| Rent due (on date) | Tenant | WhatsApp, SMS | Rent ₹X due today |
| Rent overdue (3 days) | Tenant | Rent overdue, pay now | |
| Rent overdue (7 days) | Tenant, Landlord | WhatsApp, Email | Late fee applied |
| Payment initiated | Tenant | In-App | Processing payment |
| Payment successful | Tenant, Landlord | WhatsApp, In-App | Payment of ₹X received |
| Payment failed | Tenant | WhatsApp, SMS | Payment failed, retry |
| Payout processed | Landlord | WhatsApp, Email | ₹X deposited to account |
Maintenance Requests
| Event | Recipients | Channels | Message |
|---|---|---|---|
| Request created | Landlord/Manager | WhatsApp, In-App | New maintenance request |
| Request assigned | Tenant | Request assigned to [name] | |
| Status: In Progress | Tenant | Work in progress | |
| Status: Resolved | Tenant | WhatsApp, In-App | Issue resolved |
| Feedback requested | Tenant | Rate the resolution |
Notification Data Model
interface Notification {
id: number;
user_id: number; // Recipient
type: NotificationType; // Category
channel: NotificationChannel; // Delivery channel
title: string; // Short title
message: string; // Full message content
metadata?: {
agreement_id?: number;
payment_id?: number;
property_id?: number;
maintenance_request_id?: number;
action_url?: string; // Deep link
};
status: NotificationStatus; // pending | sent | delivered | failed | read
sent_at?: Date; // When sent
delivered_at?: Date; // When delivered
read_at?: Date; // When read/opened
error_message?: string; // If failed
}Notification Status Flow
Channel Selection Logic
Notification Templates
WhatsApp Templates
WhatsApp messages use pre-approved templates:
📋 *Rent Reminder*
Hi {tenant_name}! Your rent of ₹{amount} for {property_name} is due on {due_date}.
Pay now: {payment_link}✅ *Payment Received*
Payment of ₹{amount} received for {property_name}.
Transaction ID: {txn_id}
Thank you!📄 *Agreement Ready*
Your rental agreement for {property_name} is ready to sign.
Review & Sign: {signing_link}Email Templates
Emails are HTML templates with:
- LandlordX branding header
- Clear subject line
- Detailed content
- Call-to-action buttons
- Footer with support contact
SMS Templates
SMS messages are concise:
[LandlordX] Your rent of Rs.{amount} is due on {date}. Pay at {short_link}Notification Preferences
Users can configure preferences:
interface NotificationPreferences {
user_id: number;
// Channel preferences
whatsapp_enabled: boolean; // Default: true
email_enabled: boolean; // Default: true
sms_enabled: boolean; // Default: true
in_app_enabled: boolean; // Default: true
// Type preferences
rent_reminders: boolean; // Default: true
payment_confirmations: boolean; // Default: true
maintenance_updates: boolean; // Default: true
promotional: boolean; // Default: false
// Timing preferences
reminder_days_before: number; // Default: 5
quiet_hours_start?: string; // e.g., "22:00"
quiet_hours_end?: string; // e.g., "08:00"
}Delivery Tracking
Error Handling & Retry
| Error Type | Retry Strategy | Fallback |
|---|---|---|
| WhatsApp delivery failed | 3 retries over 1 hour | Switch to SMS |
| SMS delivery failed | 2 retries over 30 mins | Email notification |
| Email bounce | 1 retry, then flag address | In-app notification |
| In-app delivery failed | 3 retries | Store for next login |
Notification Batch Processing
For scheduled notifications like rent reminders:
Related Documentation
- WhatsApp Experience - WhatsApp-specific flows
- Lease Agreement Generation - Agreement notifications
- Lease Agreement Generation & Signing - Agreement and signing notifications
- User Onboarding - Onboarding notifications