Setting embeddedData parameter in Update Response API call (v3) - only existing embedded data fields | XM Community
Skip to main content
When working with the Update Response API call (https://env.qualtrics.com/API/v3/responses/responseId) the embeddedData parameter seems to only set embedded data fields that appear in your survey flow. You cannot set a {"IgnoreResponse":"true"} embedded data field through the API call unless a 'IgnoreResponse' embedded data field is already set in your survey flow. (I thought I would post this note since the API documentation does not make this clear.)



I ran across this behavior because I was creating new versions of responses via the qualtrics.com/jfe/form/[surveyId]?Q_R=[responseId to update] call. This allows me to keep the original response, but create a copy that needs corrections.



Having multiple copies of a response however caused a problem with my reports. I wanted to keep all revisions of my responses for audit purposes but also ignore the old responses in my reports. To do this I needed to add embedded data to ignore the older responses. I decided to add a 'MiscJson' embedded data field to my surveys as a 'catch-all' for miscellaneous JSON data to set for reporting purposes. This prevented the need to add additional embedded data fields to the surveys later. So my JSON might look like

{ "MiscJson": {"productionApp_IgnoreResponse":"true", "testApp_IgnoreResponse":"false"}}



_(Keep in mind that each time you update the MiscJson via the API, whatever is sent in the API call will overwrite the name/value pairs currently set in the MiscJson for the response. If you wish to keep the existing name/value pairs and APPEND new name/value pairs, you would first need to pull the MiscJson embedded data for the response and use a script to append additional name/value pairs to the MiscJson object before updating the response again via the API.)_



Having the ability to append additional JSON data to embedded data fields in my responses after the responses are submitted is super helpful, so thanks to the Qualtrics engineers for allowing that. This is especially critical with post-processing offline responses where passing embedded data to the the survey is not possible but is needed for reporting and data management.
Be the first to reply!

Leave a Reply