"Get weather information" node
The Get weather information node allows you to retrieve information about weather at a specific location. This kind of information can be a great basis for communication with customers. You can use it to recommend winter accessories on your website when cold season approaches or send a push notification to your customers on a hot day with a promotion code for cold beverages and ice cream.
Weather information can be stored in Synerise in multiple ways. By default, it is saved on the profile of the customer as a
weatherapi.getWeatherInfo event. The parameters of this event contain the weather details. You may also choose to store this information in a catalog for particular locations as presented in this use case.
While configuring the integration settings, you can decide about the time range you want to get weather forecast:
- at the moment
- for the next 14 days
- for the next 300 days (counting from the 14th day in advance to the current date)
- historical weather data
Accepted location formats
While configuring the integration settings, you need to define the location you want to get weather information about. This field accepts the following formats:
|Latitude and longitude||
|City name (in English)||
|US zip code||
|Canada postal code||
|iata:<3 digit airport code>||
|auto:ip IP lookup||
|IP address (IPv4 and IPv6 supported)||
*- Enter the English equivalent of the city name
A Weather API API key is required.
- If you’re not sure if a key is already added to Synerise, you will be able to check it while configuring the node.
- If you want to create a WeatherAPI API key, go to https://www.weatherapi.com/.
- Click the node.
- Click Select connection.
- From the dropdown list, select the connection.
Create a connection
- At the bottom of the Select connection dropdown list, click Add connection.
- In the API key field, enter the API key (you can find it in your WeatherAPI account).
- Click Next.
- In the Connection name field, enter the name for the connection.
- Click Apply.
Result: A connection is created and selected.
Define the integration settings
In this part of the process, fill in the configuration form so that Synerise can retrieve weather information from Weather API.
In the Weather data period field, select one of time ranges from which you want to receive weather information:
- Current weather
- Past weather - Allows you to enter a date in the past to receive historical weather data.
- Forecast for the next 14 days - Allows you to receive weather forecast for 14 days in advance (from the current day).
- Forecast for the next 300 days - Allows you to receive weather forecast for between 14 and 300 days in advance (counted from the current day).
Follow the instructions according to the option you selected in step 1.
Result: After a profile completes the Get weather information node, the
weatherapi.getWeatherInfo event is generated on the activity list on the profile in the Profiles module. The event contains weather information in its parameters in accordance with the node configuration.
Example of use
For example of use, refer to the use case that describes updating weather information in a catalog.