Skip to main content

Notification Types Catalog

Complete catalog of all notification types in the Tellus EHS platform — implemented, planned, and future.

Table of Contents

  1. General Platform Notifications (25 types)
  2. Training Notifications (7 types)
  3. Email-Worthy Types
  4. Future Module Notifications
  5. Notification Type Trigger Map
  6. Settings & Preferences per Type

General Platform Notifications

Stored in unified notifications table. 25 general types across 6 categories + 7 training types.

Category: workflow (Plan Lifecycle)

TypeTitle TemplateMessage TemplateTrigger PointRecipientsStatus
plan_created"New Plan Created""{actor_name} created plan '{plan_name}'"HazComPlanService.create_plan()All company users (minus actor)Implemented
plan_published"Plan Published""{actor_name} published plan '{plan_name}'"POST /api/v1/hazcom/plans/:id/publishAll company users (minus actor)Implemented
plan_archived"Plan Archived""{actor_name} archived plan '{plan_name}'"POST /api/v1/hazcom/plans/:id/archiveAll company users (minus actor)Implemented
plan_shared"Plan Shared With You""{actor_name} shared plan '{plan_name}' with you"Plan sharing APISpecific shared usersImplemented
section_completed"Section Completed""{actor_name} completed section '{section_name}' in plan '{plan_name}'"Section update APIPlan collaboratorsImplemented
plan_approved"Plan Approved""{actor_name} approved plan '{plan_name}'"Approval workflowPlan owner + reviewersImplemented
plan_rejected"Plan Rejected""{actor_name} rejected plan '{plan_name}'"Approval workflowPlan ownerImplemented
plan_comment"New Comment on Plan""{actor_name} commented on plan '{plan_name}'"Comment APIPlan collaborators (minus actor)Implemented
plan_revision_requested"Revision Requested""{actor_name} requested revision for plan '{plan_name}'"Review workflowPlan ownerImplemented

Category: inventory (Chemical Inventory)

TypeTitle TemplateMessage TemplateTrigger PointRecipientsStatus
chemical_added"New Chemical Added""{actor_name} added '{chemical_name}' to {site_name}"POST /api/v1/chemiq/inventorySite usersImplemented
chemical_updated"Chemical Updated""{actor_name} updated '{chemical_name}' at {site_name}"PUT /api/v1/chemiq/inventory/:idSite usersImplemented
chemical_removed"Chemical Removed""{actor_name} removed '{chemical_name}' from {site_name}"DELETE /api/v1/chemiq/inventory/:idSite usersImplemented
inventory_import_complete"Import Complete""Bulk import completed: {success_count} chemicals added, {error_count} errors"Background: handle_bulk_import()Import initiatorImplemented
sds_attached"SDS Attached""SDS for '{product_name}' has been attached automatically"Background: handle_sds_search()Chemical owner / site coordinatorImplemented
sds_expiring"SDS Expiring Soon""SDS for '{product_name}' expires in {days} days"Scheduled checkSite coordinatorPlanned

Category: compliance (Compliance & Reporting)

TypeTitle TemplateMessage TemplateTrigger PointRecipientsStatus
compliance_gap_detected"Compliance Gap Detected""{gap_count} compliance gaps found at {site_name}"Compliance check serviceSite coordinator + adminsPlanned
compliance_status_changed"Compliance Status Changed""{site_name} compliance status changed to '{new_status}'"Compliance updateCompany adminsPlanned
audit_scheduled"Audit Scheduled""Compliance audit scheduled for {site_name} on {date}"Audit schedulingSite coordinatorPlanned
quantity_threshold_exceeded"Quantity Threshold Exceeded""Chemical '{chemical_name}' exceeded threshold at {site_name}"Background: handle_quantity_recalculation()Site coordinatorPlanned

Category: ai (AI-Generated Content)

TypeTitle TemplateMessage TemplateTrigger PointRecipientsStatus
ai_generation_started"AI Generation Started""AI content generation started for plan '{plan_name}'"Background: handle_hazcom_ai_generate()Plan ownerImplemented
ai_generation_completed"AI Generation Complete""AI content generation completed for plan '{plan_name}'"Background: handle_hazcom_ai_generate()Plan ownerImplemented
ai_generation_failed"AI Generation Failed""AI content generation failed for plan '{plan_name}': {error}"Background: handle_hazcom_ai_generate()Plan ownerImplemented
ai_prefill_completed"AI Prefill Complete""AI questionnaire prefill completed for plan '{plan_name}'"Background: handle_hazcom_ai_prefill()Plan ownerImplemented

