What is Webhook?

What is a webhook?

A webhook in web development is a method of augmenting or altering the behavior of a web application, with custom callbacks. These callbacks may be maintained, modified, and managed by third-party users and developers who may not necessarily be affiliated with the originating application. QuestionPro supports both incoming and outgoing webhooks. Webhooks can be invoked before the survey starts, during the survey (before a question) or after the survey is completed. You can set up webhooks from the Integrations >> Webhooks section:

Survey Software Help Image

What are incoming webhooks?

Incoming Webhooks are a simple way to post messages from external sources into your survey.

What are outgoing webhooks?

Outgoing webhooks can be used to send survey data to an external source. They make use of normal HTTP requests with a JSON payload.

How to set up webhooks?

To create a webhook:

  • Click on the Add New Webhook button.
  • Enter a description for your webhook
  • Select the required type (incoming / outgoing)
  • Choose when the webhook should be invoked.
  • Click on Save Changes
  • Survey Software Help Image
Once the webhook has been added, you’ll need to provide the data required to make the API call:
  • API URL: The endpoint URL for making an API call
  • Method: The HTTP method used for making the call
  • Request Header: HTTP header fields which are components of the header section of the request
  • Request JSON: payload data required by the API
Once you save the above information, QuestionPro will make a call to the specified API and display the response:
Survey Software Help Image

How to use retrieved data from an incoming webhook?

You can save the data retrieved from the external resource by mapping it to custom variables:

Survey Software Help Image

You can map the data to custom variables by assigning individual JSON keys to specific custom variables. You can also assign a relevant name to the custom variables:

Survey Software Help Image

Once the mapping is set, the collected data can be displayed in the survey using the following code: ${KEY}

How to provide data for an outgoing webhook?

In case of outgoing webhooks you can send the data collected in custom variables to an external web service by adding the custom variables on the Request JSON:

Survey Software Help Image

War dieser Artikel hilfreich?
Das tut uns leid
Wie können wir es verbessern?

Das könnte Sie auch noch interessieren...