cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Building a Body with multiple records (Batch)

emorera
Deputy Chef I
Deputy Chef I

Hi there, I am new in this community so to Workato. I am looking for building a Body requests using multiple records (batch), I have a Workato list created but I don't know how to build this body call. Here is a sample



11 REPLIES 11

emorera
Deputy Chef I
Deputy Chef I

Joseph Blanchett will this allow to make a Batch request to the App? I want all records of the list to be included into the same call.

Yes just create your common data model schema contain a list

emorera
Deputy Chef I
Deputy Chef I

Perfect, I will try and let you know, thanks!

david-macintosh
Deputy Chef I
Deputy Chef I

Do you have an example body structure that is expected from the API call you will be making via HTTP? This is important to accuracly advise. In many cases you would use a message template for the body itself and would start with the example API body for creating it. In terms of batch support, again that will depend on the structure of the anticipated message to the API. It it accepta a list then the acculation to list variable works assuming there is a coresponting list structure in the messge to map to. If it accepts a single record than a batch connector call inside an iteration loop could be the way to go.

Yes, here it is, that is two items:


{

"upload_request_id":"b3eb858c-e880-4938-bba3-bd5b733dd9b5",

"records":[

{

"phone_numbers":[

{

"phone_number":"+351929312312",

"phone_type":"MOBILE"

}

],

"first_name":"Joey",

"last_name":"Tribbiani",

"timezone":"Europe/Lisbon",

"priority":7,

"extra_data":{

"country":"USA",

"state":"California",

"job":"Actor"

}

},

{

"phone_numbers":[

{

"phone_number":"+351929312313",

"phone_type":"MOBILE"

}

],

"first_name":"Jane",

"last_name":"Doe",

"timezone":"GMT",

"priority":5,

"extra_data":{

"country":"USA",

"state":"California",

"job":"Actress"

}

}

]

}