Using contact lists to embed data in survey | XM Community
Solved

Using contact lists to embed data in survey

  • 28 March 2018
  • 7 replies
  • 357 views

I want to set up a form that allows the respondent to select an employee’s name. Once the form is submitted, I want an email trigger to forward the responses to the selected employee’s supervisor. I’ve created a contact list containing employee and supervisor names and email addresses and I’ve tried setting up the survey flow to embed the email addresses based on the employee selected, but have not been successful embedding information. If someone could point me towards a solution, it would be much appreciated. Thank you.
icon

Best answer by bstrahin 28 March 2018, 21:41

View original

7 replies

Userlevel 7
Badge +38
I'm not sure this is the best solution so other Qualtrics wizards if you have a better answer I would love to know!
The only way that I could get this to link a survey answer up to your contact list was to use an authenticator and to make it work smoother I had to create two surveys and do a little changing to the Contact List that I wasn't expecting...
Contact List
• Add employee name as you want it to appear in the drop down list to the variable "External Data Reference"
Survey 1 used to select the employee
One question only, drop down list with names from "External Data Reference" copied as the options

• Survey Flow
1. Show your question block
2. Next block - Set Embedded Data
 Variable name "Answer"
 Value "${q://QID1/ChoiceGroup/SelectedChoices}" (or whatever your question ID is for the drop down list)
3. Next block - End of Survey element
 Choose customize
 Check Override Survey Options
 Choose Redirect to URL, paste the anonymous link to your second survey here and tack the following on to the end "?Name=${e://Field/Answer}"
Survey 2 connects to the contact list and where you would have all of your questions

 Survey Flow
1. Authenticator
o Authentication Type = Contact
o Authenticate Using Contact = select your contact list
o Authentication Fields = External Data Reference, "Employee", Check prefill option, in the next box type "Name"
2. Next block is indented under the authenticator
o Set Embedded Data, Choose Add From Contacts, Find your contacts list and choose okay

3. The rest of your blocks can be after this and will then pull in the contact list data connected to the record
While this is clunky the prefill option means that your respondent won't actually see the authenticator. They may have a slight delay as the surveys pass the correct information to each other.
Userlevel 7
Badge +6
@bstrahin - I think you may be overthinking this.
@Mauro
Essentially you need a way to attach a specific email address (supervisor's) to the response so that it can be used to create an email trigger based on the individual selected. It sounds like you were on the right track with what you were doing, but maybe your put the blocks in the wrong order or mapped data out of sequence.

1) Make sure you pull in supervisor emails before the question that would use branching logic based off of who is selected.
2) Double check that your data mapping is correct (I can help with this if you send a .qsf of the survey you are working on).
Userlevel 7
Badge +38
@Akdashboard I am really interested in this for another application that is doing the same thing (pick from a hard coded drop down list and connect to a contact list to get upwards of 10 embedded data fields to connect).

With your solution would you need to have a branch for each person and/or supervisor?

I could see yours working as:
Block to go through all of the survey
Then branch for each supervisor where the logic is
If employee1 OR employee2 or employeeN
Set Embedded data to SupervisorEmail = hardcode the email address
Then in the trigger email call the embedded data field "SupervsiorEmail" in the to box

This would be fine for a small group of employees and supervisors combinations. But the application I am hoping to expand this to is a 1:1 relationship between records for upwards of 100 people at a time, pulling in information that was sent to a contact list trigger from a previous survey. Somehow are students are forgetting their email address and aren't getting individual links to take their post assessment. The hope is to post an anonymous link to their online course, use a drop down for them to "sign in," and the trigger email to pull in answers to their current survey and their first survey that is stored in the contact list.
Userlevel 7
Badge +27
I would do it this way:
1. Web service that uses the API to get the list of contacts
2. Question to select contact (contacts from web service piped in). Ideally you want the respondent id of the selected person. I would probably have a text entry question and use JavaScript to replace it with a select where they select the contact name but the saved value is actually the respondent id.
3. Web service that uses API to get embedded data for selected contact
4. Pipe supervisor email returned from second web service into email trigger

TomG I'm trying to follow your instructions as I maintain a list of about 100 people that varies over the months. This pick list is used many times by different surveys and it would be very convenient to pipe in a pick list but have those selections remain unique within the survey (don't really want to do a reference survey here if I can avoid it).
I've gotten the web service calling for the contacts, but how do I pipe them in? I guess I'm not understanding how to do it unless I embed each contact individually.

Userlevel 7
Badge +27

https://www.qualtrics.com/community/discussion/comment/27843#Comment_27843Use select2 with an ajax call to your web service to populate the drop-down.

https://www.qualtrics.com/community/discussion/comment/27851#Comment_27851TomG I think I'm in way over my head on this one. Been digging through documentation for about three days now. A JavaScript master, I am not. Your response is still much appreciated.

Leave a Reply