Receive Notification When a Peer Mentor Sets or Lifts an Availability Pause
When a peer mentor updates their availability status to 'paused' or back to 'active' via the Pause Management Service, a Supabase database webhook triggers the Notification Scenario Engine. The engine identifies the coordinator(s) responsible for that peer mentor and enqueues a targeted push notification. The notification clearly states the peer mentor's name, the action taken (paused or resumed), and the reason if one was provided. The coordinator is deep-linked to the Peer Mentor Detail Screen showing the current availability status and pause history. If the peer mentor is the last available mentor in a geographic area, the notification may include an urgency indicator to alert the coordinator of coverage gaps.
User Story
Acceptance Criteria
- Given a peer mentor sets their status to 'paused', when the pause is saved to the database, then the responsible coordinator receives a push notification within 60 seconds identifying the peer mentor and the pause action
- Given a peer mentor resumes availability by lifting a pause, when the status update is saved, then the responsible coordinator receives a notification confirming the mentor's return to active status
- Given a peer mentor provides a pause reason (e.g., 'holiday until March 15'), when the coordinator notification is sent, then the reason is included in the notification body
- Given a coordinator has disabled the 'Peer Mentor Availability Changes' category, when a mentor in their scope changes availability, then no push notification is sent to that coordinator
- Given a coordinator taps the availability change notification, when the app navigates, then they land on the Peer Mentor Detail Screen showing the mentor's current availability status and history
Business Value
Assignment planning depends on knowing which peer mentors are available at any given time. Without real-time availability notifications, coordinators may dispatch assignments to paused mentors, leading to acknowledgement failures and delayed responses. Automated pause notifications ensure coordinators have immediate awareness of capacity changes, enabling them to reroute assignments and maintain service continuity. This is particularly important for organizations like NHF with large mentor pools spread across regions, where manual availability tracking is impractical.
Components
- Notification Scenario Engine service
- Push Notification Service service
- Push Notification Gateway infrastructure
- Notification Repository data