Stop iterating and compose a string of collections

Hi,

My scenario is used to upload track and trace codes on the portal of my customer.
I am fetching a CSV file from my FTP which contains on each line the needed info to upload the trackings.

On the GET ORDER request, I filter the request with the order number and receive as output the information regarding the order and an array with the items. I need to iterate this array to DISPATCH or ACKNOWLEDGE the order.

If the order is not ACKNOWLEDGED yet, the first route is used, if already ACKNOWLEDGED, the second route.

My question is : How can I create a third route that is only triggered when all bundels have been DISPATCHED. I tried to use the converge Data store workaround but without success.
This route would send an email with the Status code of all DISPATCH requests, to be sure that everything was uploaded successfully.

I tried to compose a string from all the status code and it doesn’t work too. :pensive:

blueprint (1).json (151.4 KB)