Integration with Synerise and OpenWeather
You can integrate Synerise with OpenWeather through the Automation module. This instruction describes a scenario triggered by every visit to any page within a specified domain. On the next stage of the workflow, a profile filter allows only those customers who reside in a particular city (in this case it’s Warszawa; customers have the City attribute on the card set to a particular city). In effect, a webhook is sent to OpenWeather and returns weather details for this city. On the card of the customers who complete the workflow, an event is generated with the weather details.
Based on this data, you can prepare analyses and personalize the communication with customers.
Requirements
- A tracking code implemented into the website
- The API key of an account registered in OpenWeather
Create a workflow
-
Go to
Automation > Workflows > New workflow.
-
On the dashboard, click the
icon.
-
From the dropdown list, select the Profile Event node.
-
To adjust the settings of the node, double-click it.
- From the Choose event dropdown list, select page.visit.
- To define the details of the event, click the + where button.
Result: Choose parameter button appears. - To select the parameter, click Choose parameter.
- From the dropdown list, select uri.
Result: A logical operator dropdown list appears. - From the dropdown list, select Contain.
Result: A text field appears next to the logical operator. - Enter the domain.
- Click Apply. Result: When a customer visits a page within the domain, the workflow is launched.
-
To add the next node, click the plus icon on the Profile Event node.
-
From the dropdown list, select Profile Filter.
-
To adjust the settings of the node, double-click it.
- To add a condition, click Choose filter.
- From the dropdown list, select City.
Result: The Choose operator button appears. - From the Choose operator dropdown list, select Equal.
Result: A text field appears. - In the text field type the name of the city.
- Confirm the settings by clicking Apply.
-
To add the next node, click the plus icon on the Profile Filter node.
- From the dropdown list, select Outgoing Integration.
Result: A matched path is added. - To add the not matched path, click the plus icon on the Profile Filter again.
- From the dropdown list, select End.
Result: A not matched path is added.
- From the dropdown list, select Outgoing Integration.
-
To define the settings of the Outgoing Integration node, double-click it.
Result: A pop-up appears. -
Select the Custom webhook tab.
-
In the Action name field, enter the name of the action that will be one of the webhook.response event parameters that shows on the customer card with the details of weather for the city a customer is assigned to (for example,
weather.open
).Important: Keep to the standard name format of the events (two words separated by a dot):page.visit
,message.send
,newsletter.click
, and so on. -
In the URL field, select the GET method.
-
Next to the method, enter the following endpoint URL. Before you use it, insert your API key:
http://api.openweathermap.org/data/2.5/weather?q={{customer.city | urlencode}}&appid=your api key
Tip: More applications and methods available at this link. -
Confirm the settings by clicking Apply.
-
To add the final node, click the plus icon on the Outgoing Integration node.
-
From the dropdown list, select the End node.
Result:The final form of the integration - On the card of a customer who completed the workflow, an event with weather details is displayed:

Use
Events and event parameters received through the webhook can be used in an analysis that informs about the weather in the place of residence of each user who went through the workflow.
- Go to
Analytics > Aggregates > New aggregate.
- Enter the name of the aggregate.
- From the Select property dropdown, choose Last.
- From the Choose event dropdown list, select webhook.response.
- To select the event parameter, click Choose parameter.
- From the dropdown list, select body.weather[0].description.
- To define the time range from which the data will be analyzed, click the calendar icon.
- Select the date range
- Confirm your choice by clicking Apply.
- Optionally, if you want to show this aggregate on a customer’s profile, switch the Show in profile card option on. In effect, on the right side of the card, on the Aggregates list, the result of the aggregate for a particular customer will be visible.
Important: Pay attention to the date range of the aggregate. If the date of event occurrence doesn’t overlap with the date range of the aggregate, the aggregate won’t show results (neither on the card nor in the aggregate preview).
- To complete the aggregate, click Save.
Result:The weather aggregate
- The aggregate is visible on the customer’s profile:
The preview of the aggregate on the customer's profile