Receive Instant Push Notification When a Badge Is Unlocked
When the Achievement Service determines that a user has crossed a badge threshold — triggered as a background job after each activity save or period-end calculation — it emits a badge award event that calls the Push Notification Service. The notification is delivered to the user's device with the badge name and a short congratulatory message. Deep-linking from the notification takes the user directly to the Achievements screen. The notification is also recorded in the notification repository so it appears in the user's notification history.
User Story
Acceptance Criteria
- Given a user completes an activity that crosses a badge threshold, when the Achievement Service background job runs, then a push notification is dispatched within 60 seconds
- Given a push notification is sent for a badge award, when the user taps the notification, then the app opens directly to the Achievements screen with the newly unlocked badge visible
- Given the user has disabled push notifications for the app, when a badge is awarded, then no push notification is sent but the badge is still recorded as earned in the database
- Given a badge is awarded, when the notification is sent, then the notification text includes the badge name and a congratulatory message in English
- Given multiple badges are earned simultaneously (e.g. after a bulk registration), when the Achievement Service runs, then each badge award generates a separate notification
Business Value
Immediate notification at the moment of achievement maximises the motivational impact of the recognition programme. Delayed or silent badge awards reduce the perceived value of the recognition. Real-time feedback is a well-documented driver of volunteer engagement and is especially important for users who may only open the app infrequently.
Components
- Achievement Service service
- Push Notification Service service
- Achievements Screen ui