Use the response of a webservice task in the next webservice task Workflow | XM Community
Skip to main content

I am using webservice task in workflow to update fields in survey using API given in link below:

https://api.qualtrics.com/2ced5de7dc638-start-an-update-embedded-data-job

The API gives the progress ID which I want to use in the next webservice task that I have added in workflow to check status of the job. The API used in below link:

https://api.qualtrics.com/2ced5de7dc638-start-an-update-embedded-data-job

How can I access the progress ID of first webservice in second ? 

@Neha Tank You mean this API for progress tracking 
api.qualtrics.com/c584220a4a3a2-get-an-update-embedded-data-job-s-progress


yes, I mean the Get API. I pasted the wrong link.


@Neha Tank - You should write a single web service script that does both API calls.


yes, I mean the Get API. I pasted the wrong link.

What platform are you using for API? Just save progressID from the 1st API response and use it for the 2nd one.


I am using webservice task in workflow to do it within Qualtrics. @Tom, do you mean instead of passing key value pair in body I should write the entire script in the webservice task ?


I am using webservice task in workflow to do it within Qualtrics. @Tom, do you mean instead of passing key value pair in body I should write the entire script in the webservice task ?

Then the JSON response of the previous one have that progressID and you can pipe to the 2nd API
It should be $.result.progressId. The qualtrics task should already have that path for you

 


Ya, I had found the variable is $.result.progressId earlier. But I wasn’t sure where to append this in task. Where is this option that is shown in screenshot that you shared available ?

 

1.I have 1 webservice task that triggers the batch job.

2. Then I believe I need to add another webservice task after 1st one to use the GET API to get the status of job. Please find below the screenshot of this task:

Do I need to pass it in URL ? I got an error when I did like above. 


Ya, I had found the variable is $.result.progressId earlier. But I wasn’t sure where to append this in task. Where is this option that is shown in screenshot that you shared available ?

 

1.I have 1 webservice task that triggers the batch job.

2. Then I believe I need to add another webservice task after 1st one to use the GET API to get the status of job. Please find below the screenshot of this task:

Do I need to pass it in URL ? I got an error when I did like above. 

@Neha Tank Use the {a} icon next to it. The piped text should include your task ID, like this  ~{ch://OCAC_1234ABCD/$.result.progressId}


It might sound so basic, but I am not able to find the right URL:

https://<datacenterID>.qualtrics.com/API/v3/surveys/<surveyID>/update-responses/{a}{ch://OCAC_1234ABCD/$.result.progressId}

 

In this, I need to replace <datacenterID> with my datacenterID ; <surveyID> with my survey ID

Where can I find the task ID ? Is this the taskID of the webservice task that triggers the batch job ? I couldn’t locate the taskID.

 


I ran the workflow and in run history I clicked on task that triggers the job. I pasted that task ID in above URL and I am getting an error as below:

I tried adding {a} after the progressID piped text. That also gives same error.


~{ch://OCAC_1234ABCD/$.result.progressId} is just my example 😅.Sorry for miscommunicate.


Saviour… :) Ya, I knew ~{ch://OCAC_1234ABCD/$.result.progressId} was your example. I was wondering how you were able to see the menu. {a} didn’t look like a button that can be clicked :P

Thanks a ton. The workflow works fine now !


Saviour… :) Ya, I knew ~{ch://OCAC_1234ABCD/$.result.progressId} was your example. I was wondering how you were able to see the menu. {a} didn’t look like a button that can be clicked :P

Thanks a ton. The workflow works fine now !

No problem. {a} is Qualtrics button for piped-text through-out the workflow task. Get used to it


Leave a Reply