Am working from a PHP code that I would like to figure out how do the code in Qualtrics actions | XM Community
Question

Am working from a PHP code that I would like to figure out how do the code in Qualtrics actions

  • 25 August 2020
  • 5 replies
  • 64 views

Userlevel 5
Badge +13

The PHP code had department chairs and deans for departments that is listed in the Qualtrics survey. I would like to create actions that would put the names of the chairs and deans into a email for their approval. I was half was thru the script creating actions but I was putting the names right into the email by hand but then I scrolled past the where I was and then I saw the names for the deans that need to be into the email. Is there a way we can use embedded data for the deans, chairs, directors? So when they pick a department all the names will show up in the email for approval in actions.


5 replies

Userlevel 7
Badge +38

Linda_charlton it sounds like you might need to use branching to set your set a variable where you save the leadership (deans & chairs & directors). Assuming either the contact list or a survey question sets the department you can use that variable as your branching logic. And then within the branching logic you will add an element to store leadership. You will need to decide if you can use one variable or if you need/want multiple variables. You can use "
" to add a line break between names in the output or also you can turn this into a bulleted list "

  • NAME
  • ".
    Then where you want these names to appear in the action email, pipe in your embedded variable name(s) for where you are saving the leadership. The link for piping text will show examples in survey editor, but it's the same anywhere in the platform (like action emails) where there is a piped text menu - except instead of being a spelled out menu it is symbolized as { }.

    Userlevel 7
    Badge +27

    You could call a PHP script as a web service from the survey flow and return the names as embedded data fields. You could then pass those fields to your action.
    Another way would be to execute a PHP script as a Web Service action and have the script send the emails.

    Userlevel 5
    Badge +13

    bstrahin I think that I figured out how do listing of the chairs in the email but how can I get their names where I can get them to be able to sign.   Here is example what I am trying to do. 
    approve email.jpg

    Userlevel 7
    Badge +38

    Linda_charlton I'm coming up blank with how to do this and preserve the data for the course request. Actions and Trigger emails rely on a completed survey to trigger. Retake links only record data for questions shown. Usually I would have done this through a contact list trigger, but those are going out of operation soon (I believe replaced by XM Directory which I don't think my school has access to). Perhaps a better workflow for you would be to use the Table of Contents Feature and have the requestor gather the signatures instead of an automated email action/trigger asking for it.
    I also recommend throwing this out as a separate question to the community to get fresh eyes on it. In that post it would be helpful to share you comfort level with Qualtrics and javascript so people know your capabilities when giving recommendations.

    Userlevel 5
    Badge +13

    bstrahin I found out few weeks ago that we have XM Directory because a researcher want to send out one survey and the next day send out another survey to that person that responded and then one month later send out third survey in a month.  I was shock that we even had it!
    I found out that I was reading the code wrong.... I was trying to add the people that they comment out.  Do dumb because I know that // comment out in other script but never was good at php.  Thanks for all the help!

    Leave a Reply