Quiz Responses
Learn how to get quiz responses to your server via webhooks
Last updated
Learn how to get quiz responses to your server via webhooks
Last updated
This webhook service provides you with information about the answers to the questions in the quizs when you use the quiz feature on your sales sites. When you enable this webhook service, you will only receive responses from users who have completed a purchase. However, if you would like to receive answers from users who have not completed a purchase, you need to check the preference box in the webhook field.
Webhook events are sent to your server via HTTP POST
. You configure the endpoint URL through Developer Tools / Webhooks menu under your project.
By default, webhook notifications include only the quiz responses from users who have paid. You can configure to also receive quiz responses from users who have not paid.
After the survey is completed and the payment is finalized, the first notification will be sent within 5 minutes. For users who have not completed the payment process, this period is half an hour. Your server should return a 200 status code. Any other status code will be considered a failure by our backend. In case of failure, Zotlo will retry later (up to 10 times) with 1-hour intervals. After 10 retries, we will stop sending notifications.
Webhook events are serialized in JSON. The body of a POST
request to your server will contain the serialized event.
Field | Description |
---|---|
client.subscriberId
Subscriber ID which can be email or phone number.
client.subscriberName
Name and surname of the registered user.
client.email
Subscriber email.
client.uuid
Unique user ID.
client.isPayer
Value is sent as 1
if the user has made a successful payment, otherwise 0
. If it is 1
, it indicates that the purchase transaction has been completed, if it is 0
, it indicates that the purchase transaction has not been completed.
client.platform
User device OS.
client.country
User country.
client.language
User language.
client.utmSource
UTM source parameter.
client.utmCampaign
UTM campaign parameter.
client.utmContent
UTM content parameter.
client.utmTerm
UTM term parameter.
client.paymentModule
It specifies which module the process belongs to. It takes the generate
value for Zotlo Self Service and the store
value for the marketplace.
client.flowId
It is the ID in Zotlo of the flow added to the sales site.
client.siteId
It is the ID information of the sales site in Zotlo.
client.ip
User's IP Information.
questions
Question details.
questions.questionId
Question ID
questions.questionName
Question name.
questions.question
Quetion title.
questions.settings
Question design settings.
questions.sequence
Question order.
questions.displayedSequence
Question order seen by the user.
questions.required
Value is 1
if answer is required for the question otherwise 0
.
questions.isMultiple
Value is 1
if multiple answers are allowed for the question otherwise 0
.
questions.typeId
Question type, possible values:
0
: Multiple choice
2
: Image chooser
4
: Info page
5
: Date
6
: Time
7
: Single row text
8
: Location
9
: Ending page
10
: file upload
questions.typeName
Question type name.
questions.isLogic
true
if question has a logic false
otherwise.
answers
It is information about the answers answered in the survey. If there is multi-language support, the answers are sent in the language in which the user answered.
answers.answerDate
Answer date.
answers.answer
Answers to the question.
answers.answerOptions.optionId
Option ID if question is a multi select type.
answers.answerOptions.name
Option text if Option ID if question is a multi select type.
answers.answerOptions.type
It is the answer type of the question. It can take image or text values.
answers.answerOptions.image
This is the image of the answer.