Taking a Squarespace order and breaking it down line by line

Good day. I am stuck trying to break down a Squarespace order. The structure is one person can order more than one quantity and each quantity, aka a line item(ish) is unique. I am trying to iterate over each line item to extract values out of it. Ultimately, I am flattening this data to insert into Salesforce.


Is what my bundle coming in from Squarespace looks like. Each of those bundles is an actual invoice. Inside that it looks like this:

Inside it is customizations and there are 12 fields in there that I need to work with. I have an iterator on the Squarespace module that is on line items, then I put another iterator on customizations. This seems to work fine. In Squarespace I show 57, but when I get past the second iterator, I have 64 records! Now I am stuck. I am only seeing one ‘field’ in the customizations.

I looked at what is showing in DataTools looking at the record from Squarespace:

Then I went back to the bundle that showed in Squarespace, and it shows

The results are only showing the last item in the line items array. I can’t get to the ones prior to it. How do I get to that data?

Hey @David_Bergerson, Welcome to the community
You can use the iterator module like this and map the values of the iterator instead of Squarespace


1 Like

Thank you very much for the reply and the welcome. Unfortunately, that is what my iterator already looks like :frowning:

I moved the data tools module over to show the source being Square and the values it shows in customizations, but it does go Square ->Iterator → Iterator->Data Tools.

And this, is what the source looks like from Squarespace in the bundle for customizations:

Somehow, the customizations array is not being able to be seen past the Squarespace module. Any ideas here?

Thanks again!

Maybe try to use the flatten function.