Alert Webhook

zenloop's Alert Webhook will notify a URL of your choice via HTTP POST with information about answers that you receive that fit the rules you set in your alerts.

1. Setup

To setup the webhook login to our web interface and:

  1. Go to our settings --> notifications and create an alert
  2. Customise the alert and select "webhook" as your send to option
  3. Add your preferred URL and save the alert

πŸ“˜

The Alert Webhook will not follow redirects. Please make sure to use the correct URL, or posting will fail.

2. Requests

You will receive an HTTP POST containing a JSON object of the contents of the alert shortly after we receive the answer.

If we do not get a 2xx response, we will repeat the attempt 5 times over 50 minutes, before dropping the request.

3. Alert POST Example

{
  "alert": {
    "id": "NktCUnJTZWxUVUZxWTFEWkJkc3pLdzBzOEV6bW9OamxqOTdPMjJJOEJyWT0=",
    "name": "NPS alert"
  },
  "answer": {
    "updated_at": "2017-07-12T09:00:41Z",
    "score_type": "promoter",
    "score": 10,
    "sentiment": "positive",
    "sentiment_per_label": {
      "Delivery": "positive",
      "Customer Support": "neutral"
    },
    "labels": [
      "Delivery",
      "Customer Support"
    ],
    "labels_with_keywords": {
      "Delivery": ["dhl", "parcel"],
      "Customer support": ["call", "service"]
    },
    "additional_questions": {
      "how was your day": "10",
      "tell us more": "it has been really great day so far", 
      "which option would you pick": "option a",
      "which options would you pick": ["option a", "option b"]
    },
    "inserted_at": "2017-07-12T09:00:35Z",
    "id": "QWNGbzdkdlF5RU94SnhkMjRkU3RST0QwZ29EaU43dmJ6eUNPSUc0eVd1Yz0=",
    "comment": "Gran producto!",
    "translated_comment": "Amazing product!"
  },
  "survey": {
    "title": "Test survey",
    "id": "YjN6RU9pczhyUjBMNStOOWo5VjQ0RkE3RmZLK0lIeE5xZmYwS0Z3Z0dxZz0=",
    "channel_type": "email"
  },
  "recipient": {
    "last_name": null,
    "id": "ZWpMa3dxUmRPcHdwZFd1L1NnU3dzQWFHN0tqaGZwUndRTE1LZ2JMWjZuTT0=",
    "first_name": "Test",
    "email": "[email protected]",
    "identity": "[email protected]",
    "identity_type": "email"
  },
  "properties": [
    {
      "value": "USA",
      "name": "country"
    }
  ]
}
{
  "alert": {
    "id": "NktCUnJTZWxUVUZxWTFEWkJkc3pLdzBzOEV6bW9OamxqOTdPMjJJOEJyWT0=",
    "name": "NPS alert"
  },
  "answer": {
    "updated_at": "2017-07-12T09:00:41Z",
    "score_type": "promoter",
    "score": 10,
    "sentiment": "positive",
    "sentiment_per_label": {
      "Delivery": "positive",
      "Customer Support": "neutral"
    },
    "labels": [
      "Delivery",
      "Customer Support"
    ],
    "labels_with_keywords": {
      "Delivery": ["dhl", "parcel"],
      "Customer support": ["call", "service"]
    },
    "additional_questions": {
      "how was your day": "10",
      "tell us more": "it has been really great day so far", 
      "which option would you pick": "option a",
      "which options would you pick": ["option a", "option b"]
    },
    "inserted_at": "2017-07-12T09:00:35Z",
    "id": "QWNGbzdkdlF5RU94SnhkMjRkU3RST0QwZ29EaU43dmJ6eUNPSUc0eVd1Yz0=",
    "comment": "Gran producto!",
    "translated_comment": "Amazing product!"
  },
  "survey": {
    "title": "Test survey",
    "id": "YjN6RU9pczhyUjBMNStOOWo5VjQ0RkE3RmZLK0lIeE5xZmYwS0Z3Z0dxZz0=",
    "channel_type": "link"
  },
  "recipient": null,
  "properties": []
}

🚧

Recipient email field is deprecated

It will be removed in the future.