Create a survey link for specific session ID | XM Community
Solved

Create a survey link for specific session ID

  • 3 June 2019
  • 7 replies
  • 223 views

Hi All

Is there a way to specify session ID in survey link? I'm able to create session thru API and I want to get a link for that specific session.
I tried adding ?SID=<sessionId> to Anonymous Survey Link but that didn't work

Best regards,
Vlad
icon

Best answer by KendraR 27 June 2019, 04:45

View original

7 replies

Userlevel 7
Badge +22
@vshalamov , I would like to know how you are getting the session ID.

By the way, its "SSID"
Hi rondev

I used Start Survey Session API call: https://api.qualtrics.com/docs/working-with-surveys-using-the-conversational-apis#starting-a-survey-session
That would return SessionID. However when trying to add it as ?SSID=.... to survey link getting error:
"A Headless API session must be resumed from a Headless API compatible client."

This is the flow I was trying to implement:
We have a web app where client wants to launch a survey for a user - data collector would log in, can access user profile etc. and then press a button to launch Qualtrics survey. At that point record in our system is created indicating that survey was launched and in progress. What I was hoping I can do is:
- use API to start a session
- attach sessionId to survey link and open it in new window
- use surveyengine.completedResponse webhook to POST back to our web app when survey was completed.

I now see that completedResponse webhook doesn't send sessionID back so I'm not sure what I want to do is even possible.

I'd appreciate any feedback
Best regards,
Vlad.
Userlevel 7
Badge +22
We cannot use the session id generated by conversational API in the UI, so this method is not possible.

Please describe your use case more clearly, so we can find some other way
Here is the flow:
1. Data collector logs into web app, can access user profile (these users exist outside of Qualtrix)
2. Data collector can launch a survey for a user
3. In our system record is created that user is taking a survey
4. Once survey is done need to update record from step 3 to mark survey as completed

For step 2 - I know I can get list of active surveys thru API, so I can get a link of current survey and open it in a new window.
For step 4 - I thought I could use a webhook however I'm not sure how to link a record in our system to particular response in Qualtrix.
Userlevel 7
Badge +22
> @vshalamov said:
> Here is the flow:
> 1. Data collector logs into web app, can access user profile (these users exist outside of Qualtrix)
> 2. Data collector can launch a survey for a user
> 3. In our system record is created that user is taking a survey
> 4. Once survey is done need to update record from step 3 to mark survey as completed
>
> For step 2 - I know I can get list of active surveys thru API, so I can get a link of current survey and open it in a new window.
> For step 4 - I thought I could use a webhook however I'm not sure how to link a record in our system to particular response in Qualtrix.


Are you saying each data collector will open new survey for new user what if we have many users?

If your system allows email distribution you can create anonymous link with unique identifier passed in URL and send to respective user.
It's the same survey for every user. User's info such as email are not known prior to survey creation and users are allowed to answer it in person only - i.e. with data collector's help.
So unfortunately email with personal link is not an option
Userlevel 6
Badge +11
Hi, @vshalamov! Just wanted to let you know that while it is not possible specify session ID in a survey link with API, you could close the session and make a retake link. If you have any further questions about this, feel free to reach out to our Support Team! 😀

Leave a Reply