cancel
Showing results for 
Search instead for 
Did you mean: 

How to resolve resnponse from a Web Service call in a Build Process Automation task

SiddharthBet_HDS
Discoverer
0 Kudos
126

Hello,

I am calling a web service with destination task in an autmation and need to extract information from the body of the response object.

Getting Goods Receipt details

SiddharthBet_HDS_0-1727962550119.png

Get the following response. Need to extrat the value of QuantityInBaseUnit.

SiddharthBet_HDS_1-1727962613641.png

 

View Entire Topic
Dan_Wroblewski
Developer Advocate
Developer Advocate

Just create a custom script.

  • Input of type Any
  • Output of type Any

And then the code is just:

return myInput.inputs[0].d.results[0].QuantityInBaseUnit;

You'll of course have to bind the output of the Call Web Service to the custom script.

But all of this is if you want to store it in a variable. You don't need a custom script because you can use the expression editor to get the value you want directly (below is me using the root of Northwind service to get name of the first entity):

Dan_Wroblewski_0-1728397492579.png

 

siddharth_bet
Explorer
0 Kudos
Thanks Dan, figured that later but appreciate the response.