Events
Table of contents
As a Survicate user you’re able to choose which events will be triggered when receiving answers to your surveys.
Question answered
Question answered event is triggered upon each respondent’s answer. Each answer to every single question will be sent along with respondent data.
Sample payload
{
"messageId": "c0101a21572ca643fd9f9ad40a5a4650",
"deliveryTries": 0,
"event": {
"questionAnswered": {
"survey": {
"id": "b92b6ecae6dd7207",
"name": "Satisfaction"
},
"url": "https://survey.survicate.com/43f2d5789346d6ad",
"timestamp": "2019-05-10T06:46:02+00:00",
"respondent": {
"id": "534759",
"platform": "OSX",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36",
"attributes": []
},
"question": {
"id": 12123,
"body": "How would you rate our customer service?"
},
"choice": {
"id": 21573,
"body": "Great",
"comment": null
}
}
}
}
Object | Attribute | Type | Description | |
---|---|---|---|---|
messageId | string | Webhook ID | ||
deliveryTries | number | Number of attempts to send a webhook | ||
questionAnswered | type | string | Question type - described in detail below the table | |
questionAnswered | timestamp | string | Timestamp of the event occurrence | |
questionAnswered | url | string | URL where the response was given | |
survey | id | string | Survey ID | |
survey | name | string | Survey name | |
respondent | attributes | object | All respondent custom attributes | |
question | body | string | Question content | |
question | id | number | Question ID | |
choice | body | string | Answer content | |
choice | comment | string | Respondent comment |
Survey answered
Survey answer event sends webhooks upon each survey completion. Please note that this event will be triggered only when the whole survey is completed.
Sample payload
{
"messageId": "c0101a21572ca643fd9f9ad40a5a4650",
"deliveryTries": 0,
"event": {
"surveyCompleted": {
"survey": {
"id": "b92b6ecae6dd7207",
"name": "Satisfaction"
},
"url": "https://survey.survicate.com/43f2d5789346d6ad",
"timestamp": "2019-05-10T06:46:02+00:00",
"respondent": {
"id": "534759",
"platform": "OSX",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36",
"attributes": []
},
"questionsAnswered": [
{
"choice": {
"id": 21573,
"body": "Great",
"comment": null
},
"survey": {
"id": "b92b6ecae6dd7207",
"name": "Satisfaction"
},
"url": "https://survey.survicate.com/43f2d5789346d6ad",
"timestamp": "2019-05-10T06:46:02+00:00",
"respondent": {
"id": "534759",
"platform": "OSX",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36",
"attributes": []
},
"question": {
"id": 12123,
"body": "How would you rate our customer service?"
}
},
{
"text": "Sample answer to your text question",
"survey": {
"id": "b92b6ecae6dd7207",
"name": "Satisfaction"
},
"url": "https://survey.survicate.com/43f2d5789346d6ad",
"timestamp": "2019-05-10T06:46:02+00:00",
"respondent": {
"id": "534759",
"platform": "OSX",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36",
"attributes": []
},
"question": {
"id": 12122,
"body": "What was the reason for your score?"
}
}
]
}
}
}