Capture Email Sent Date in Survey API | XM Community
Question

Capture Email Sent Date in Survey API

  • 8 November 2023
  • 6 replies
  • 52 views

Badge +1

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?


6 replies

Userlevel 7
Badge +20

@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

Userlevel 2
Badge +6

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

Badge +1

@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?

 

Badge +1

@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.

Userlevel 7
Badge +20

@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

Userlevel 2
Badge +6

@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