Generate Individual Link via API | XM Community

Generate Individual Link via API

  • 23 September 2022
  • 7 replies
  • 334 views

Userlevel 1
Badge +9

Is there a way that we can generate survey link for a single contact? I know there's an API under Create Distribution but this will create links for all contacts in the mailinglist.
My use case is for Live Chat post-transaction, so I need to generate an individual link everytime customer completed their transaction with a live agent.


7 replies

Userlevel 7
Badge +27

You can generate a link for a single contact by using contactId instead of mailingListId.

Userlevel 1
Badge +9

Hi TomG - will this work with create distribution but not send them out? Referring to this one.

Userlevel 7
Badge +27

Yes, just replace

"mailingListId": "CG_6F1gRt186CZOVoh"
with
"contactId":"contact id goes here"

Userlevel 1
Badge +9

Hi TomG - I tried to run it but I got the below error message. Am I missing something?
image.png

Userlevel 7
Badge +27

I guess you have to include both mailingListId AND contactId to get an invididual link.

Userlevel 1
Badge +9

Looks like the feature is not available at the moment.
image.png

Badge

Found this discussion and I believe it is worthy to share how to use the API properly. It took me a while to figure it out.

The contactID value you have to input actually is the contact Lookup ID (which refers to the contact in the mailing list) - you can retrieve that one using the GET contact in list or directory APIs.

 

The prefix for the contact Lookup ID value is CGC_xxxxxxxxxxxxxxxxx. So, the body should look like that:

 

Leave a Reply