What is the best way to verify the products a respondent (customer) owns? | XM Community
Solved

What is the best way to verify the products a respondent (customer) owns?

  • 27 August 2018
  • 5 replies
  • 40 views

Badge +2
Hi Everyone,

I have been trying to find a solution to this but haven't been able to dig anything up on the support pages or any of the Community forums. I have a survey that I'm building this year going out to our customers where it needs to be able to show them all of the products that they own (according to our records). My idea is to show all of our products and have all of the respondent's products preselected based off of our records, then ask them to verify and make any needed changes. The problem: how do I do that?? Do I need to utilize an API to have it check our Oracle database and then pipe-in the products that they own? Or can I create an Excel file and append their product info to their contact info, and then call this somehow within the survey?

Hope my question makes sense. Any help would be greatly appreciated, thank you!
icon

Best answer by LaurenK 28 August 2018, 00:37

View original

5 replies

Userlevel 7
Badge +33
Yes better make a contact list with columns like name email and products you have in your database. Then using this contact list you can distribute your survey. You just need to map email with products.
Badge +2
@bansalpeeyush29 thanks for the response! When you say "map email with products", what do you mean exactly?

I've made a contact list that has a column containing the products that the respondent owns. The problem I'm having is how to pipe this in and display it within a question . The column contains all the respondents products they own separated by a semi-colon, but I'm betting I may have to make a separate column for each product.

To explain another way of what I'm hoping to achieve, what I would like is for the contact list to have all of "John Doe's" products he owns. When he takes the survey, he gets to the product verification question which then displays all of our possible products but has products A, B, C preselected (products that John Doe owns according to the list). Then it asks him to verify if our records are correct.
Userlevel 7
Badge +20
Your understanding is correct, either for each product, you will have a field (embedded data) or in a single field, you can have all the product separated by commas...

Let say you have 3 product then the contact list will have a separate field for separate product... such as "ProductA, ProductB, ProductC"...
ProductA field (embedded data) will have "y"
ProductB field (embedded data) will have "x"
ProductC field (embedded data) will have "y"

In the survey, we will have to utilize jQuery (i hope you know jQuery) to check íf the embedded data have value "y" then pre-select that option. (Below is the code)

Here you will have to find the "id" of the choice and its label. Just right click on the option and select "inspect" it will take you to that element and you can find the id of it.

below is the link to help you on inspect element:
https://developers.google.com/web/tools/chrome-devtools/inspect-styles/

you will have to put below code in the "ready" section of JavaScript.

!
Userlevel 7
Badge +13
Hey @Meech! Just wanted to jump in and say you do not need any custom code! Check out this page about pulling in Embedded Data from a Contact List, and this page about using Piped Text and Embedded Data. If you have any additional questions, feel free to reach out to our Support Team!
Userlevel 7
Badge +33
You can show entire list and can punch only few that a respondent owns.
store user information in embedded data via contact list.
create question and punch this in that question using java script like below:-

`Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/

var ageres="${q://QID2/ChoiceTextEntryValue}";

if (ageres=="1") {this.setChoiceValue(1,true) ; }
if (ageres==2) {this.setChoiceValue(2,true) ; }

});`

Leave a Reply