Displaying an unique code in the End of Survey message | XM Community
Skip to main content

We would like to offer incentive to people who completed a survey by giving out a 'coupon' code to be displayed in the End of Survey message. These code are unique and can only be used once.
For surveys distributed by e-mail, we can pre-populate these unique codes when we upload the contact list as a specialized field.
I'm not sure how to do it for anonymous link/QR codes. Ideally, I would upload the list of unique coupon codes and the 'end of survey' message mechanism can pick a code from the list and display.
Is it possible?

Trivial solution: maybe you create a variable (or upload /copy and paste the list) in the last question that generate a random id and you can dislay it, using java
Here something that (maybe) is close to what you are looking for.
https://community.qualtrics.com/XMcommunity/discussion/13795/displaying-a-random-number-within-a-questionThen you have to remove that code from the original list.


alpa ,
You could store the codes in an external database and use a web service to retrieve an unused code.


thanks both. I like the Web Service idea. Never used it, but just tested it. And I think it would work.
Bonus question. Instead of using a Web Service to return a coupon code, what would be ideal is to return an 'image' of the QR code that the customer can scan. I guess I can do two API endpoints on my server.

  1. An API call that returns a customized URL to the QR code

  2. An API call that #1 refers to that actually serves up the image


https://community.qualtrics.com/XMcommunity/discussion/comment/44834#Comment_44834The web service could include #1...return a url to QR code in place of or in addition to the coupon code.


Apologize for the newbie question. I have set-up the Web Service in the API, and set-up an API server. And have verified that the API is being called. (It's returning a json object {'a': 1, 'b': 2}.
After I fill in a survey, I have seen the variables in the Reports.
How do I actually use it in the custom 'End of Survey' message? I tried:
${m://a}
${m://Fields/a}
And both of them are blank.


https://community.qualtrics.com/XMcommunity/discussion/comment/44844#Comment_44844${e://Field/a}


https://community.qualtrics.com/XMcommunity/discussion/comment/44845#Comment_44845Perfect. It works. I supposed there's a reference page/guide that explain the syntax 🙂. (Couldn't find it yet). Trying to understand what
l, m, e means (I supposed l is to turn it into an URL ( tag). Are there others?


e means Embedded Data Field
m means Panels Field
If you click on a question's text, then Piped Text... you can pipe each different type of field and see what it's prefix is.


Leave a Reply