Ahh I hadn't seen this, I'll take a proper look through now and see if I can implement.
Original Message:
Sent: 10-20-2025 11:05
From: Luiz Rosa
Subject: How to map nested data within API call
Hi Joshua Quelch, no worries, we're here to help.
You can loop through the items and use GetAt() to extract each value dynamically.
If you prefer to expose fixed paths like subRef[0] or subRef[1] in your Data Action, keep in mind that this can fail if the collection has fewer elements than expected. For variable responses, looping through the collection is the safer approach.
Also, when splitting or iterating through a list, it's important to understand the business logic behind it. You need to define what criteria you'll use to separate or process each item, since that drives how the data should flow and what the script should expect.
Here's an example of looping through a collection in Architect:

Hope this helps.
------------------------------
Luiz Rosa
Full stack developer
Original Message:
Sent: 10-20-2025 10:08
From: Joshua Quelch
Subject: How to map nested data within API call
Hi Luiz
Thanks for your response, this is all new to me so apologies for stupid questions.
How would I go about splitting the collection down into separate variables that I can then reference in the script?
I want to be able to reference subs.SubRef-0 and subs.SubsRef-1 within my script.
I was reading about using the Update Data block to create a collection but I'm not sure I'm doing it right.
Thansk,
Josh
------------------------------
Joshua Quelch
Technical Support Executive at Air Business Limited
Original Message:
Sent: 10-20-2025 07:46
From: Luiz Rosa
Subject: How to map nested data within API call
Hi Josh
In Architect, nested fields like subs.SubRef are treated as collections. How you handle them depends on your business logic and flow design, usually, it's best to process or format the data in the flow and send only what agents need to the script.
------------------------------
Luiz Rosa
Full stack developer
Original Message:
Sent: 10-20-2025 06:38
From: Joshua Quelch
Subject: How to map nested data within API call
Hi
We are currently in the early stages of setting up an integration with our CRM.
Our CRM is customer based, so one customer can have multiple subscriptions.
We're succesfully able to pull back customer data and present this in a script to our agents however I want to start pulling thorugh data relating to their subscriptions.
When I test our data action I can see we're pulling the data through but its mapping to nested fields (apologies if my terminology is off, this all new to me 😂).
As you can see in the attachment we have the field 'subsSubRef' in our data action which is available in my 'Call Data Action' block in Architect. When a customer has multiple subscriptions the sub ref maps to 'subs.SubRef-0' and 'subs.SubRef-1'.
I need to work out how I can reference the data in 'subs.SubRef-0' and 'subs.SubRef-1' within my script and present it to agents.
Any advice would be greatly appreciated.
Thanks,
Josh
#DataActions
------------------------------
Joshua Quelch
Technical Support Executive at Air Business Limited
------------------------------