Question
Understand the flow of a survey when exporting survey questions through API
Hi All,
We are currently working out how best to export the Qualtrics data and import it into our data warehouse to allow further analysis. The exporting of responses is well documented via API but we've come across a number of things that don't seem possible. One area is it doesn't seem possible to understand the flow of the survey and the order in which the questions were answered. We're trying to capture the routing of the survey aswell as the survey questions and the response information and this is particularly important when you are using a non linear survey such as a table of contents.
Some ways to get round this include:
-Tag each question with its parent question by QID but this would be very manual and prone to error if the survey is changed.
-Time each question so that you can then work out the chronological order and from that understand the routing - but similarly to the Tag option, this might not work so well if a participant goes back to a question to change it.
-Work out how to translate the display logic, skip logic and survey flow branching information from the Survey export.
I’d be grateful for any guidance on best practise and some examples.
Thanks
Rod Pestell
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

However, as you have pointed out, this won't work for surveys using the Table of Contents feature where a respondent can skip from section to section. In this case, I would recommend adding Javascript to each question that will keep track of a respondent's path through the survey by appending the question number to a string stored in an embedded data variable. This will keep track of each question the respondent sees in their path through the survey (screenshot 2, 3).
!
```javascript
Qualtrics.SurveyEngine.addOnload(function()
{
//Javascript for splitting Time/Focus on Site
var path = "${e://Field/javascriptSurveyPath}";
var updatedPath = path + "," + "Q1"
Qualtrics.SurveyEngine.setEmbeddedData('javascriptSurveyPath', updatedPath);
});
```
The result is a list of values in the data set that can be used to derive the path taken through the survey (screenshot 4). In the example below, I completed the survey twice using different paths through the Table of Contents.
!
Let me know if you have any questions. I hope that helps!