Hi guys,
I am trying to call an ODATA service as web service Task in Actions tab to create a ticket in SAP C4C for negative response.
Is there anyway to store the response headers from the GET call of ODATA Service because I want the x-csrf-token (prsent in the header response) to do the POST Call with the same ODATA service and send ticket body.
How to store response headers from a web service Task in Actions ?
Best answer by niels_26
KimothiSaurabh
Some sessions with MaHuMhp were necessary to figure out different "stolpersteine". I promised to describe the solution here:
1) Authentication with a "Authenticated" web-service simply doesn't work
I used a basic auth account within a "Authenticated" web-service. I always received an "unauthorized" error. From our point of view this is a bug. Solution: simply use a "Not-Authenticated" web-service and add the decrypted authentication credentials as a header parameter (I used postman to find them out):
(Workflow Step 1)
2) Don't forget the session ID /Cookie
Even though we think it's one workflow Qualtrics cannot link to the csrf token from step 1 within the final POST request. We must save csrf-token and session-ID first and use it in the POST request afterwards:
(Workflow Step 2)
(Workflow Step 3, "Non-Authenticated" as well btw)
3) Hand over the json-payload correctly to the interface
In addition I had some trouble in handing over my json-payload correctly (in my case I was trying to let Qualtrics create a new sales quote in C4C).
I finally did it by simply building the json as a string by using javascript directly in the form and pipe it into an "Embedded Data":
Qualtrics.SurveyEngine.setEmbeddedData("jsonpayload", json);
At the end I used this content in Workflow step 3:
Hope this helps a bit to save some time ;-)
MaHuMhp, fyi.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

I'm confused.