Guides
Trin for trin-vejledninger til opsætning og brug af systemet.
Guides - Questionnaire: Finish/edit
-
Guides
- General
- Booking
- Event
- Cash Register Add-On
- Gift Voucher Add-On
- Marketing Add-On
- Record Add-On
- Form Add-On
- Documents
- Online Payment Add-On
- SMS Add-On
- Integrations
- For developers
- API and webhooks
- REST API
- Webhooks
- Scheduled webhooks
- Create a webhook
- Event webhooks
- Booking: Create/edit/delete
- Customer: Newsletter subscribe/unsubscribe
- Reward program: Balance update
- Cash register: Completed sale
- Cash register: Completed sale - per line item
- Customer: Master data updated
- Cash register: Cash reconciliation
- Online paid/cancelled orders with customer attached
- Work hours: Create/edit/delete work hour
- Event: Create/edit/delete
- Event participant: Sign up/cancel/edit
- Questionnaire: Finish/edit
- Voucher: Completed transaction
- SSO - Single Sign On
- API and webhooks
Questionnaire: Finish/edit
This webhook can be used to send a customer's questionnaire answer when the answer is completed, and when a completed answer is subsequently edited. Under "Run at" you choose whether the webhook should run on "Completion of questionnaire", on "Edit of completed questionnaire" or both. Under "Questionnaire(s)" you choose whether it should apply to answers to all questionnaires or only to specific questionnaires. When an answer is completed or edited, the webhook is added to a queue that is processed every 5 minutes. It can therefore take up to about 5 minutes before the webhook is sent. Answers created or edited through the API do not trigger this webhook. Example of JSON that can be sent: |
{
"action": "COMPLETED",
"questionnaireAnswerId": [questionnaireAnswerId],
"questionnaire": {
"questionnaireId": [questionnaireId],
"questionnaireName": "[questionnaireName]"
},
"customer": {
"customerId": [customerId]
},
"answerList": [
[each_question_begin]
{
"fieldId": [questionAnswerFieldId],
"fieldName": "[questionName]",
"answer": "[questionAnswer]",
"answerValue": "[questionAnswerNumeric]"
}[lineBreak]
[each_question_end]
]
}
![]() |
The webhook cannot itself tell whether the answer has just been completed or edited. If you want to tell them apart, create two webhooks, one with "Completion of questionnaire" and one with "Edit of completed questionnaire", and write a fixed text in "action", for example "COMPLETED" in one and "EDITED" in the other. |
The replacement codes in the example above will be replaced with the following data when the specific webhook runs:
Between [each_question_begin] and [each_question_end] the content is repeated once for each question in the questionnaire. The following codes can be used here:
In addition to the above, you can use the replacement codes for Customer, which apply to the customer who answered the questionnaire. |
