Handling Variable API Output and Configuring Response Templates in Genesys Cloud

Hello,
I’m working with an API that returns a JSON response like the attached file.

The number of items in the "rows" array can vary from 0 to 8. I need help with:

  1. How to define the output contract when the number of rows can change.
  2. How to set up a success response template to handle this dynamic data.
  3. How to configure a translation map for fields like StatusDescription, TypeName, Typecode and Code.

Any suggestions or examples would be greatly appreciated!
sampleJson.json (259 Bytes)

Just place each as an output array and flatten your output. Then in Architect, bring each into a collection and it won't matter how many you have. You can use Count to get the number and GET statements in each collection to get the individual values.

Thank you RobertWC for sharing the idea. I am currently working with it and seems to be working well.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.