The sun is shining and there is an API for that!
My colleague Audun recently wrote a short piece on Making your first API. Sometimes it can be hard to understand exactly HOW to use APIs – and even more so WHY you should use external APIs in building your own commerce solution. In the following, I will try to describe why it could make sense to query an external weather API in your commerce solution.
Several of our customers are in the building supplies industry and a handful of them operate their own chain of retail stores. For obvious reasons their e-commerce solution is centrally managed out of the head-office: It generally makes sense to run this alongside other central functions such as marketing and IT. Most shops – spread along our long coast from north to south – locally maintain a basic product selection in addition to local selections based on their whereabouts and store size. Seasonal campaigns run continuously and they often decide which focus products go on the front page of the e-commerce solution – and on landing pages.
One of the issues that may occur is that campaigns planned centrally and well ahead of time (often according to a strict marketing plan) do not match the weather locally at the time they run even though they match the season. Featured spring time products – such as garden tools – may be right for one part of the country and at the same time completely wrong for another. It may be sunshine and balmy temperatures in April on the south coast and snow and sleet up north. For a country with four seasons, this is not uncommon.
"Build smart API functions that allow you to automate and differentiate product sales at the same time"
As a general rule you would want to promote the right product to the right customer at the right time, and there are plenty of tools out there to personalize the shopping experience. However, could you also use external or environmental data to present a more relevant set of products to your customers? Yes, you can. In Norway yr.no – from our national weather service – offers an API for external use of weather information. You can query weather information for different locations and get a forecast – for a given time and place. It is in other words possible to use this API to make general rules on what products to promote according to local temperature and weather forecast.
Using a service such as this one for weather information is one out of many ways that you can automate the display filters in your commerce solution (another could for example be traffic information). It does not make sense to promote garden tools in an area where it is five inches of snow. But it DOES make sense to build smart API functions that allow you to automate and differentiate product sales at the same time. There is an API for that – and good news is: automation means you can enjoy the sun rather than sit in front of the screen and re-organize your products!