Straight-forward way to append two surveys? | XM Community
Question

Straight-forward way to append two surveys?

  • 1 December 2023
  • 3 replies
  • 39 views

Badge +1

I've been looking for ways to use the API to create a new survey by concatenating other surveys given their IDs. I couldn't find anything that seemed like it would work for surveys directly, so I turned to the block API calls. Using these, I can get a block from an existing survey with GET and then POST it to the survey I want to append to. It's possible I overlooked some parameter in the call, but it seems like the POST only adds the metadata about the block - some options and the IDs of the questions in it - to the survey. I then have to go back to the original survey metadata and manually use GET to retrieve all the questions the block contained. For some reason, this returns them ordered differently from how they're actually displayed, so they then need to be reordered using the block metadata. After that, I can use a bunch of POST calls in a for-loop to append the questions to the appropriate block, one at a time.

This ultimately works, but it runs a little too slowly for my liking. It seems like appending blocks, or even entire surveys, would be a common enough use case for there to be a cleverer, and hopefully faster, solution. Is there anything I'm missing, or should I just stick to my current workaround?


3 replies

Userlevel 7
Badge +33

did you try to use reference survey module under survey flow.
 

 

Refer below link and see if this option will resolve your issue.
https://www.qualtrics.com/support/survey-platform/survey-module/survey-flow/advanced-elements/reference-surveys/

Userlevel 3
Badge +11

Try using Reference survey 

Badge +1

This would be great if we just wanted to append two surveys once. But we are trying to write code using the Qualtrics API that will automatically concatenate different small surveys to create a large survey in response to user input. You can see the current system (that doesn’t yet do this) here: https://econ-assessments.org

Leave a Reply