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

ChannelUse CasePriority
WhatsAppPrimary for tenants, quick updatesHighest
EmailFormal notifications, document sharingMedium
SMSFallback when WhatsApp unavailableLow
In-AppReal-time updates in PWAImmediate

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

EventRecipientsChannelsMessage
OTP requestedUserSMS6-digit OTP code
Profile createdUserEmailWelcome + getting started guide
KYC verifiedUserWhatsApp, EmailVerification success + next steps
Account suspendedUserEmail, SMSReason + appeal process

Property Listing

EventRecipientsChannelsMessage
Property createdLandlordIn-AppProperty added successfully
Property approvedLandlordWhatsApp, EmailProperty ready for listings
Unit made availableLandlordIn-AppUnit available for agreements

Lease Agreement

EventRecipientsChannelsMessage
Draft savedLandlordIn-AppAgreement saved as draft
Agreement publishedLandlord, TenantWhatsApp, EmailAgreement ready for signing
Signature reminderPending signerWhatsAppReminder to complete signing
Landlord signedTenantWhatsAppYour turn to sign
Agreement activeLandlord, TenantWhatsApp, Email, In-AppAgreement now active
Agreement expiring (30d)Landlord, TenantWhatsApp, EmailRenewal reminder
Agreement expiring (7d)Landlord, TenantWhatsApp, SMSUrgent renewal notice
Agreement completedLandlord, TenantEmailAgreement ended, summary
Agreement terminatedLandlord, TenantWhatsApp, EmailEarly termination notice

Rent Collection

EventRecipientsChannelsMessage
Rent due (5 days before)TenantWhatsAppRent of ₹X due on [date]
Rent due (on date)TenantWhatsApp, SMSRent ₹X due today
Rent overdue (3 days)TenantWhatsAppRent overdue, pay now
Rent overdue (7 days)Tenant, LandlordWhatsApp, EmailLate fee applied
Payment initiatedTenantIn-AppProcessing payment
Payment successfulTenant, LandlordWhatsApp, In-AppPayment of ₹X received
Payment failedTenantWhatsApp, SMSPayment failed, retry
Payout processedLandlordWhatsApp, Email₹X deposited to account

Maintenance Requests

EventRecipientsChannelsMessage
Request createdLandlord/ManagerWhatsApp, In-AppNew maintenance request
Request assignedTenantWhatsAppRequest assigned to [name]
Status: In ProgressTenantWhatsAppWork in progress
Status: ResolvedTenantWhatsApp, In-AppIssue resolved
Feedback requestedTenantWhatsAppRate 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 TypeRetry StrategyFallback
WhatsApp delivery failed3 retries over 1 hourSwitch to SMS
SMS delivery failed2 retries over 30 minsEmail notification
Email bounce1 retry, then flag addressIn-app notification
In-app delivery failed3 retriesStore for next login

Notification Batch Processing

For scheduled notifications like rent reminders: