2026-03-02 - System Notifications: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 39: Line 39:
* In code specify the notificationTag and notification content, and userId (can set serviceTag to default to current service)
* In code specify the notificationTag and notification content, and userId (can set serviceTag to default to current service)
* Send to userContactManager sendSystemNotification flow
* Send to userContactManager sendSystemNotification flow
== example data sent to ContactManager ==
<syntaxhighlight lang="JavaScript">
[
      {
      label: "qqq",
      value: "zzzz"
      },
      {
      values: [ // array of messages
    {
          properties: [
        {
      label: "qqq",
      value: "zzzz"
        },
        {
      label: "rrr",
      value: "zzzz"
        },
        // ..
                  ]
    },
    // ...
      ]
      label: "qqq", // user defined label for result
      },
      // ...
]
</syntaxhighlight>


[[Category:Working documents| 2026-03-02]]
[[Category:Working documents| 2026-03-02]]
[[Category:Working_documents - User Contact Manager| 2026-03-02]]
[[Category:Working_documents - User Contact Manager| 2026-03-02]]

Revision as of 00:06, 23 March 2026

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

example data sent to ContactManager

[
      {
	      label: "qqq",
	      value: "zzzz"
      },
      {
	      values: [ // array of messages
		     {
		          properties: [
			         {
				       label: "qqq",
				       value: "zzzz"
			         },
			         {
				       label: "rrr",
				       value: "zzzz"
			         },
			         // ..
                  ]
		     },
		     // ...
	      ]
	      label: "qqq", // user defined label for result
      },
      // ...
]