Parsing and performing operations on embedded arrays in Flow Designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2025 11:46 AM
*Reposting in HAM Forum location, posted in wrong location previously
I am building a 3 custom table relationship and have to parse the below JSON example to insert records into an "order" table, "sku" table, and "asset" table (not alm_asset or alm_hardware, a custom table with additional asset info). While doing so, I need to make sure the correct records are assigned to the reference fields in each table.
SKU references Order. Asset references SKU and Order. Here is the example JSON:
{
"SHIPMENTNUMBER": "DKSDXXXXXX",
"SHIPMENTDATE": "YYYYMMDD",
"YOURREFERENCE": "XXXXXXXXXXXX",
"EXTDOCNO": "XXXXXXXXXXXX",
"ORDERNUMBER": "DKSOXXXXXX",
"PORTALORDERNUMBER": "WOXXXXXXXXDK",
"CURRENCY": "USD",
"TRACKINGNUMBER": "",
"COURIER": "COURIERNAME",
"TRACKINGLINK": "TRACKINGLINK",
"PARTIALDELIVERY": "TRUE/FALSE",
"LINES": [{
"SKU": "XXXXXXXXX",
"DESCRIPTION": "DESCRIPTION OF SERVICE",
"QUANTITY": "1",
"TYPE": "Service",
"CATEGORY": "CATEGORY",
"SERIALS": [{
"SERIALNO": "XXXX"
}],
"STAGINGINFORMATION": [{
"CAPTION": "XXXX",
"SERVICE": "XXXX",
"SET": "XXXX",
"VALUE": "XXXX"
}]
}]
}
The specific issues I am having are:
- Getting a 500 'Internal Server Error' when running flow (attached pics). I have another flow with a JSON object with strings and an embedded object which inserts records into two tables just fine, but this specific structure is throwing this error.
The trigger is set up like this
I've tried to make a JSON parser action, but there are not enough inputs (it maxes out at 20) to accommodate the entire structure. I tried re-configuring the action with inputs up to the "LINES" array and retrieving the rest of the values from the output, but that didn't work either.
- Inserting records from the same flow and assigning the correct referenced record in the appropriate reference fields. As mentioned in 1, I have another flow which does create two records. First in "order" and then in "sku", however, when inserting the "sku" record and assigning the value into the "order" reference field, it does not populate.
How can I properly configure this flow to insert the records correctly with these embedded arrays and how do I get the reference fields to pick up the proper referenced record?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2025 12:22 AM
Hi @michaelsmith02 ,
Your attached images are very blurry, can you reupload the same? It will be easier to help you out.
If this helped you, pls mark this helpful and accepted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2025 03:13 PM
Hello, I was not aware, here are a new set of images!
The first 3 are the flow in which I'm having trouble looping through the embedded arrays in flow designer. The last picture is the reference field I am attempting to populate but it is not inserting values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2025 03:16 PM
Hello! I was not aware, here are a new set of images. The first 3 are of the flow in which I'm having trouble accessing and looping through the embedded arrays to insert records. The last picture is the flow in which I'm trying to populate a reference field from the first inserted record. It is not picking up any value