How to deal with a web service with a "text only" response | XM Community
Skip to main content

Hi,

if got a web service in the survey flow that consumes a request that delivers a text-only response. Its only a single string, so no JSON format, no key, no values.

This is how it looks like when I test it (view raw data):

Does anybody know how to handle this response? 

How do I get this one into an embedded data variable?

Thanks :-)

@niels_26 This should be possible by choosing “Add Embedded Data”. Basically everything describered here: 

https://www.qualtrics.com/support/survey-platform/survey-module/survey-flow/advanced-elements/web-service/#TestingYourParameters

Doesn’t that work for you?


@chackbusch, thanks for your reply.

Unfortunately this doesn’t work out for my response. I’m expecting the reason is that the response is not formed as JSON or XML. Since its only a single text string Qualtrics doesn’t offer any matching for the “Add Embedded Data” procedure.


@niels_26 Mhhh, got it… That’s true. You can only set embedded data from properties there. Unfortunatelly, I do not have any API to test that returns the result in plain text. Thought about adding the Content-Type header to text/plain and see if this makes any difference in regards to the processing. 

I assume you need the webservice response at the start of your survey? Guess you would need to add some JavaScript for the first question and implement it as AJAX request?

At the end you could work with some workflow and not with the webservice element inside the survey flow. 

Best
Christian


Leave a Reply