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 journey, a client 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 journey, 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

Procedure


  1. Go to Analytics icon Automation > Journey > New journey.

  2. On the dashboard, click the Add the first node icon icon.

  3. From the dropdown list, select the Client Event node.

  4. To adjust the settings of the node, double-click it.

    1. From the Choose event dropdown list, select page.visit.
    2. To define the details of the event, click the + where button.
      Result: Choose parameter button appears.
    3. To select the parameter, click Choose parameter.
    4. From the dropdown list, select uri.
      Result: A logical operator dropdown list appears.
    5. From the dropdown list, select Contain.
      Result: A text field appears next to the logical operator.
    6. Enter the domain.
    7. Click Apply. Result: When a customer visits a page within the domain, the journey is launched.
  5. To add the next node, click the plus icon on the Client Event node.

  6. From the dropdown list, select Client Filter.

  7. To adjust the settings of the node, double-click it.

    1. To add a condition, click Choose filter.
    2. From the dropdown list, select City.
      Result: The Choose operator button appears.
    3. From the Choose operator dropdown list, select Equal.
      Result: A text field appears.
    4. In the text field type the name of the city.
    5. Confirm the settings by clicking Apply.
  8. To add the next node, click the plus icon on the Client Filter node.

    1. From the dropdown list, select Outgoing webhook.
      Result: A matched path is added.
    2. To add the not matched path, click the plus icon on the Client Filter again.
    3. From the dropdown list, select End.
      Result: A not matched path is added.
  9. To define the settings of the Outgoing webhook node, double-click it.
    Result: A pop-up appears.

  10. Select the Custom webhook tab.

  11. 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.

  12. In the URL field, select the GET method.

  13. 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.

  14. Confirm the settings by clicking Apply.

  15. To add the final node, click the plus icon on the Outgoing webhook node.

  16. From the dropdown list, select the End node.
    Result:

    The final form of the integration
    The final form of the integration
    • On the card of a customer who completed the journey process, an event with weather details is displayed:
The event with the weather details on the customer card
The event with the weather details on the customer's profile

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 journey.

  1. Go to Analytics icon Analytics > Aggregates > New aggregate.
  2. Enter the name of the aggregate.
  3. From the Select property dropdown, choose LAST.
  4. From the Choose event dropdown list, select webhook.response.
  5. To select the event parameter, click Choose parameter.
  6. From the dropdown list, select body.weather[0].description.
  7. To define the time range from which the data will be analyzed, click the calendar icon.
    1. Select the date range
    2. Confirm your choice by clicking Apply.
  8. Optionally, if you want to show this aggregate on a customer’s profile, switch the Show in client 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).
  9. To complete the aggregate, click Save.
    Result:
    The weather aggregate
    The weather aggregate
  • The aggregate is visible on the customer’s profile:
    The preview of aggregate on the client card
    The preview of the aggregate on the customer's profile
😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.