Course contentsShow
← System Design
Lesson 1693 of 1,91941. Real-World System: Notification SystemFree lesson

Delivery Receipt Tracking

Capturing delivery confirmations, read receipts, and failure notifications from each channel provider.

Delivery Receipt Tracking

What you'll learn: How to capture and process delivery confirmations, read receipts, and failure notifications from various notification channel providers.

Why Track Delivery Receipts?

When your notification system sends messages through SMS, email, push notifications, or in-app channels, you need to know what actually happened. Did the message reach the user's device? Did they read it? Did delivery fail? This feedback loop is critical for retry logic, user engagement analytics, and debugging delivery issues.

Core Mechanism

Each channel provider (Twilio for SMS, SendGrid for email, Firebase for push) offers webhook callbacks or API endpoints that report message status. Your system must:

  1. Accept webhook requests from providers at dedicated endpoints (e.g., /webhooks/twilio, /webhooks/sendgrid)
  2. Authenticate the provider using signatures or tokens to prevent spoofing
  3. Parse provider-specific payloads to extract status information
  4. Normalize status codes into standard states: sent, delivered, read, failed, bounced
  5. Store receipt records in your database, linked to the original notification ID
  6. Trigger actions based on status (retry on failure, update analytics, alert on high bounce rates)

Think of It Like Package Tracking

When you send a package, the carrier gives you tracking updates: "In Transit," "Out for Delivery," "Delivered." Delivery receipts work the same way—providers tell you each step of your message's journey.

Example States

  • Email: sent → delivered → opened (tracking pixel) or bounced/spam
  • SMS: queued → sent → delivered or failed (invalid number)
  • Push: sent → delivered (reached device) → read (user opened)

Key Takeaway: Delivery receipt tracking creates an asynchronous feedback loop where channel providers report message status back to your system via webhooks, enabling retry logic, analytics, and reliable end-to-end delivery verification.