Build and Preview Scenario Notification Content Before Activation
Generic notifications like 'Please log your activity' are less effective than personalized ones like 'Hi Anna — it's been 12 days since your last activity log. Tap here to add one now.' The scenario notification content builder provides a template editor with a library of supported placeholders drawn from the peer mentor's profile and activity data. Coordinators write the message template, insert placeholders from a dropdown, and trigger a preview that renders a sample notification using test data. The rendered preview shows exactly how the notification will appear in both the device notification tray and the in-app notification centre. Once satisfied, the coordinator activates the rule and the content template is stored linked to the rule.
User Story
Acceptance Criteria
- Given I am editing a scenario rule, when I open the notification content section, then I see a text editor with a placeholder insertion toolbar listing available dynamic fields (name, days inactive, certification expiry, etc.)
- Given I insert a placeholder into the message body, when I view the preview, then the placeholder is replaced with realistic sample data appropriate to the placeholder type
- Given I submit a message template that exceeds the 100-character push notification title limit, when I try to save, then a validation error is shown indicating the title must be shortened
- Given the content template includes a placeholder that references data not available for a specific mentor, when the notification is generated for that mentor, then the placeholder is replaced with a sensible default (e.g., 'recently' for an unknown date) rather than a raw template token
- Given I activate a scenario rule with a completed content template, when the first batch of notifications is dispatched, then the rendered messages contain the correct personalized content matching the template
Business Value
Personalized, well-crafted notifications significantly outperform generic ones in open and action rates. For HLF, where scenario-based prompts are the primary mechanism for improving the 40% mentor dissatisfaction rate with follow-up quality, the quality of the notification content is as important as the timing. A content builder with preview capability ensures coordinators can iterate on messaging without deploying broken or confusing notifications to the entire mentor roster.