Integration Hub help please - I want to sent nested data in an array outbound payload

MS12
Kilo Sage

I'm using json parser step to compile my outbound data.

It should look something like this.

"contacts": [
            "contact": {
                "contact_name": "",
                "contact_id": "",
                "contact_email": "",
                "contact_responsibility": ""
            },
            "contact": {
                "contact_name": "",
                "contact_id": "",
                "contact_email": "",
                "contact_responsibility": ""
            }
        ],

 

This should sent all the contacts in an account. I'm very new to json builder step and trying to lookup for examples and I'm not finding any good articles on this specific issue.

 

MS12_0-1739831790172.png

 

If you can guide me in the right direction, that would be great.

 

5 REPLIES 5

Murthy Ch
Giga Sage

Hi @MS12 

Try like below:

MurthyCh_0-1739834700316.png

Hope this helps

 

Thanks,
Murthy

What you are showing above is the input section. That has type array.object.

But if you add a row to json builder flow object, this is not a data type but Array is.

So your answer gave me an idea. I added an input of Array.object and json builder entry of array type and I am able to pick data pill for the contacts object from input and map it to this json field.

json builder.png

@MS12 

Glad my response helped you in some way.

Thanks,
Murthy

Ankur Bawiskar
Tera Patron
Tera Patron

@MS12 

you can use script step and form the JSON and then use that in your next step.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader