Canned Responses in Email with Selected Choices | XM Community
Solved

Canned Responses in Email with Selected Choices

  • 20 August 2020
  • 5 replies
  • 17 views

Badge +2

Hello,
I'm pretty novice at coding and was wondering if it's possible to set up the following:

  1. Survey question is a multiple answer multiple choice question that has a list of different office names.

  2. An email trigger is set up to email the respondent with the office names and information about the offices such as location, phone number, etc.

  3. Each office location and information should be bullet pointed in the email.

I think I know the general theory in terms of needing to set embedded data, but I don't really know how to begin to execute this code and where to put the code. Do I put the script in the question itself? If so, I believe I should be using the functions: Qualtrics.SurveyEngine.addOnPageSubmit and  Qualtrics.SurveyEngine.setEmbeddedData but where do I go from here?
Thank you for your consideration.

icon

Best answer by bstrahin 21 August 2020, 17:34

View original

5 replies

Userlevel 6
Badge +28

Once you set the embedded data with the required information. Next step is to setup an email trigger, just pipe this embedded data into the email which will be triggered to the respondent.

Badge +2

Thank you for your response! I guess I'm not sure how to set the embedded data up correctly. Am I supposed to embed the data for each response individually? And how do I ensure that only the selected choices are shown in the email trigger?
Thank you again!

Userlevel 6
Badge +28

Pipe(selected choices)in the response selected into the embedded data(say location_office) in survey flow.
Then pipe in this new embedded field in the email trigger.
Link for reference:
https://www.qualtrics.com/support/survey-platform/survey-module/editing-questions/piped-text/piped-text-overview/

Userlevel 7
Badge +38

tobyhkim From your description I assume that the list of businesses I assumed your question might look like:
image.pngAnd that you supply the name, location, phone number, etc. to the respondent in the email (they aren't giving you that information).
Then a nice way to get this formatted without any fancy coding is to use embedded data and branch logic in survey flow. For each business, you will set up a branch condition that the business was selected and within that branch set an embedded data field that holds all the information you want to email. You will notice that the information is saved between "

  • " - these are necessary leaders and closers to get the information to appear as a bullet point (and start a new line).
    image.pngAfter you assign the business information for the selected business, you can compress them into one embedded data field by piping in the embedded data fields as the value:
    image.pngTo get the bulleted list into your email trigger you just pipe in the variable "Formatted" (I took a short cut and tested it as a descriptive survey question).
    image.pngYou will find this prints out quite nice.
    When I select Business 1 and Business 3 the print out is:
    image.pngPlease let me know if you have further questions.


    Badge +2

    bstrahin Thank you so much! This was so helpful! I really appreciate you taking the time to show an example too!!!

    Leave a Reply