How to delay end of survey redirect to url? | XM Community
Skip to main content

Dear Community,
Would be great if someone could advise on the following. I searched though the community, but could no find a solution for this issue.
What we would like to achieve/ Why is there a need to delay:
I would need to delay the redirect to a custom URL by two to three seconds at the end of the survey, but can not achieve this with the "Customize End of Survey". So I guess, I would need to the it via JavaScript in the End of Message?
The delay is needed given we connect Qualtrics via the API to another SaaS solution, where respondents will see an evaluation of their survey results. The Qualtrics API push + data pipeline on the middle-layer takes some time, so the data is not yet available at the other end if the respondents get redirected immediately, thus the need for a delayed redirect.
The URL needs to be customized for each respondent by including embedded data. It has the following structure:
http://externalurl.com/?key=${e://Field/resonedent_id}&token=${e://Field/respondent_token}
Limitations:

  • The delay need to take place at the end of survey, after the qualtics API was triggered

  • It's unfortunately not possible to implement the delay in the receiving SaaS solution

  • URL needs to be customized for each responded as shown above

Any hints at possible solutions are very welcome.
Thx a lot.

Yes, you need to add JS to the end of survey message. Put it inside a


Do I need to do something special to pipe the embedded fields. For example pipe them separately and put them together:
var key = ${e://Field/resonedent_id}
var token = ${e://Field/respondent_token}
var url = "http://externalurl.com/?key=${key}&token=${token}"


Your JS looks OK to me.
You don't need to pipe the embedded data separately. However, whenever you do pipe embedded data fields into JS they must be inside quotes (either separately or as part of a larger string).


Dear Tom,
It worked, once I published the survey.
Thank you very much for the support! 🤗



Leave a Reply