How do I process a bundle that has multiple data sets inside of it?

Hi there! Apologies if this is obvious - or I’m using the wrong language - having a bit of trouble processing a bundle and wondered if anyone here can help?

I have a scenario which links to Unleashed for Sales Data. Once every day, I want it to output all the previous days Sales Orders into a Google Sheet, with a row for each line item and it’s qty.

Something to the effect of:

I’ve got the scenario mostly set up - but the problem I have is when multiple lines are ordered in a single order, I’m not sure how to get the 2nd line item out of the data and into Sheets;

Here’s some screenshots.

Bundle out of the Unleashed Module:

image
1 + 2 being the sales order lines I want to extract. Could have many multiples of line

And after the Product Code + Qty from this bundle:

image

My current set up can pull out the first line only - but not sure what I need to do to pull the 2nd or more lines if they exist.

This is what the Google Sheet module has set up:

Would basically like this to add a row for each line with “Sales Order Line” - but not sure of the logic I need to apply to it.

Anyone kindly have any suggestions?

Welcome to the Make community!

As Sales Order Lines is an array, you’ll need to use an Iterator module to output each of the sub-collections within it as a separate bundle.

Then if you want to combine them into a single text field, you can use a Text Aggregator to build the combined text string with only the values you want from each Lines.

1 Like

Thank you!! I knew there was some terminology I didn’t have!

Will give that a go and report back

Hey! That did the trick - thank you!