Category: export (Document Export)

TypeTitle TemplateMessage TemplateTrigger PointRecipientsStatus
export_ready"Export Ready""Your {export_type} export is ready for download"Background: handle_report_generate()Requesting userImplemented
export_failed"Export Failed""Your {export_type} export failed: {error}"Background: handle_report_generate()Requesting userImplemented

Category: labels (EPA Labels)

TypeTitle TemplateMessage TemplateTrigger PointRecipientsStatus
label_found"EPA Label Found""EPA label found for product '{product_name}'"Background: handle_epa_label_search()Requesting userImplemented
label_not_found"EPA Label Not Found""No EPA label found for product '{product_name}'"Background: handle_epa_label_search()Requesting userImplemented

Training Notifications

Category: training (7 types)

Stored in the unified notifications table (merged from SafePath in Phase 1).

TypeTitle TemplateMessage TemplateTrigger PointRecipientsDedup WindowStatus
training_assigned"Training Assigned""You have been assigned '{course_title}'. Due: {due_date}"Auto-assignment engine, manual assignment, background handlersAssigned userImplemented
training_reminder"Training Reminder""'{course_title}' is due in {days} days"SafePathScheduler.send_training_reminders()Assigned user72 hoursImplemented
training_overdue"Training Overdue""'{course_title}' is overdue by {days} days"SafePathScheduler.check_overdue_assignments()Assigned user24 hoursImplemented
training_completed"Training Completed""{user_name} completed '{course_title}'"Course completion APIUser's manager + adminsImplemented
cert_expiring"Certification Expiring""'{cert_name}' expires in {days} days"SafePathScheduler.check_expiring_certifications()Cert holder7 daysImplemented
cert_expired"Certification Expired""'{cert_name}' has expired"Scheduler (past expiry date)Cert holderImplemented
cert_renewed"Certification Renewed""'{cert_name}' has been renewed, valid until {new_expiry}"Cert renewal APICert holderImplemented

Email-Worthy Types

Added in Phase 2. These 15 types trigger email delivery via Mailgun when the notification is created. Users can opt out via email_notifications_enabled on their profile.

CategoryTypeEmail?UrgencyReason
workflowplan_approvedYesNormalMajor event
workflowplan_rejectedYesWarningRequires action
workflowplan_publishedYesNormalMajor event
inventorychemical_bulk_importedYesNormalUser is waiting
inventorysds_expiringYesWarningAction required
compliancequantity_threshold_exceededYesUrgentSafety-critical
complianceplan_review_dueYesWarningAction required
complianceplan_overdueYesUrgentOverdue
aiai_generation_completedYesNormalUser is waiting
aiai_generation_failedYesUrgentAction needed
trainingtraining_assignedYesNormalAction required
trainingtraining_reminderYesWarningTime-sensitive
trainingtraining_overdueYesUrgentSafety compliance
trainingcert_expiringYesWarningTime-sensitive
trainingcert_expiredYesUrgentSafety compliance

Email styling by urgency:

  • Urgent (red banner): training_overdue, cert_expired, plan_overdue, ai_generation_failed, quantity_threshold_exceeded
  • Warning (amber banner): training_reminder, cert_expiring, sds_expiring, plan_review_due, plan_rejected
  • Normal (blue banner): All other email-worthy types

Future Module Notifications

These are notification types planned for future modules (not yet implemented):

AdminHQ Module (Planned)

TypeDescription
user_invitedNew user invited to company
user_accepted_inviteInvited user accepted and joined
user_role_changedUser's role was modified
subscription_expiringCompany subscription nearing renewal
subscription_renewedSubscription successfully renewed
billing_payment_failedPayment processing failed

Incident Module (Future)

TypeDescription
incident_reportedNew incident report submitted
incident_assignedIncident investigation assigned
incident_resolvedIncident marked as resolved
near_miss_reportedNear-miss event reported

Inspection Module (Future)

TypeDescription
inspection_scheduledUpcoming workplace inspection
inspection_overdueInspection past due date
inspection_completedInspection completed with findings
corrective_action_requiredCorrective action needed from inspection

