Notification Architecture
Organization-Level Notifications
Notifications are created per organization, not per user. All organizers in the same organization see the same notification events.Organizer-Level Preferences & Read Status
- Preferences: Each organizer can customize which notification types they want to receive
- Read Status: Read/unread state is tracked per organizer, so each person has their own unread count
This design ensures everyone on the team is aware of events, while allowing individual control over what they see.
Notification Types
Participant Activity
Participant Joined
Participant Joined
Type:
participant_joinedWhen it fires: A participant starts taking a testBatching: Groups events within 5 minutes, shows up to 3 participant namesExample:Test Submitted
Test Submitted
Type:
participant_submittedWhen it fires: A participant completes all sections and submits their testBatching: Groups events within 5 minutes, shows up to 3 participant namesExample:Suspicious Activity
Suspicious Activity
Type:
suspicious_activityWhen it fires: Tab switching or window blur is detected during a testBatching: Groups events within 10 minutes, shows up to 5 participant namesExample:Test Lifecycle
Test Auto-Activated
Test Auto-Activated
Type:
test_auto_activatedWhen it fires: A scheduled test goes live automaticallyBatching: None (each event is important)Example:Test Auto-Finished
Test Auto-Finished
Type:
test_auto_finishedWhen it fires: A scheduled test ends automaticallyBatching: None (each event is important)Example:Submissions Ready for Grading
Submissions Ready for Grading
Type:
submissions_readyWhen it fires: Test has submissions that need manual gradingBatching: None (each event is important)Example:Organization Events
New Team Member
New Team Member
Type:
member_joinedWhen it fires: Someone accepts an invitation to join the organizationBatching: Groups events within 1 hour, shows up to 3 member namesExample:Usage & Limits
Concurrent Participants Limit
Concurrent Participants Limit
Type:
concurrent_participants_limitWhen it fires: Participant limit is reached during a testBatching: Groups events within 30 minutes (prevents spam)Example:Active Tests Limit
Active Tests Limit
Type:
active_tests_limitWhen it fires: You can’t publish more tests due to plan limitsBatching: Groups events within 30 minutesExample:AI Generation Limit
AI Generation Limit
Type:
ai_generation_limitWhen it fires: AI question generation quota is reachedBatching: Groups events within 1 hourExample:Notification Batching
How Batching Works
Evaly uses an Instagram-style batching system:Time Window
Events of the same type within a time window are grouped together.Example: 5 participants joining within 5 minutes = 1 batch notification
Batch Configuration
windowMinutes: 0 means no batching - each event creates a separate notification.Managing Preferences
Get Current Preferences
Update Preferences
Only provide the preferences you want to change. Omitted fields remain unchanged.
Notification Queries
Get Notifications (Paginated)
Get Unread Count
Mark as Read
Creating Notifications
Notifications are created asynchronously via the scheduler:Database Schema
notification
Individual notification events:notificationBatch
Batched notifications for display:notificationRead
Per-organizer read status:organizerNotificationPreferences
Per-organizer notification settings:Cleanup & Maintenance
Old notifications can be cleaned up periodically:This can be scheduled as a cron job to run weekly or monthly.
Adding New Notification Types
To add a new notification type:Best Practices
- Use batching for high-frequency events to prevent notification fatigue
- Disable batching for critical events that require immediate attention
- Set appropriate time windows based on expected event frequency
- Provide clear metadata to give organizers context about what happened
- Test notification preferences before deploying new types
- Schedule cleanup to prevent database bloat from old notifications
- Use descriptive names in preview lists to help organizers identify participants
Related Features
- Test Scheduling - Notifications fire when scheduled tests activate/finish
- Access Control - Notifications when participants join restricted tests