How can I run multiple interconnected APIs via xFlow? | XM Community
Skip to main content

Hi,
I would like to run 2 ou more APIs in order to achieve one of the use cases in the api.qualtrics.com guides. Response export for one contact.
What i need to do is find the contactid, pass it on to a contact response history to get the responseid available, pass the responseid to the response export api call.
Has anyone achieved this using xflow? If yes how? I fail to understand how to store these values and passef them on to the next Api call...
Thanks

Hi ruka,
I've used Workflows a decent amount and the implementation is fairly straightforward.
The "Web Service" task can be used to make API calls. You just add the endpoint URL and configure it as per the API reference.
When setting up the Web Service you can test it. If it completes successfully, it will display the appropriate response variables which you can access in the rest of the workflow (eg: contactId, etc).
So pretty much, you should be able to string together a few Web Service tasks to do exactly what you need :)


Hi bgooldfed ,
thanks for the input. In the meantime I was able to do what you suggested using piped text from previous web service tasks. Some code task to manipulate the output and all looks ok.
In the process, another question came to me... How can I pass multiple values on the body parameter.
e.g. Create a workflow to on a schedule basis export 3 or 4 responses from the same survey, once I provide with the 3 or 4 Response ID. How can I pass this on request on 1 webservice task?

  1. How can I do the exact same thing as above, but now from 2 separate surveysID. e.g. surveyID_1; responseID_01 and responseID_02, also from surveyID_2; responseID_3

Please note that I want to avoid using multiple webservice task per survey, because the surveyID and responseID, are values that I am obtaining from a previous webservice task, and I would not know how to passed them on otherwise, as I never know what is the max number of records that I will get. (responses across multiple surveys)


https://community.qualtrics.com/XMcommunity/discussion/comment/52759#Comment_52759From memory I believe the API is generally configured to only accept one input for each parameter, and Workflows don't have any way of performing loops. Code tasks can contain loops but aren't allowed to make outbound API calls either, so you're likely out of luck if you want a strict single workflow solution.
I've had to get around this in the past by creating my own scripts (usually Python), using loops to make as many API calls as needed for the desired inputs. I usually run these manually, but if scheduling is part of your requirement you might need to look into running them on a server.
Good luck!


Leave a Reply