Emergency Response Module (Future)

TypeDescription
drill_scheduledEmergency drill scheduled
drill_completedDrill completed with results
emergency_plan_updatedEmergency response plan updated

Trigger Map

Complete mapping of notification type -> trigger point -> code location -> recipients.

General Notifications

#TypeTrigger EventCode LocationRecipientsChannel
1plan_createdPlan created via APIapp/api/v1/hazcom/plans.py -> NotificationService.notify_plan_event()Company users - actorIn-app + SSE
2plan_publishedPlan publishedapp/api/v1/hazcom/plans.py -> NotificationService.notify_plan_event()Company users - actorIn-app + SSE + Email
3plan_archivedPlan archivedapp/api/v1/hazcom/plans.py -> NotificationService.notify_plan_event()Company users - actorIn-app + SSE
4plan_sharedPlan shared with userPlan sharing API -> NotificationService.notify_user()Specific usersIn-app + SSE
5section_completedPlan section completedSection update API -> NotificationService.notify_plan_event()Plan collaboratorsIn-app + SSE
6plan_approvedPlan approved in workflowApproval API -> NotificationService.notify_plan_event()Plan owner + reviewersIn-app + SSE + Email
7plan_rejectedPlan rejected in workflowApproval API -> NotificationService.notify_plan_event()Plan ownerIn-app + SSE + Email
8plan_commentComment added to planComment API -> NotificationService.notify_plan_event()Collaborators - actorIn-app + SSE
9plan_revision_requestedRevision requestedReview API -> NotificationService.notify_plan_event()Plan ownerIn-app + SSE
10chemical_addedChemical added to inventoryapp/api/v1/chemiq/inventory.pySite usersIn-app + SSE
11chemical_updatedChemical updatedapp/api/v1/chemiq/inventory.pySite usersIn-app + SSE
12chemical_removedChemical removedapp/api/v1/chemiq/inventory.pySite usersIn-app + SSE
13inventory_import_completeBulk import finishedBackground: handle_bulk_import()Import initiatorIn-app (async) + Email
14sds_attachedSDS auto-attached to productBackground: handle_sds_search()Requesting userIn-app (async)
15sds_expiringSDS approaching 3-year expiryScheduled job (not implemented)Site coordinatorPlanned
16-19compliance_*Various compliance eventsNot implementedVariousPlanned
20ai_generation_startedAI content gen beginsBackground handlerPlan ownerIn-app (async)
21ai_generation_completedAI content gen succeedsBackground handlerPlan ownerIn-app (async) + Email
22ai_generation_failedAI content gen failsBackground handlerPlan ownerIn-app (async) + Email
23ai_prefill_completedAI questionnaire prefill doneBackground handlerPlan ownerIn-app (async)
24export_readyReport/export readyBackground handlerRequesting userIn-app (async)
25export_failedReport/export failedBackground handlerRequesting userIn-app (async)

Training Notifications

#TypeTrigger EventCode LocationRecipientsChannel
1training_assignedManual or auto assignmentAssignment API / handle_safepath_rule_evaluate() / handle_safepath_plan_retraining()Assigned userIn-app + Email
2training_reminderDue date approachingSafePathScheduler.send_training_reminders()Assigned userIn-app + Email
3training_overduePast due dateSafePathScheduler.check_overdue_assignments()Assigned userIn-app + Email
4training_completedUser completes courseCourse completion APIManager + adminsIn-app
5cert_expiringCert approaching expirySafePathScheduler.check_expiring_certifications()Cert holderIn-app + Email
6cert_expiredCert past expiry dateScheduler (check after expiry)Cert holderIn-app + Email
7cert_renewedCert renewed/extendedCertification renewal APICert holderIn-app

Settings Per Type

Global Email Toggle (Phase 2)

  • email_notifications_enabled on core_data_users table (default: true)
  • Controls all email delivery globally
  • API: GET/PUT /api/v1/notifications/email-preference

Per-Category Preferences (Tier 2 — Planned)

See Notification Preferences Plan for detailed implementation plan.

Background Service Settings

SettingValueDescription
Overdue dedup window24 hoursDon't re-notify overdue within this window
Reminder dedup window72 hoursDon't re-remind within this window
Cert alert dedup window7 daysDon't re-alert cert expiry within this window
Notification TTL90 daysWhen notifications auto-expire