📜 ⬆️ ⬇️

Designing a notification system for web applications

This article is about how we designed a universal alert system for our web applications and what happened in the end. I will not argue that the result obtained is the only correct one, but I consider it to be quite good. If you have experience in solving such a problem, I invite you to share it in the comments.

The essence of the task


Given: a web-based collaboration application. For simplicity, we assume that this is a CRM or Task Tracker.
Required: timely notify users of events in the application to which their response is required.

What is the problem?


Everything would be very simple if we had a specific application with strictly defined work scenarios and fixed user roles. But in our case it is not. We develop various systems for accounting and automating business processes based on the platform constructor. And the alert system needs to be done at the platform level, so that later it can be used in any applications.

The first pancake The first quick decision


Initially, the simplest version of alerts was implemented - showing all changes made by other users when users logged in to the application. With a small amount of changes, this method has the right to exist, but with an increase in the amount of data and the number of users, we get an endless list, which once, and there is no need to look at:
')


In addition to a too large list of changes, this block has “What's new?” And other problems:

It would seem that to answer all these questions there is an action log, which stores the most detailed information about each transaction:



However, as practice shows, it is inconvenient to use the action log to obtain operational information about events in the application. As a rule, such detailed information about changes is required in rare cases - it is used by the manager during the "debriefing". And in real time, an employee needs not so much detailed , how much selective information - with an emphasis on the changes he is interested in. For example, after the “Completion of the Case” (from the example above) I would like to see such information:
Today, at 12:48 pm, Ivanov completed the P4D1 case : Preparation of application documents .
Petrov is assigned the P4D2 case : Obtaining the original application from the client .

This is if I am the leader of these Ivanov and Petrov and I want to control them as much as possible. If I am Petrov, then it will be more convenient for me to receive an alert in this form:
You have a P4D2 case assigned: Receiving the original application from the client . Deadline - 2 days.

It turns out that alerts should be configured differently for different users and different events (thanks, cap) . It's time to analyze when and which alerts users really need.

Alert classification


By origin


By the one who needs to be notified


By way of notification


By shelf life


Result


So, all needs are taken into account in the analysis. Like nothing is forgotten. Now you need to come up with a setting that allows you to create any alert. We have not yet thought about the beauty of the interface, and the configuration structure turned out like this:



The attentive reader will notice that the retention period for alerts in this setting is not selected. We decided that this setting can be set not for each individual alert, but at a higher level - for the entire application. Perhaps this is a temporary solution, and a fine tuning of the shelf life is still needed. Experience will show.

Conclusion


As already mentioned at the beginning of the article, the solution found does not claim to be ideal. I do not exclude that in the future it may somehow be supplemented or even completely changed. I hope in the comments to meet constructive criticism and other solutions to the problem.

Source: https://habr.com/ru/post/206220/


All Articles