S
S
SimBioT192017-03-08 12:45:55
Database
SimBioT19, 2017-03-08 12:45:55

How are one-time notifications implemented in large projects?

Hey!
The question is simple, but its correct implementation is interesting.
A client registers on the site and a pop-up with a short instruction is shown to him, because he logged into the account for the very first time. Then a similar notification that we have a discount on premium accounts (we tell about this once to each client).
And here's the question - how to control / store such "one-time" situations?
In a DB to create for them the separate table with descriptions and to set a flag? Is it correct then that every time after logging into the account you need to check if the pop-up has already been called. And the fact that it needs to be checked every time when I visit page X?
Plus, the types of events can be different - the first is a pop-up window, the second is a button that appears in the header, and the third is an email that is sent only once after I performed a separate action.
How to separate all this and not get confused, so that later you can also add to the list of these notifications?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Timofeev, 2017-03-08
@webinar

if a certain order is traced in the messages, then you can have an additional integer type field in the user table, for example stage, and display messages. Regarding prem, it's probably a separate logic. Since there is a table with payment data, etc. And there is a separate component that stores the logic of connecting all this and forming a message.

X
xmoonlight, 2017-03-10
@xmoonlight

What you described is nothing more than a task-list of an automatic manager that serves all accounts (throughout the entire period of their existence).
1. A table of all tasks (task-list) is compiled for one account (standard). As needed - the pool can change: added, edited or completely changed.
2. When creating a new account, these tasks are assigned to the auto-manager, in relation to a new account, counting from the account activation period.
3. When a user logs in, the auto-manager takes a task from the pool, and if there is something to execute, it executes: a tour of the interface, notification of innovations, etc.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question