Introduction
Alerting our customers about the updates of their upcoming flight travel is imperative because it improves customer experience and the brand reputation and reliability. Using the "Business Events" feature of MoEngage, we can send real-time flight status updates, gate changes, and travel alerts to passengers through Push Notifications, Emails, or SMS.
In this article, we will create a Business Event-Triggered Push campaign through MoEngage to convey to users who have a trip today about the gate number and remind them to come 2 hours before the scheduled departure.
Expected Result
Users receive a Push Notification on their phones with their flight status update:
library_add_check |
Prerequisites
|
Create the Business Event
In this section, let us create a Business Event for your account. We can use the MoEngage Business Event public API. For our example, the following information is a part of the Business Event:
- Event name: “Flight_Status_Updates"
- Attributes of the event and their data type:
- Flight Name - string
- Departure Time - date
- Gate Number - string
- Departure City - string
- Destination City - string
Perform the following steps:
- Write the information above in the JSON format and send to MoEngage through Postman:
{
"event_name": "Flight_Status_Updates",
"event_attributes": [
{
"attribute_name": "Flight Name",
"attribute_data_type": "string"
},
{
"attribute_name": "Departure Time",
"attribute_data_type": "date"
},
{
"attribute_name": "Gate Number",
"attribute_data_type": "string"
},
{
"attribute_name": "Departure City",
"attribute_data_type": "string"
},
{
"attribute_name": "Destination City",
"attribute_data_type": "string"
}
],
"created_by": "support@moengage.com"
} - Use the information above in the JSON format and make the API call with Authorization information to the right data center your DB belongs to. 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": "64a40cff5547a6b2c5b14404"
} - To verify if the event is successfully added, open the MoEngage Dashboard and go to any Business Event Triggered campaign. From the Select business event drop-down list, you can check for your event. You can see the "Flight_Status_Updates" event.
Create a Push Campaign
In this section, let us create a business event-triggered Push campaign to convey our users who have a travel today about the gate number and remind them to come 2 hours before the scheduled departure.
Step 1: Target Users
- Navigate to the sidebar on the left and click Engage > Campaigns and click + Create campaign or click + Create new > Campaign.
- Under Outbound, select Push > Business Event Triggered.
You are taken to the first step "Target users" of defining your campaign. - 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. For example, "Demo Account - E-commerce".
- Campaign name: Enter a name for the campaign. For example, "Flight Updates".
- Campaign tags: Select the required campaign tags.
- From the Select business event drop-down list, select the "Flight_Status_Updates" event.
- In the Target Audience section, define users who are related to the Business Event that would be generated alone. So for this example, the target audience can be as shown below:
We are trying to query for the list of users who have booked a flight in the last 60 days who have their Travel Date equal to Departure Time (coming through the Business Event) and have their Booked Flight name equal to Flight Name (coming through the Business Event). - In the Target Platforms section, select Android.
- Click Next to move to the second step "Content" where you can define the content that will go into your Push campaign.
Step 2: Content
- Select the template that you like to go with. For our example, select Basic notification.
- Enter the required content for the campaign. We can enter a title, message, and summary manually, or generate it using Merlin AI. For more information, refer to Generate Push Messages with Merlin AI.
- Add personalisation to the message using information such as the name of the user. Such personalization makes the message more contextual and makes the users feel connected. To do the same, enter “@". The Push Personalization pop-up is displayed from where you can select the information that can be from the business event or user property of a user.
- Add a deeplink to this Push message by mentioning the specific URL that directly takes them to the page in your App or website where they can check their ticket details.
- Click Next to move to the third step "Schedule and goals" where you can define the schedule and goal of your campaign.
Step 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.
Conclusion
In this use case, we created a Business Event-Triggered Push campaign through MoEngage to convey to users who have a trip today about the gate number and remind them to come 2 hours before the scheduled departure.
Now that we have published the Campaign, we can test the same using MoEngage APIs. For more information, refer to Business Event Triggered Campaigns.