Thanks for this but I think I’ve not described the issue correctly. I’m being non-specific with the data itself because I’m just looking for the conceptual solution. That said, I’ll try to be more detailed with the question.
I currently have 3 steps so far.
First step is a webhook listener. For brevity let’s say it’s output is simply
{
"orderNumber": 123456
}
The second step calls out to an API to get the list of the order’s shipments. that call runs once. The output of the call is pushed into the record like so.
{
"orderNumber": 123456,
"shipments": [
{
"shipmentId": "SHP-001"
},
{
"shipmentId": "SHP-002"
}
]
}
The third step is using the “Path to many” feature to point to the shipments array and make an API call to get the tracking number for each shipment. In this case we have 2 shipmentIds so this step runs twice. It’s at this point that I have 2 records for the 3rd step: each with it’s own trackingNumber results from calling the getTracking API for each shipmentID. Each of those records appears to be working with something that looks like this.
{"shipmentId": "SHP-001"," _PARENT": {“orderNumber”: 123456}}
{"shipmentId": "SHP-002", "_PARENT": {“orderNumber”: 123456}}
This is where I assume that I’d need to push each tracking number up into the _PARENT entity.
The first half of the battle is that I’d like to get to the point where I have ONE record that looks like this after the two getTracking API calls.
{
"orderNumber": 123456,
"shipments": [
{
"shipmentId": "SHP-001",
"tracking": "TRK-01"
},
{
"shipmentId": "SHP-002",
"tracking": "TRK-02"
}
]
}
The ultimate goal being, I can have a 4th step that runs ONCE using the above data for it’s call - no matter how many shipments/tracking numbers the order may ultimately have.