What goes into building a basic ‘Alerts Module’?

Karan Gogna
Agile Insider
Published in
4 min readJan 17, 2022
Mentions the notification of a price drop alert which shows that the Last traded price of Google has been dropped by 15% to 2700$. It also shows 2 buttons “Dismiss” and “Take action”
It shows an alert notification received a user

Want to know when the stock price is going to reach a particular level? Or want to receive a notification/email when your ad campaign revenue drops below the desired revenue limit? Well! that's where an ‘Alerts Module’ comes into play.

We use such modules in our day-to-day lives, but do you know what goes into the creation of such modules? These modules might seem very easy and intuitive when you are using them but they are not that easy to build. I know this because it took me multiple iterations to get this module right for one of our products.

Before we delve into the nitty-gritty of this module, let's start with the basics of Product management. What is the main problem statement or the pain point (as we call it in product terms) that we want to solve through this module?

Pain point: It is difficult for the user to keep a track of multiple metrics and know whenever a metric reaches a certain value.

In this fast-paced world where we are surrounded by data from morning till evening and in every sphere of life, it gets difficult to keep a track of some of the important data parameters. An alerts module helps the user by telling them at the exact moment whenever a key parameter or the metric reaches the desired value. This metric could be the price of a stock, the value of a cryptocurrency, the value of an experiment that you were conducting, or any other parameter that you are interested to track.

While building the module, we need to incorporate multiple parameters which will act as an input to this module.

Important components of an alert module are as follows:

  • Key Metric: This is the metric on which the alert needs to be applied i.e. the parameter which is being continuously monitored for its value. Examples include the Price of a stock, Air Quality levels in your city, etc
  • Aggregation level/Group by: It defines the aggregation level at which you want the above ‘Key metric’ to be tracked. This might or might not be true for the use case that you are building this module for but it is required in certain cases. An example could be as simple as the name of the stock for which you want to track the price or any other metric. Others include tracking revenue for a customer, here the ‘customer’ will be your aggregation level and ‘revenue’ will be the ‘key metric’
  • Value Threshold: This refers to the value of the parameter that you are tracking. This value could be different (higher or lower) from the current value and you would want to know when the metric reaches this value.
  • Condition: The most important part of the alert module is the condition. This includes a set of conditions that help your algorithm to understand when should it trigger a notification. Some examples of conditions are — greater than, less than, in between, etc.
  • Frequency: Frequency tells the time at which you would want your algorithm to run and check if the metric that you were tracking has met the required threshold or not. This could be continuous trackings such as in the stock market where you want to keep an eye on the price of the alert in real-time or something that could run weekly checking if the storage of your phone has reached the capacity
  • Name of the alert (Optional): By giving a name to the alert you will be able to differentiate your alert from the rest of the alerts that you have created. If the user is not setting the name, a name can be assigned by the algorithm based on the above parameters. Example — lastTradedPrice_bitcoinUSD_44000
  • Medium of the alert (Optional): This includes giving your user an option as to where they would like to receive the alert. The options could be email, messages, in-product notifications, phone notifications, etc.

Key components of alert module are: Metric, Aggregation level, Threshold, and Condition

It shows different fields that are needed as an input for the alerts module
Input module for creating alerts

Once you take the above as input from the user, your algorithms are all set for doing a crucial job for them and doing away with their manual effort of tracking something. Your user can sleep in peace while your algorithms do the heavy lifting (just make sure they are working fine :P) because I am not delving into its details. There are advanced features that can be added to the alerts module, but let's visit them at a later stage.

It takes 2 minutes to create an alert, 2 seconds to dismiss the notification but it takes a whole lot of effort to build one. So, the next time an alert saves you from losing money or helps you in meeting a goal, silently thank that developer and the product manager for integrating the module with the product :)

--

--

Karan Gogna
Agile Insider

Karan is a product management enthusiast and a passionate climateer