Back to all Usecases
How to Send Flight Status Updates

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:

1.png

library_add_check

Prerequisites

  • Events to track the action of a user booking flights and each other related information such as the platform, flight name, departure date, price, departure city, destination city. To understand how to track events, refer to the Developer Guide.
  • Settings for one or more channels such as Push, Email, or SMS.
  • The Business Events feature enabled for your account.

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:

  1. Write the information above in the JSON format and send to MoEngage through Postman:
    JSON
          {
    "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"
    }
  2. 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:
    JSON
         {
    "message": "The business event has been created",
    "_id": "64a40cff5547a6b2c5b14404"
    }
  3. 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.
    2.png

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

  1. Navigate to the sidebar on the left and click Engage > Campaigns and click + Create campaign or click + Create new > Campaign.
  2. Under Outbound, select PushBusiness Event Triggered.
    3.png
    You are taken to the first step "Target users" of defining your campaign.
  3. Enter the following details:
    1. 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".
    2. Campaign name: Enter a name for the campaign. For example, "Flight Updates".
    3. Campaign tags: Select the required campaign tags.
  4. From the Select business event drop-down list, select the "Flight_Status_Updates" event.
    4.png
  5. 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:
    5.png
    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).
  6. In the Target Platforms section, select Android.
    6.png
  7. 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

  1. Select the template that you like to go with. For our example, select Basic notification.
    7.png
  2. 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.
    8.png
  3. 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.
    9.png
  4. 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.
  5. 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

  1. Define when to start and end this campaign and the conversion goal based on your requirements.
  2. Change the deliverability settings based on your requirements. For more information, refer to Create Push Campaigns.
    10.png
  3. 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.

Was this article helpful?
0 out of 0 found this helpful

How can we improve this article?