Thanks for your tip! I tried that, and instead of the previous error I mentioned, I got this one instead: `lexical error: invalid char in json text. ${e://Field/jsonObj} (right here) ------^`
Do you have any tips for getting past this one?
> Hi @Shashi,
>
> Thanks for your tip! I tried that, and instead of the previous error I mentioned, I got this one instead: `lexical error: invalid char in json text. ${e://Field/jsonObj} (right here) ------^`
>
> Do you have any tips for getting past this one?
Can you please send the screen shot of web service element OR if you are using postman or some other application please send the json objects
It's a custom, unreleased API on the server end. I'm not able to speak about it more at this point. I tested that string locally using that API and it works with the endpoint I'm sending my POST request to.
> On the client side, I'm using the standard Qualtrics web interface.
>
> It's a custom, unreleased API on the server end. I'm not able to speak about it more at this point. I tested that string locally using that API and it works with the endpoint I'm sending my POST request to.
Try removing the quotes around the piped text and change JSON to String in the jsonObj row
I use string as a type for any embedded values to be passed and it works.
Can you mention what kind of data does your embedded variable hold which needs to be passed?
I’ve just been struggling with that as well. In all variants I tried (including the ones suggested above), my other backend (the recipient of the POST request) never received the actual value of an embedded data item, but the piped text such as ${...} instead - as if the piped text was never parsed/changed into the value it refers to.
The embedded data I wanted to sent to my other backend was the ResponseID. Accordingly, I had a block where this was set.
What worked in the end - which seems a bit random to me - was to NOT USE ResponseID, but to generate a (sufficiently large) integer value instead. In the web service block I then chose (application type/json of course) the type integer et voila: the piped text expression was parsed/changed into the value and thus received by my other backend.
Hope this is of help to anyone else struggling with something similar. Good luck.
Seeing all the posts above, the issue appears to be that you’re testing the API via the survey, which will fail because Qualtrics will send the string you’ve programmed. It is only when the survey environment is triggered (either via preview or the survey), that the values get mapped.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.