Identify

Document Owner
Document StatusDraft
Intern Working on this Project
Mentors
Source Codehttps://github.com/ad-os/incubator-fineract
DocumentationNotification API Developer User Guide

Project Summary

Goal

Approach for designing  a generic notification system

The designing of the notification system will be done in two parts :-

Notification Generation and Storage

1. Generation

This part contains information about how notifications are being generated in the backend and what design they follow for their generation.

Each generated notification will contain the following attributes :

               Subject --> Object --> Action --> Actor 

Subject - The user who needs to be notified
Object - The object on which action happened
Action - The action that resulted in this notification
Actor - Who did it

All the notifications can fit into this model. Now for our standard branch manager - loan officer interaction the notification may look like 

Notify [User 322][new loan application] was [created] by [User 432]

             subject                 object                               action          actor

2. Storage

This part contains information about how notifications are being stored in the database after their generation and what data model design they follow.

Two tables are being used for storing the generated notifications.

1. notification_generator :- This table contains the attributes of the generated notification.

idobject_typeobject_identifieractionactoris_system_generatednotification_contentcreated_at

id :- The id of the generated notification.

object_type :- The type of object for the generated notification.

object_identifier :- The id of the object by which it is identified in the database.

action :- Type of action performed by the actor. The actions may be created, updated, deleted etc.

actor :- Username of the actor which acts upon the action.

is_system_generated :- It is a boolean value. This column tells whether the notification was generated by the system or by the user.

notification_content :- This column contains the text of the generated notification which would be shown to the user for whom it was generated. For e.g A new client with name ABC was created by mifos.

created_at :- It contains the date and time of the generated notification.

...................................................................................................................................................................................................................................................................................................................................

2. notification_mapper :- The table maps the id of generated notification with the id of a user for whom it was generated.

idnotification_iduser_idis_readcreated_at

id :- The id of mapped notification.

notification_id :- It contains the id of a notification which has to be mapped to a user. This is coming from the notification_generator table.

user_id :- It contains the id of a user for whom the notification is mapped.

is_read :- It is a boolean value. It tells whether the notification has been read by the user or not.

created_at :-  It contains the date and time of the mapped notification.

Notification Delivery

JIRA Tasks