Capture Email Sent Date in Survey API | XM Community
Skip to main content

I'm using an API call to extract data from a survey and I would like to know if is possible to extract the date when the email was sent to the user, but I only have Recorded Date, Start Date and End date instead. Is there a way to capture this information using the API call?

@RiikeBueno Yes you can, but Survey and Distribution is 2 different aspect. Use this API and you can find the distribution you want base on surveyID: https://api.qualtrics.com/234bb6b16cf6d-list-distributions
Hope this helps


We set distributionId in embedded data, and then after exporting responses, run Get Distribution requests for each responseId value on each distributionId.


@Pavel Do I need to setup the distributionId in embedded data before export the response even If I using and API export? Or there's a way to bring that directly using the API call?

 


@Nam Nguyen thank you for your response. I could bring some information, but now I need to export all the distribution ID I have to bring that information. If you guys have any function in Python would be great.


@Nam Nguyen thank you for your response. I could bring some information, but now I need to export all the distribution ID I have to bring that information. If you guys have any function in Python would be great.

@RiikeBueno At the link I gave you, there’s an UI for you to set up the parameter and a sample code with python, you can actually test your API with it

Hope this helps


@Pavel Do I need to setup the distributionId in embedded data before export the response even If I using and API export? Or there's a way to bring that directly using the API call?

 

The Get Distribution API call would need to know the destributionId, and the only way to get in the response export output it is to set it in survey flow :(

What @Nam Nguyen suggested would also work, but we need a more real-time way to update responses with their respective distribution metadata, and the only way to do it is either through workflows with multiple web service tasks, or externally, albeit with a minor delay.

In our use case, we do it with a Python script that runs on a Cron schedule every X minutes, extracts new responses with continuation token, gets their respective distribution metadata, and then updates them again with update response API.


Leave a Reply