Introduction
Businesses want to alert their users (investors) about a drop in the price of their favorite stock because they can react differently to price drops. Some investors may view them as opportunities to buy more stocks, believing they are now undervalued. For some investors, price drops may trigger fear, leading to panic selling to avoid further losses.
Advantages of setting stock price drop alerts
- Market awareness: Inform users about sudden price fluctuations in the market, which can be triggered by news events, company announcements, or broader economic factors.
- Risk management: Send timely notifications to potentially limit losses if a stock price falls significantly due to negative news or unexpected events.
- Potential buying opportunities: A drop in price could indicate a temporary dip that might be a good time to buy more shares of a company you believe in.
- Quick reaction: A price drop alert gives them the opportunity to react quickly by either selling the stock, researching the reason for the drop, or potentially buying more shares.
We will achieve this use case in two steps:
Expected Result
Users will receive a push notification about a drop in the price of their favorite stock, as shown below:
library_add_check |
Prerequisites
|
Step 1: Create a Business Event
In this section, we will create a Business Event for your account, which will help create an event template to capture all the required details. We can use the MoEngage Business Event public API. For our example, the following information is a part of the business event:
- Event name: Stock Price Drop Alert
- Attributes of the event and their data type:
- Stock ID: string
- Percentage Drop: string
- Current Stock Price: float
Perform the following steps:
- Write the information above in the JSON format and send it to MoEngage through Postman.
{
"event_name": "Stock Price Drop Alert",
"event_attributes": [
{
"attribute_name": "Stock ID",
"attribute_data_type": "string"
},
{
"attribute_name": "Percentage Drop",
"attribute_data_type": "string"
},
{
"attribute_name": "Current Stock Price",
"attribute_data_type": "float"
}
],
"created_by": "john.doe@example.com"
} - Use the information above in the JSON format and make the API call with authorization information for the right data center to which your workspace belongs. For more information, refer to Create Business Event API.
After the API call is made and the event is created successfully, MoEngage sends the following response:
{
"message": "The business event has been created",
"_id": "{{Business Event ID}}"
} - To verify if the event is successfully added:
- In the MoEngage dashboard, go to a Business Event Triggered Push campaign.
- In the Select business event list, you can see the Stock Price Drop Alert event.
Step 2: Create a Push Campaign
In this section, we will create price drop alerts for your users' favorite stocks through business event-triggered push notifications.
Step 2.1: Target Users
- On the left navigation menu in the MoEngage dashboard, click Engage, and then click Campaigns.
- On the All campaigns page, click + Create campaign.
- Under Outbound, click Push > Business Event Triggered.
You are taken to the first step, Target users, of defining your campaign. - Define your campaign with a name and tags. Enter the following details:
- Team: Select a team if your organization has teams enabled for your account. For more information, refer to Teams in MoEngage.
- Campaign name: Enter a name for the campaign. For example, Stock Price Drop Alert.
-
Campaign tags: Select the required campaign tags.
- In the Select business event list, select the Stock Price Drop Alert event.
- In the Target audience section, define the logic to identify all the customers who have viewed the stock with the same Stock ID. So, for this example, the target audience can be as shown below:
The business event attributes are now available in the drop-down lists. The event attribute’s Stock ID can now have a dynamic value every time the business event is triggered, and the value against the business event attribute Stock ID is automatically substituted in the segmentation query.
- In the Target Platforms section, select Android.
- Click Next to move to the second step, Content, where you can define the content for your Push campaign.
Step 2.2: Content
- Select the template that you would like to use. For example, select Basic notification.
- Enter the required content for the campaign. We can manually enter a title, message, and summary or generate it using Merlin AI. For more information, refer to Generate Push Messages with Merlin AI.
The content for such communications would need to have the values picked from the business event’s attributes, which can be done similarly to any other personalization.
- Add personalization to the message using information such as the user's name. Such personalization makes the message more contextual and makes the users feel connected. To do the same:
- Type @.
- On the Push Personalization dialog box, find relevant attributes from a user's business event or user property.
-
Use the deep link option to direct users to a page in your app or website where they can check their ticket details.
-
In the Default click action list, select Deeplinking.
-
In the URL field, mention the relevant URL.
-
-
Click Next to move to the third step, Schedule and goals, where you can define your campaign's schedule and goals.
Step 2.3: Schedule and Goals
- Define when to start and end this campaign and the conversion goal based on your requirements.
- Change the deliverability settings based on your requirements. For more information, refer to Create Push Campaigns.
- Click Publish.
Step 3: Trigger Campaign by Triggering the Business Event
We are now ready to start triggering the communications. When a stock price drop is detected, the campaign can be triggered using the Trigger Business Event API. The logic of when to pass this event to MoEngage lies at your end based on the business requirement.
Here is a payload example:
{
"event_name": "Stock Price Drop Alert",
"event_attributes": {
"Stock ID": "GOOG",
"Percentage Drop": "10%",
"Current Stock Price":136.65},
"triggered_by": "john.doe@example.com"
}
Conclusion
In this use case, we created price drop alerts through Push notifications for your users' favorite stocks. We used Business Events in MoEngage to achieve this.
Now that we have published the campaign, we can test it using MoEngage APIs. For more information, refer to Business Event Triggered Campaigns.