All Collections
How to create a project from start to the end
How to transfer results to a collective survey with webhooks?
How to transfer results to a collective survey with webhooks?
Adam Żołądź avatar
Written by Adam Żołądź
Updated over a week ago

It is possible to transfer results from several surveys to a collective survey. This is useful when we are testing NPS on several markets and we want to have the results of this research split down into individual markets and at the same time measure NPS from all markets together.

A webhook is nothing more than a URL with parameters called by another IT system or opened in a typical web browser.

The URL we will use contains the link to the collective survey with some extra parameters.

The survey link should be copied from the survey, which we want to analyse later - the link is available in the tab Share -> Survey link.

To create a webhook that is used to transfer the results from survey 1 and survey 2 (source surveys) to survey 3 (collective survey), paste the copied survey 3. link into the webhook address field (Create -> Alerts and webhooks) of survey 1 and 2 - you have to create alert in each survey 1. and 2. with sending channel "as webhook".

To make the webhook work correctly, you need to replace /survey/ to /prefill/ in the URL address and add additional parameters to the link that you want to transfer.

Inserting /prefill/ is important in the case of surveys that are created on more than one page. It is also important that the questions in questionnaire 3 (collective survey), which measures NPS as a whole, should contain all the questions on one page.

Assuming that we only study NPS, and our collective survey contains only one question - NPS, such a link should look like below:

If you set up such a link, the answer from question 1 in source survey, which is the NPS question, will be transferred to the question 1 in collective survey, which is NPS question too.

It is important to set the webhook on each survey for a specific market. If the respondent completes the questionnaire No. 1 concerning the Polish market, the completion will automatically appear also in the project No. 3 in which the NPS from all markets is measured.

To illustrate how the answers will be displayed after using the [ANS_ID_X] and [ANS_NR_X] macros, we have prepared a test survey in which the questions and answers look like this:

If we use these macros:

The answers will be as below. We marked the first answer in each question.

As you can see, the [ANS_NR_X] macro carries the ordinal number of the response. In contrast, [ANS_ID_XXXXXX] carries the exact response value.

If we want to transfer not only the responses, but also the external key and user token attributes, the link should look like this:

Please remember to turn on the highest security level in your survey, if you want to pass user_token to the other survey. Such operation is not needed, if you want only to pass external_key.

The list of available macros that can be used as additional parameters is shown below:

[ANS_ID_X] - The content of the answer (useful in open-ended questions). Question ID can be copied from dynamic content - Answer in question X.

[ANS_NR_X] - Answer position in question X. If the respondent selects 0 in the NPS survey, then the position will move as 1.

[EXTERNAL_KEY] - The external key parameter.

[ATTRIBUTE] - Respondent's label.

[USER_TOKEN] - Respondent token.

Did this answer your question?