MEDIUM story-scenario-based-follow-up-prompts-peer-mentor-004 8 pts
8
Story Points
Medium
Priority
Scenario-based Follow-up Prompts
Feature

User Story

As a Peer Mentor (Likeperson)
I want to configure when scenario evaluation edge functions run and when resulting notifications are delivered — for example, restricting delivery to weekday business hours and avoiding evaluation runs during peak app usage times
So that peer mentors receive prompts at times when they are likely to be available to respond, reducing notification fatigue and respecting the voluntary nature of peer mentoring work

Acceptance Criteria

  • Given I am configuring a scenario rule, when I set an evaluation frequency (e.g., daily) and a delivery window (e.g., weekdays 09:00–17:00), then those constraints are saved and applied to the edge function schedule
  • Given an evaluation runs and a condition is met outside the configured delivery window, when the delivery window opens, then the queued notification is sent at the start of the next valid window
  • Given I configure a blackout period (e.g., holiday freeze), when the delivery window would normally open, then no notifications are sent during the blackout and they are discarded rather than queued
  • Given two scenario rules have conflicting schedules for the same mentor, when both are evaluated in the same cycle, then both notifications are delivered but spaced at least 30 minutes apart to prevent notification flooding
  • Given the edge function scheduler fails to run at the configured time, when it recovers, then it processes the missed evaluation within the next cycle without duplicating notifications already sent

Business Value

Notification timing significantly affects both open rates and user perception of the app. For a voluntary peer mentor workforce, intrusive out-of-hours notifications can damage engagement and cause opt-outs from the notification system entirely. By giving coordinators precise control over delivery windows, the system preserves the positive relationship between the organization and its volunteers while maintaining the effectiveness of automated follow-up.