Hi everyone!
I'm working with a Genesys Cloud Data Action that returns nested arrays, for example:
{
"companies": [
{
"document": "12345678000100",
"accounts": [
{ "number": 10001 },
{ "number": 10002 }
]
},
{
"document": "98765432000100",
"accounts": [
{ "number": 20001 }
]
}
]
}
I need to access the accounts dynamically while preserving their relationship with the parent company, e.g.:
companies[0].accounts[0]
companies[0].accounts[1]
companies[1].accounts[0]
However, when I expose the nested properties through the Data Action Output Contract/Translation Map, there are limitations.
My workaround was to return the entire API response as a raw string and then convert it to JSON inside Architect, which preserves the original JSON structure.
Has anyone found a way to configure the Output Contract + Translation Map so that companies[*].accounts[*] preserves the relationship between the parent and child indexes?
Thanks!
#DataActions------------------------------
Daniel Souza
------------------------------