Integrating Qualtrics survey into a transaction flow | XM Community
Skip to main content

Hello, everyone. I am a senior software engineer given the requirement to integrate a qualtrics survey into the normal flow of our transactions. The result need not be instantaneous, but the key point is that the customer must complete the survey before continuing on to the next step, which in this case is to get an artifact.
So the flow is:
1) Customer presses a button "Get thing".
2) If the customer has not already taken the survey, they are redirected to the survey. They take the survey.
3) After the survey is done, they return to our website and are presented with the window again. This time, they press "get thing" and get their new , shiny thing!
Let's call the thing uniquely identifying this operation as 'transactionID'. A user can have many transactions in flight at the same time, so we can't just assume that the customer id uniquely identifies the transaction in question.
So ... how to implement this?
I can think of two solutions:
Solution 1: Site-Intercept logic on qualtrics survey.
1A) User presses button. Goes to a qualtrics survey.
1B) survey site-intercept captures the transactionID and adds it to the response's embedded data.
1C) User takes the survey. When the response is completed, our system is notified by a webhook on response.completed, which tells us both that a response is completed and the responseID that was so completed.
1D) Using the survey response endpoint, we query based on the response id. This returns the response and the embedded data associated with it. We pull the transactionID (stored in 1B) from the embedded data. We then mark the transaction associated with transactionID something like 'survey complete' in our own system.
1E) The customer is now free to walk home with their shiny new thing!

SOLUTION 2: Programmatically create response.
In this case, we don't bother with doing anything on the qualtrics side. Instead, we create the survey and the questions and so forth entirely on our own web site, then use the qualtrics API to create the response with questions and answers programmatically. In this case, we don't need site intercepts or webhooks or additional calls -- since we know on our own system when the user has completed the survey, we can mark it 'survey complete' ourselves.
These are the two proofs-of-concepts I have come up with to answer the requirement.

What do you think? I'm looking for a second set of eyes here. Are there any gaping flaws with either solution? Is there a third method I have missed that is easier?
Respectfully,
Brian P.




IMHO, option 2 appears to be more stable. Conventional marketing wisdom says that the path to purchase should be as smooth as possible, therefore, I would try to avoid as many redirects as possible.
I'm not sure how site-intercept works, but one options could be to open the survey in a modal and capture the information from there.


Thank you. I'll leave this open for another two days to collect other answers. If no one else responds in that time, I will assume ahmedA's answer is the community's collective answer and take that as guidance.
Respectfully,
Brian P.


So some consultant has come back with
" have the ability within Qualtrics to redirect tcustomers] to a specific URL once the user completes the survey. We were thinking this could potentially be the easiest option -- post to a page with ttransactionid] and call it good."
Are they talking about webhooks? I read through the documentation quite closely and I didn't see the functionality they're talking about. I suppose we could redirect from our site to qualtrics and then to a page on our site with the transactionid stored in embedded data placed as a parameter to the calling URL. I'm not sure what this would buy us over the webhooks solution though. And, as we've established, it is far simpler and less error-prone to simply host the survey directly and push the results to qualtrics programmatically.

Respectfully,

Brian P.


No, its not webhooks.
In the support pages, read up on:

  1. Customizing End of Survey element

  2. Passing query string parameters to surveys

I would strongly recommend against this solution. Imagine yourself in the customers shoes, your about to place and order, and all of sudden you are redirected to some random survey.🙄


Thank you. Some clarification: This is not a purchase flow. I've been deliberately trying to keep the details of the product and flow as light as possible because this is, after all, a public forum.
What is going on here is that the customer is completing a task and is now requesting proof -- a certificate , if you will - that they have completed this action. That's why they're being stopped and being asked to fill out a survey before being given their proof of achievement.
Regardless of the approach, putting a survey smack in the middle of the purchase flow would, of course, be a terrible idea and that's not what the people up top are trying to do. What they want is for the user to complete a satisfaction/completion survey at the other end of the pipeline, when they've spent a considerable amount of work on the task and now need to prove it is done.
Judging from what you've said, I still think the programmatic approach is the cleanest way to do this, but if that approach isn't accepted the next best approach sounds like it should be done via the support pages end of survey element rather than an api webhook.

Is that fair, or would your pursue webhooks instead of the support page approach?
Respectfully,
Brian P.


Okay. Then a customized end of survey may not be terrible idea. I would, however, recommend a modal/iframe over redirects.
Just be mindful that Ghostery blocks Qualtrics, so you may have to fallback upon redirects.


Leave a Reply