2025-06-21 - Consolidated notification messages: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 93: | Line 93: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
= Notes = | |||
* consolidated maybe have ttl setting to auto remove? Or could clean up each time a group is processed | * consolidated maybe have ttl setting to auto remove? Or could clean up each time a group is processed | ||
[[Category:Working documents| 2025-06-21]] | [[Category:Working documents| 2025-06-21]] | ||
[[Category:Working documents - Notification Manager| 2025-06-21]] | [[Category:Working documents - Notification Manager| 2025-06-21]] | ||
Latest revision as of 01:49, 23 June 2025
Triggering processing of consolidated notifications
- Eventbridge for one off events
- Use for notificationGroups that have a recurring schedule
- Not for notificationGroups that consolidate when x number of messages received
- When a recurring group is processed, add it's schedule to the old schedule timeframe so that the time processed is standard (eg processes every day at the same time)
Processing notificationGroups after x number of messages
- This is handled each time a message comes in, count the number of consolidated notifications waiting to send
Limits
- Maybe hardcode a const max frequency or number of consolidated messages a group can handle, perhaps deactivating groups that process too many
- Hardcode a max number of consolidated messages to list in one message
Message content
- triggers match to flowSteps so we know the possible params of each message
- Each notificationGroup sets up for each message type whether to show aggregate or detailed list of the messages (can show both)
- Must show something for each triggerGroup
- Both aggregate and detailed can choose which params to show
- params can be an array which orders the params in the message output
- add these settings to ?versionedData
example consolidatedConfig
- in notificationGroup versionData
- each consolidated records it's triggerGroupId
[
{
triggerGroupId: "xxx",
flowStepPropertyName: "xxx"
aggregate: "sum", //sum|count|max|average|...
label: "qqq" // user defined label for result
},
{
triggerGroupId: "xxx",
flowStepProperties: [
{
flowStepPropertyName: "xxx",
label: "qqq"
},
{
flowStepPropertyName: "xxx",
label: "rrr"
},
// ...
]
// no aggregate means detailed list of messages
label: "qqq" // user defined label for result
showTimestamps: true
},
// ...
]
example data sent to ContactManager
[
{
triggerGroupId: "xxx",
flowStepPropertyName: "xxx"
aggregate: "sum",
label: "qqq",
value: "zzzz" // calculated aggregate value
},
{
triggerGroupId: "xxx",
values: [ // array of messages
{
timestamp: "zzz",
flowStepProperties: [
{
flowStepPropertyName: "xxx",
label: "qqq",
value: "zzzz"
},
{
flowStepPropertyName: "xxx",
label: "rrr",
value: "zzzz"
},
// ..
},
// ...
],
label: "qqq", // user defined label for result
showTimestamps: true
},
]
Notes
- consolidated maybe have ttl setting to auto remove? Or could clean up each time a group is processed