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.