Pause Notification Service
Component Detail
Description
Handles dispatch of push and in-app notifications to coordinators when a peer mentor's pause status is activated, lifted, or automatically changed due to certification expiry. Resolves the assigned coordinator for a given peer mentor and formats audience-appropriate messages.
pause-notification-service
Summaries
Timely, accurate notifications are the operational nervous system that keeps coordinators informed when peer mentor availability changes, whether through a voluntary pause, a return to active duty, or an automatic certification lapse. This shared service ensures coordinators receive the right message through the right channel — push for immediate awareness, in-app with a direct deep link for action — the moment a status change occurs. By eliminating the latency between a status event and coordinator awareness, the organization reduces the risk of participants going without support and enables faster, more confident reallocation decisions across the program.
Medium-complexity shared backend service that is a delivery prerequisite for both pause-management-service and certification-expiry-checker — both depend on it for coordinator alerting, so it must be implemented early in the backend delivery sequence. Push notification integration requires selecting and configuring a provider (FCM for Android, APNs for iOS) and coordinating device token registration with the mobile team. Message copy for different trigger reasons (voluntary pause vs. automated certification expiry) requires content review by the product or program team.
Deep link generation must be agreed with the mobile navigation team before implementation. Testing scope includes all four notification events, push delivery, in-app delivery, coordinator resolution logic, and message formatting for each trigger type.
Shared backend notification service consumed by pause-management-service and certification-expiry-checker. Core interfaces: notifyPauseActivated(mentorId, expectedReturnDate?), notifyPauseLifted(mentorId), notifyCertExpiry(mentorId, expiryDate), notifyCertExpiryReminder(mentorId, daysRemaining). resolveCoordinatorForMentor(mentorId) queries peer-mentor-status-repository to determine coordinator assignment before dispatch. formatNotificationPayload(event, context) produces channel-appropriate message copy that varies based on trigger reason — voluntary pause copy differs from automated expiry copy.
Sends both push (via FCM/APNs provider) and in-app notifications; in-app payloads include a deep link to the mentor detail screen. The service must be idempotent for retry scenarios triggered by the nightly scheduler in case of transient failures.
Responsibilities
- Resolve coordinator assignment for a given peer mentor
- Send push notification for pause activation and deactivation events
- Send in-app notification with deep link to mentor detail
- Format notification copy based on trigger reason (voluntary pause vs. cert expiry)
Interfaces
notifyPauseActivated(mentorId, expectedReturnDate?)
notifyPauseLifted(mentorId)
notifyCertExpiry(mentorId, expiryDate)
notifyCertExpiryReminder(mentorId, daysRemaining)
resolveCoordinatorForMentor(mentorId)
formatNotificationPayload(event, context)
Relationships
Dependents (2)
Components that depend on this component
Used Integrations (1)
External integrations and APIs this component relies on