2026-03-02 - System Notifications

From Izara Wiki
Jump to navigation Jump to search

Notes

  • System notifications can be sent by any flow, eg Issues juror request
  • Want to central list available for example notification page
  • Each project has it's own system notifications, manages it's own notifcation schema

Data Structures

  • notificationType and notificationTypeId standard data structures
  • userSystemNotification objType in UserContactManager in dynamo
  • defaultNotificationUserContact in graph

Notification Schema

  • Each service has a file in schema folder for notifications the service is responsible for
  • Grouping categorizes notification, for example to show on notification setting page
  • Grouping categories can be shared across multiple services
  • Weight affects the notification's order when listed with other notifications, eg: per category in notification settings
[
	{
		notificationTag: "xxx",
		notificationGrouping: "yyy",
		weight: "##",
	},
	// ...
]

Generating S3 Schema

  • After deploy service can invoke to update S3 notifcation schemas for that service
  • Iterate service's notificaton schema and add notificationTag accroding to it's notificationGrouping
  • Add serviceTag so each notification is identified by it's serviceTag and notificationTag

Code Usage

  • In code specify the notificationTag and notification content, and userId (can set serviceTag to default to current service)
  • Send to userContactManager sendSystemNotification flow