Linking two surveys and passing random string identifier | XM Community
Skip to main content

I know there have been all sorts of related questions, but I still can't figure out the right way to accomplish the process I need in order to link between two surveys: 

  • The first survey is an open one where people register for the research (consent form). 
  • The second survey, which is the actual research survey, should be closed, and people should automatically be redirected to it only after registering via the first survey. 

I want both surveys to have a shared identifier field with a random string that connects them, but other than that, there shouldn't be any other shared fields between them. Ideally, the random field should be saved as an external data reference because it seems more organized to me, but if that's not possible, it's also fine. 
What I have tried so far: 

  • On the first survey: I created a hidden field with JavaScript that generates a random sequence of letters and numbers.
  • On the survey flow I created an embedded data element that take this random string and save it as "user_id".
  • On the post survey option I created a contact trigger that added those people to a contact list and convert the user_id to external data reference.

And now I’m stuck...🙄

I tried to create a custom end-of-survey message that forwards to the next survey and passes the string to it, but it doesn't work as expected.
This is how the link looks:

https://qualtrics.com/jfe/form/SECOND_FORM_ID?${e://Field/user_id}

However, it only passes the literal text "user_id" instead of the actual random string.

I'm also unsure about what needs to be done in the second survey. I suppose I need to add an authenticator element at the beginning of the survey flow, but I don’t know how to make it automatically capture the string from the URL and pass the the user smoothly to the actual survey.

 

Any help would be appreciated.


 

 Hi @kerem 

Try use below link :

https://qualtrics.com/jfe/form/SECOND_FORM_ID?user_id=${e://Field/user_id}

You are not passing the query parameters properly. Refer to the below link

https://www.qualtrics.com/support/survey-platform/survey-module/survey-flow/standard-elements/passing-information-through-query-strings/

 

For authenticator refer below link

https://www.qualtrics.com/support/survey-platform/survey-module/survey-flow/advanced-elements/authenticator/authenticator-overview/ 


Hi @krbhavya  

Thank you for your answer. I have successfully passed the query parameters.

However, I have realized that I can't close the second survey and use an authenticator that will pull the new contacts from the contact trigger I added as a post-survey action in the first survey. It seems that the updates don't happen quickly enough.

It's a bit risky, but I suppose I have to leave the second survey open and hope that people won't enter it without answering the first one.


Hi @kerem 

I think the redirect url will do the job as one who submits the first survey only those will be redirected to second survey.


Leave a Reply