How do I setup a custom survey code for a receipt survey so is both validates and embeds? | XM Community
Skip to main content
I moving from an existing survey platform to Qualtrics and am trying to maintain the receipt survey entry code as best I can. Currently, customers enter a 20 digit code that confirms the customer shopping trip by grabbing from the digits: a specific date, a store ID, and the transaction ID. The code is then converted into embedded data fields for that response. This is being done through javascript, however, not sure how it would be accomplished in Qualtrics given the different methods and how Qualtrics is setup. Any one have ideas or has done this before that cares to share?



!
You can do this in javascript in Qualtrics also. The methods are the same too. Go to the javascript for your question where the code is entered, click on the gear (on the left) and select javascript. Put the code to process in the onPageUnload.



What has probably changed is the names for the routines to save to an embedded data variable. After the javascript edit window has popped up, click on the help/API reference on the bottom.
Thanks WaterSampler - what I really need is a sample what they code should be. Given that we have multiple stores, I need pull the store id and then validate it against an array of our store ids. If someone knows of a better way to do a survey receipt code, would love to hear what you did.

Leave a Reply