CRITICAL story-push-notifications-alerts-peer-mentor-003 5 pts

User Story

As a Peer Mentor (Likeperson)
I want to receive an immediate push notification on my device when a coordinator dispatches a new assignment to me, regardless of whether the app is open, backgrounded, or closed
So that So that I can respond promptly to new assignments without relying on coordinators to contact me through separate channels such as phone or email

Acceptance Criteria

  • Given a coordinator dispatches an assignment to a peer mentor, when the database record is inserted, then the Edge Function triggers within 30 seconds and enqueues a push notification via FCM/APNs
  • Given the peer mentor's app is in the foreground when the notification arrives, when the FCM message is received, then a local notification banner is displayed at the top of the screen
  • Given the peer mentor's app is backgrounded or terminated, when the FCM message is received, then a system tray notification is displayed
  • Given the peer mentor taps the push notification, when the app launches or comes to foreground, then the user is deep-linked directly to the relevant assignment detail
  • Given the peer mentor has disabled the 'New Assignments' notification category in settings, when an assignment is dispatched, then no push notification is sent

Business Value

Timely notification of new assignments is the single most critical engagement trigger in the system. HLF survey data shows 40% of peer mentors were dissatisfied with follow-up, and delays in assignment acknowledgement directly reduce the quality of support delivered to end users. Without push notifications, peer mentors must manually poll the app to discover new assignments, leading to multi-day delays. Automated, immediate push delivery on assignment dispatch eliminates this gap and removes the coordinator's burden of chasing acknowledgement through phone calls.