Back to all Usecases
Send Weather-Based Contextual Messages

Introduction

Weather is a universal factor influencing consumer decisions, from what they wear to where they go and what they buy. Sending weather-based contextual messages is effective because weather significantly impacts consumer behavior and purchase intent. This allows marketers to deliver more relevant and personalized messages, ultimately driving higher engagement and conversions.

As a marketer, you can automate the process of notifying users about weather updates. This helps you eliminate the need to manually send campaigns each time the weather changes.

Advantages of sending weather-based contextual messages

  • Increased relevance and personalization: By tailoring messages to current weather conditions, you can create a more personalized and relevant experience for consumers.
  • Improved campaign effectiveness: By understanding how weather influences consumer behavior, you can optimize your campaigns to resonate with consumers' needs and desires at the right time.
  • Enhanced customer experience: Weather-based messaging can enhance the customer experience by providing timely and relevant information, such as weather-related discounts or product recommendations.
  • Data-driven insights: Weather data provides real-time insights into consumer behavior and purchase intent, allowing you to make data-driven decisions and optimize your campaigns for maximum impact.
  • Examples of weather-based messaging:
    • Travel industry: Airlines can use weather targeting to promote travel to warmer destinations during cold weather or offer discounts to customers in areas experiencing inclement weather.
    • Retail: Retailers can promote seasonal products or weather-related items, such as umbrellas or sunscreen, based on the current weather conditions.
    • Food and beverage: Restaurants and beverage companies can use weather-based messaging to promote drinks or meals that are appropriate for the weather, such as hot drinks in cold weather or iced beverages in hot weather.

We can achieve this use case using the following steps:

  1. Create a business event
  2. Create an Email campaign
  3. Trigger the campaign by triggering the business event

Expected Result

The user receives an email notification about the current weather in their city and gets some offers on products relevant to that weather condition.

weather.png

library_add_check

Prerequisites

  • The Enterprise plan with the Business Events feature must be enabled for your account.
  • The user’s city will trigger the communication, so it must be tracked as an attribute.

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. After setting up the event, we can use this event format to notify whenever there are extreme weather conditions in the city. For our example, the following information is a part of the business event:

  • Event name: WeatherUpdate1
  • Attributes of the event and their data type:
    • City: string
    • Current Weather: string
    • Suggested tool: string

Perform the following steps: 

  1. Write the information above in the JSON format and send it to MoEngage through Postman or any other tool you choose. Refer to this Business Events API documentation for more details.
    JSON
    {
      "event_name": "WeatherUpdate1",
      "event_attributes": [
      {
        "attribute_name": "City",
        "attribute_data_type": "string"
      },
      {
        "attribute_name": "Current Weather",
        "attribute_data_type": "string"
      },
       {
        "attribute_name": "Suggested tool",
        "attribute_data_type": "string"
      }
  2. Make the API call. After the event is created successfully, MoEngage will send the following response:
    JSON
    {
        "message": "The business event has been created",
        "_id": "664f9cebd52979785bcadaf4"
    }
  3. To verify if the event was successfully added:
    1. In the MoEngage dashboard, go to a Business Event Triggered Email campaign.
    2. In the Select Business Event list, you can check for your event. You can see the WeatherUpdate1 event listed there.
      wether 2.png

Step 2: Create an Email Campaign

In this section, let's create weather-based alerts through business event-triggered email notifications.

Step 2.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 Email > Business Event Triggered.
    weather 3.png
    You are taken to the first step, Target users, of defining your campaign.
  3. 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, Weather-Based Contextual Comm.

    • Campaign Content Type: Select Promotional/Marketing.
    • Subscription Categories: Select a category. For example, select Last_Hour_Discount. This will help you target only those users who have opted in to receive communication about a specific category.
    • User attribute with email address: Select Email (Standard).
      2.png
  4. From the Select business event list, select the WeatherUpdate1 event.
    weather 5.png
  5. In the Target Audience section, click the User property tab.
  6. Select the user attribute City and map it with the Business Event Attribute City. So whenever in the business event API, the value in the event attribute matches the same of the user’s city, all those matched users will receive the email communication.
    weather 6.png

    The business event attributes are now available in the drop-down lists. The event attribute City can now have a dynamic value each time the business event is triggered, with the value for City automatically substituted in the segmentation query.
  7. Click Next to move to the second step, Content, where you can define the content for your Email campaign.

Step 2.2: Content

  1. Select the template that you would like to use. For our example, lets use a blank HTML template on the Custom HTML editor tab.
  2. Add the following details:
    • Subject
    • Preview Text
    • Sender Name
    • From email address
    • Reply-to email address
  3. In the Template editor section, enter the content of the email message.
    weather 7.png
    The content for such communications must have the values picked from the business event’s attributes, which can be done similarly to any other personalization.
  4. Personalize the message by including information such as the user's name. This makes the message more contextual and helps users feel more connected. To do this:
    1. Enter “@." The Email Personalization pop-up will be displayed.
    2. Select the information from the business event or the user attributes.
      weather 8.png
    3. Click Done.
  5. 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

  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 Email Campaigns.
  3. Click Publish.
    weather 9.png

Step 3: Trigger Campaign by Triggering Business Events

We are now ready to start triggering the communications. When there is a weather update for the city, the campaign can be initiated using the Trigger Business Event trigger. Based on your business requirements, you can decide when to pass this event to MoEngage.

Here is a payload example:

JSON
{
      "event_name": "WeatherUpdate1",
      "event_attributes": {
          "City": ["Bengaluru", "NewDelhi", "Kolkata"],
          "Current Weather": "Rainy",
          "Suggested tool": "Raincoat"
      },
       "triggered_by": "john.joe@example.com"
}

Conclusion

In this use case, we created weather updates through email notifications. We used business events in MoEngage to achieve this. The logic for triggering this event lies on your side. For instance, whenever there is a weather update for the city, they can create a business event for it, which will be used to trigger the campaign.

weather 10.png

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

How can we improve this article?