Get ContactID for a Response | XM Community
Solved

Get ContactID for a Response

  • 19 March 2018
  • 8 replies
  • 356 views

Hi,
Is there a way to get the ContactId of the response. Currently when I export the response data for a survey via API, the csv has a Recipient email/first name/last name etc however it does not have any ContactId.

Background:
Currently I am trying to create prototype and in order to relate the response data to contact data I am doing the following:
(1) That gets a Survey data for an SurveyID
(2) Get's the Distribution list and MailingListID (I have only 1 distribution list)
(3) Get's the contacts from the Distribution list
(4) Download the response data
(5) Join the response data to contact data based on email address
(6) Save it to another database

I don't want to use the email as the "Joining" entity.

Thanks
icon

Best answer by AravindA 2 May 2018, 04:17

View original

8 replies

Userlevel 4
Badge +3
Let me look into this - I would expect that the ContactID would be included with the export, but I haven't worked much with it. Perhaps you could include it as an Embedded Field?
Userlevel 7
Badge +27
You can include RecipientID as an embedded data field. If you are using Target Audience RecipientID and contact id are not the same thing. Including ContactID as an embedded data field doesn't work.
Yeah there is no way to include ContactID as an embedded field. Look's like the only way to join them is use email as I suggested in my post
Userlevel 7
Badge +27
Why not use RecipientID as the joining field? It is a unique identifier for a recipient in a mailing list and doesn't change.
How to include RecipientID in the response export?
Userlevel 7
Badge +27
Just add it as an embedded variable:
!
Thanks! that works. I am looking if there is an existing API call (or chain of calls) that I can use to get the Contact details using the RecepientID
Unfortunately, we don't have an API endpoint to do this right now. However, we have heard this request a few times now. I have since notified the Target Audience team to add this to their backlog!

Leave a Reply