responseexports and Embedded Data | XM Community
Skip to main content
When I use responseexports to get survey responses I can't seem to get the embedded data in the export. I HAVE used includedQuestionIds to specify both the blanket "embeddedData" as well as individual field names (not at the same time, obviously) and neither one will give me any embedded data. I have also passed individual question IDs with includedQuestionIds so I know that my class and the json are technically correct, I just cant get the embedded data. What am I missing?
Hi @merlyn383 ,



Please check if all paremeters are passed correct, refer below link



https://api.qualtrics.com/docs/create-response-export
@bansalpeeyush29 Yes, I believe so. Here is what I'm passing:

`{"format":"json","includedQuestionIds":["QID1","QID2","QID3","QID4","QID5","embeddedData"],"surveyId":"SV_XXXXXXXXXXXXXXX","useLabels":true}`

Everything works, including only getting questions 1-5, but I don't get any embedded data.
Can you check trying passing the embedded variable names rather than embededdata
I'm not sure what "embedded variables" are. I know what Custom Variables are but they won't work for me because the data that I'm trying to pass are strings. Specifically, my survey is behind a CAS so I'm pulling their authentication UserID after they sign in. I'm writing that UserID to an embedded data field called "userID". I've tried both `{"format":"json","includedQuestionIds":["QID1","QID2","QID3","QID4","QID5","embeddedData"],"surveyId":"SV_XXXXXXXXXXXXXXX","useLabels":true}` and `{"format":"json","includedQuestionIds":["QID1","QID2","QID3","QID4","QID5","userID"],"surveyId":"SV_XXXXXXXXXXXXXXX","useLabels":true}`, neither of which will get me any of the embedded data.
Have you defined userid in survey flow. Syntax is correct.try in array with only userid and remove other questions to check what it pulls.
Plus in normal data export which we do going to data analysis tab are you able to extract this variable.
Yes, the userID is defined in the survey flow as part of the SSO step. If I export data to a CSV via the Data Analysis I can see the field (including `{"ImportId":"userID"}`) but the field does to show up in any API queries using responseexports. I tried just exporting the userID field as you suggested above but it did not work either.

The code `{"format":"json","includedQuestionIds":["userID"],"surveyId":"SV_XXXXXXXXXXXXXXX","useLabels":true}` generates the result

`{

"responses":[

{

"ResponseID" : "R_XXXXXXXXXXXXXXX",

"ResponseSet" : "Default Response Set",

"IPAddress" : "XXX.XXX.XXX.XXX",

"StartDate" : "2018-10-01 09:05:44",

"EndDate" : "2018-10-01 09:06:24",

"RecipientLastName" : "",

"RecipientFirstName" : "",

"RecipientEmail" : "",

"ExternalDataReference" : "",

"Finished" : "1",

"Status" : "0",

"LocationLatitude" : "39.95970153808594",

"LocationLongitude" : "-75.1968002319336",

"LocationAccuracy" : "-1"

}

]}`



And yes, I can get the data via a manual export but I need to be able to send data data back and for the between servers/applications using APIs. The documentation for https://api.qualtrics.com/docs/create-response-export says that retrieving embedded data is possible. I just can't get it to work.
Everything looks good, not sure why it's not fetching this variable. You can check with support team.

Leave a Reply