Surveys webhooks
Because all texts in the surveys can be localized, we don't send actual text values, but question and answer IDs. You can find the IDs on the Developer info screen.
Payload
The survey answers webhook payload contains the following properties:
{
"type": "webhook:newsurveyanswer",
"data": {
"projectCode": "YOUR WORKSPACE CODE",
"surveyId": "SURVEY ID - GUID",
"authorName": "John Smith", // if provided to PF
"authorEmail": "john@example.com", // if provided to PF
"authorUsername": "username",
"answers": [
{ // QUESTION TYPE - EMOTICONS
"questionId": "e6bd895a-09a4-4bbc-981e-57cadb0a5135",
"questionType": "emo",
"answer": "π"
},
{ // QUESTION TYPE - NPS
"questionId": "bf06b03a-6898-4553-82ba-045cd2b6a3ac",
"questionType": "nps",
"answer": 9
},
{ // QUESTION TYPE - NUMERIC SCALE
"questionId": "570175a5-326d-4f77-9df9-ec5c2163a697",
"questionType": "scale",
"answer": 1
},
{ // QUESTION TYPE - SINGLE_LINE TEXT
"questionId": "0391b74c-0c89-4edc-801b-90cc5b0f10a4",
"questionType": "txt",
"answer": "This is awesome!"
},
{ // QUESTION TYPE - MULTI-LINE TEXT
"questionId": "280df468-c018-4513-8f25-5131c94e5499",
"questionType": "ltxt",
"answer": "Dear authors,\nI want to thank you! You have the best support team ever!!!\n\nYour customer Mike"
},
{ // QUESTION TYPE - MULTIPLE CHOICE
"questionId": "3757cbd3-fb32-41e1-9bf0-d19e11e14033",
"questionType": "chk",
"answer": [
"fe67dc10-f61c-4ceb-8141-816686c38d27",
"6f34299f-8be1-414d-b559-eff2fb5646b3"
]
},
{ // QUESTION TYPE - SINGLE CHOICE
"questionId": "70306ce8-abe2-4fab-92cd-c5bd841fd62d",
"questionType": "rbtn",
"answer": "34cca511-9f3c-4592-b76d-450a2ec2b3a6"
},
{ // QUESTION TYPE - MESSAGE TO USERS (no user input possible here)
"questionId": "59c72947-4c50-40fe-9988-aa16ad12a9e0"
"questionType": "stat",
},
{ // QUESTION TYPE - MULTIPLE CHOICE with _other_ option selected
"questionId": "1022c827-81ca-4e48-b841-161d4fd94974",
"questionType": "chk",
"answer": [
"ffea37de-9b5e-4bde-943b-89337a35540c",
"other"
],
"other": "This is simply the best option."
},
{ // QUESTION TYPE - SINGLE CHOICE with _other_ option selected
"questionId": "4eb0d384-9519-4c0e-b764-8f439e38d8fb",
"questionType": "rbtn",
"answer": "other",
"other": "Single choice is not enugh!\n\n\n\n\nTrust me!"
}
]
}
}