How to personalize your emails with local weather conditions in Marketo

Michael_Tucker1
Level 4

How to personalize your emails with local weather conditions in Marketo

How to personalize your emails with local weather conditions in Marketo

“Rainy days and Mondays always bring me down” sang Karen Carpenter in a song from a long time ago. Thinking as a marketer, how much does the weather impact your target audience’s emotions and, thus, their purchase behaviors? How do you communicate to people based on something that changes as frequently and randomly as the weather? We covered an example of how to use weather in our last MUG meeting with a Case Study on a Parking Lot Party for a local Chevy dealership, but here we’ll go into details on how to use current weather conditions in your marketing communications.

 

Weather Opportunities

In today’s current events that are dominated by Stay at Home orders, one of the few areas of your in-person marketing program remains outdoor activities. Ask anyone in the restaurant industry these days how important drive-thru or takeout business is these days. Even in normal conditions, how important is the weather for the home improvement industry. Should Home Depot or Lowe’s promote products for outdoor lawn and garden projects or talk about how great a fresh coat of paint and some crown molding looks in your dining room? As you’re heading out, should Wendy’s try to sell you a warm bowl of chili or one of their cool, creamy Frosty’s? All of these purchase decisions are strongly influenced by the current weather.

 

How do I use Weather data in my Marketo programs?

With the webhooks below in place, you can quickly request the weather forecast for a given lead by using a flow step. We have constructed a separate example that Lowe's Home Improvement might use to promote Weekend DYI projects to new homeowners based on the wea..., but here are a few ways that you might use this data:

  1. Build a Segmentation around Weather Category for dynamic content emails based on the weather your target audience is experiencing (e.g. A national promotion for an HVAC provider showing either Heating or Air conditioning service)
  2. Build website personalization segments to customize your web pages with the right information (e.g. change your hero graphics daily based on whether your visitors are experiencing rain, sun, or snow)
  3. Create alerts in your event program to anticipate rain out situations for outdoor events (e.g. See our Marketo Case Study: The Parking Lot Party)

Accessing a source for weather data

How then do you incorporate weather into your Marketo instance? Essentially, we’re creating a webhook that checks with a weather service and returns a local forecast to a user record in Marketo. For this example we’re using AccuWeather APIs. You’ll need to sign up for an account to get an API Key before you can submit your webhook request, but AccuWeather offers free accounts for 50 calls per day.

Michael_Tucker1_1-1590077712597.png

 

Step 1: Build Location Key Webhook

Our forecast endpoint covers all cities in the US and Canada and uses a 6-digit location key value to determine the right city to forecast… how many US cities are named Springfield, for example? So we’ll run the following webhook to search for a Location Key from the City and State fields in Marketo:

 

http://dataservice.accuweather.com/locations/v1/cities/search?apikey=***********&q={{lead.city}}%2C{{lead.state}}

Note that you’ll need to get the following values for your example:

  1. API Key: This is hashed out in our example, but you’ll put in the API Key value that you were assigned when you create an application on your AccuWeather account
  2. Q: This is a string that contains the “City, State” values that you search for to get a location key. I’ve replaced these with Marketo Lead tokens and used the HTML encoding for a comma, which is %2C, but while you’re initially testing this out you can replace this any city that you’d like. Let’s use Knoxville, TN for our example.

 

The output of our location webhook starts as follows (note that key is located on line 4):

Michael_Tucker1_2-1590077712608.png

In Marketo, we’ll map that value back into a Custom Field called Location Key to use in the forecast webhook as follows:

Michael_Tucker1_3-1590077712614.png

Step 2: Build Local Forecast webhook

Now that we have the location key for Knoxville, TN saved to the lead record for our store executive, we can use that value in a different webhook to gather the Local Forecast for the next day. Below is the webhook we’ll use in Marketo:

 

http://dataservice.accuweather.com/forecasts/v1/daily/1day/{{lead.Location Key}}?apikey=*********

Querystring Parameters:

  1. APIKey: The same API Key that was used for the first webhook. Replace with the key you were issued when you signed up for an AccuWeather account and created your app there.

 

Note the {{Lead.Location Key}} token at the end of the endpoint’s URL is what determine’s the location where we’re looking for the weather forecast. We’ll receive the following output from the API:

Weather Webhook Response.png

We’ll use this information to map the response back to the Marketo Person record for the Knoxville store executive.

Weather Forecast.png

 

With both webhooks in place, you can quickly capture the location and the local weather conditions for any of your leads in real time from your Marketing Activities!

 

Happy Marketing! 

2020 Profile Pic - Square 300px.JPGAbout Michael Tucker

Michael Tucker is a 2x Marketo Certified Expert and runs The Conversion Store, a boutique consultancy working with Marketo and CRM instances for both SME and Enterprise firms, one of which won a Marketo Revvie Award. Over a 20-year career, Michael has worked in Sales and Marketing leadership roles in manufacturing, broadcasting, finance, and defense. With a background in Information Systems, Michael is often called upon to help translate technical topics into profitable solutions that turn leads into customers for his clients. You can reach him with questions on LinkedIn or at Michael@ConversionStore.com
 
Michael Tucker
1 REPLY 1
JD_Nelson
Level 10 - Community Advisor

Re: How to personalize your emails with local weather conditions in Marketo

AWESOME USE CASE!