Could not get contact from Sample, alway return empty list | XM Community
Solved

Could not get contact from Sample, alway return empty list

  • 24 July 2019
  • 5 replies
  • 43 views

Hi everyone.

We need to get a list of contact with new response within a day. So we try to create a sample with lastResponse filter.
Everything work fine for creating definition (Create Sample Definition) and sample (Perform Sample on MailingList/Batch). When we check on website, we see the newly created list with some contact that met our criteria. We call "Get Create Sample Progress" and got a 100 percent result.
But when we call "Get Sample Contacts" API to get list of contact, we only receive an empty list.
So anyone know why? Is there any step we miss?

Thank for your help!
icon

Best answer by BinhPM 26 July 2019, 03:40

View original

5 replies

Badge +4
Hi @BinhPM: I am sure you must be passing the sampleId and mailingListId parameters properly which you will be getting while creating the sample contact. If these parameters are being passed properly then it must work.
Hi @Alok_Painuly: When call Create Sample, i pass the mailing list id into "parentId" paremeter and received "sampleId". On get-sample-contacts, i put directoryId and sampleId into the url. Response is 200 - OK, so sampleId is valid but no data returned. If i use GetSampleContacts v2.4 then i got the list of contact from Sample. But as v2.4 is deprecated and it return RecipientID instead of ContactID, it hard to process these data.
Badge +4
Hi @BinhPM: thank you for sharing. Just for the curiosity, what method you are using to execute the APIs? Is it in Qualtrics survey flow using web service element or some other way like postman?

I will try to do it with the same method you are using.
Hi @Alok_Painuly: I use postman first to test how Qualtrics API work before using Java code to create the whole flow, from create definition to get contact list.
I'm still stucking at how to get contact list from Sample.
Support team said that there a technical issue affecting this API call, and fixing it at the moment. So the only way is to wait until it fixed.

Leave a Reply