Hello,
I'm setting up a workflow triggered by an API call from our case management system that will trigger JSON event in Qualtrics.
The contact information we have for survey recipient varies. We would like it to send an email invitation if an email address is available, but if not, send an SMS invitation if mobile phone is available (and if neither are available, not send an invitation).
Does anyone know the best way to set this up? One solution I considered was to make a first task distribute by email, then add a condition "if email is empty" routing into a second task to distribute by SMS.
Thanks for any advice.
Hi ebclc,
If the payload from your CMS contains the contact info, you can just set up a condition to check the attribute containing their email and (if it is empty) their phone.
Once you've set up the JSON event listener in Qualtrics you'll be able to access the attributes for other events in the workflow. See my comment on this thread for an example (it was for a Javascript problem but you could apply it to a Conditional task as well).
Good luck!
Thanks bgooldfed for your help again. Using the condition was the right way to go, so thank you. For anyone else reading this thread, I'm adding below some helpful additional ideas provided by the Qualtrics support team below.
----
I believe you should be able to accomplish something like this using 2 different workflows (one for email, one for SMS), each with different conditions. The XM Directory task requires you to select the distribution method during the task setup, so this cannot be dynamically determined during the workflow execution.
In one workflow, you will select email and in the second, you will select SMS. This will mean that you will have 2 different JSON event endpoints for the 2 different workflows, and the API call would have to trigger both - then, depending on which conditions are met, it will actually execute the task in only one of the workflows.
For the email workflow: after the JSON event trigger, you can add a condition so that the XM Directory Distribute Survey task will only be executed if the "email" field is not empty. This would look something like this (you can replace the field name in the condition with whatever your field name is for the email address field)!
On the other hand, for the SMS workflow, you can add a condition so that the task will only be executed if the "email" field is empty.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.