Pulling email addresses of users within a segment into a survey dropdown | XM Community
Skip to main content

 Hello! I am trying to grab the e-mails of users within a specific segment in one of our directories and then pipe those values into a dropdown field of a survey. Making the web service call works fine, and as you can see, it pulls the users (0,1,2,3,etc.) Where I’m getting stuck is trying to take all of these values and “loop” through that email field to have it show all of the distinct values in the dropdown list within a survey. Is this possible to do this? If it is,  would anybody be able to provide guidance on next steps to take? Or am I going about this completely wrong? I appreciate any help that can be provided.

 

You could pipe all the email fields into your dropdown choices (e.g., ${e://Field/result.elements.0.email}, ${e://Field/result.elements.1.email}, etc.).

The issues are:

  1. It is going to result in a lot of unused fields in your response data
  2. The number of emails is going to be fixed to whatever number you set up in your webservice call and dropdown question.

To avoid the first issue you could manually delete all the unnecessary fields from your webservice or you could write your own webservice that calls the api to get the contacts then only returns all the email addresses.

For the second issue, you could make your question a text entry question.  Create your own select in html and use JS with ajax to populate the options using you own webservice as mentioned above. Copy the selected value to your hidden Qualtrics text input. 

 


Hello there! Qualtrics is currently working on a Supplemental Data feature that may aid in your use case in the future. You can essentially reference information from Imported Data Projects, the XM Directory, or other surveys. I am attaching some documentation here that may be more tailored to your use case. Again, this feature is in development but could be beneficial to you later on. Thanks!


Leave a Reply