Is it possible to automatically generate an edit link in an e-mail workflow?
Hello,
I am creating a survey and I am wondering if there is a possibility to generate an edit link (anonymous link with the Q_R=${rm://Field/ResponseID}&Q_R_DEL=1 part appended) in an e-mail sent by a workflow? This is because the survey will be copied several times with slight edits in the future. It will take less time for us if this could be automated somehow when new versions are made from a copy.
Thank you!
Page 1 / 1
While you can always type in the survey URL's into the workflow's Email Task, I have used something like you're describing by setting the survey URL as Embedded Data and then using JavaScript to parse out the anonymous link into an Embedded Data field. This Embedded Data field can then be used in the workflow's Email Task. To give it a try, first add the following Embedded Data fields to the top of your Survey Flow:
Then, on the first question of the survey, add the below to the question's JavaScript, which will save everything to the left of the "?" to the Q_BaseURL Embedded data field. If no “?” exists in the URL because it was administered with just the anonymous link, the anonymous link will be saved to this field.
Qualtrics.SurveyEngine.addOnReady(function() { /*Place your JavaScript here to run when the page is fully displayed*/ const url = "${e://Field/Q_URL}"; const urlParts = url.split("?"); const baseUrl = urlPartsP0]; Qualtrics.SurveyEngine.setEmbeddedData("Q_BaseURL",baseUrl);
});
Then in the Email Task, use the below to construct the retake link: