Skip to main content

User Notification Service

Overview

To design the User Notification service, the team has gathered and pictured how and what our CRM system needs. The user should be able to see general notifications and customer related notifications. Also, Adam added that we will need to have notification settings so the user will be able to set the notification preferences. Notifications should always be related to certain user so each user will be able to see the notifications which are related to him/her only. In the notification service, the team has also discussed that there should be a way to dismiss a certain notification.

Introduction

This document describes the User Notification service and the required artefact that were designed for the service. By reading this document, you will learn about the different steps of creating and setting up the notification service.

What is the scope of the Notification service

The User Notification service focuses on managing the different kinds of user notifications. The user should be able to view the notification with a brief detail as well as to adjust the notification preferences of which type of notification s/he wants to get alerted with.

Here is an overview of the entities that have been created for the Notification service.

By taking the reference from the above UML, Jack and Alexander have designed the service in the tool. The service is classified into API Namespace and Domain Namespace only. Each namespace in the service has its own purpose. Taking the findings from the above UML sketch, different artefacts around different namespaces have been designed. The team decided to create the User Notification service in Typescript.

Designing of Notification service

The design of the service has been classified into the following namespaces:

Domain Namespace

In the domain namespace, the team has modelled and designed the basic features of the business logic. After some discussion, the team agreed to create two domain namespaces, Notifications and NotificationPreferences. The Domain namespace contains the aggregates, their properties and the corresponding commands.

Notification

Notification namespace contains the root entities Notification and customerRelatedNotification; which is a specialisation of Notification but having further details to indicate that it is related to a certain customer.

The Notification root entity contains several properties to gather the information necessary to notify the user about anything. In addition to the content in the narrower sense, it has also the 'userLogin' to match each Notification to a certain user and a timestamp, when the notification was created. Also, there is a property 'dismissed' to be able to mark a Notification as dismissed, to not show the specific Notification again to the User. While the Notification defines the general properties and behaviour, the CustomerRelatedNotification is more specific and contains further properties: the 'customerName' and a 'linkUrl'.

NotificationPreferences

Namespace contains the root entity NotificationPreferences and the necessary commands to create and update it. The notification preferences contains the settings which types of notification the user does not want to have displayed.

The NotificationPreferences contains besides the 'userLogin' only some boolean properties, to set specific types of Notification to be not displayed to the user. Corresponding to the Notifications namespace modelled entities, there are for now only two of these properties. Introducing further specific notifications, will lead to adding corresponding properties to the Notification Preferences.

API Namespace

API namespace is modelled to handle user notifications and notification preferences. After finishing the domain namespace, the team decided to start with the API namespace. The API handles user notifications and notification preferences. Therefore, operations are in place to create notifications, to dismiss them and to provide these for a specific user. Additionally, preferences can be set that specific types of notifications can be excluded.

🌟Congratulations!

You have covered important artefacts about the User Notification service.