Mapping multiple items from custom webhook to ShipStation

What are you trying to achieve?

Map and add multiple items in an order from a nested array into a single ShipStation order POST.

Steps taken so far

I have already tried mapping manually with the single item option with “Map” toggled off. This works just fine, but will not work for orders with an unknown number of items greater than one. I’ve also tried just adding the “line_items” variable into the field with “Map” toggled on just to see - though this doesn’t make sense to me since the fields still need to be mapped somehow, and it also doesn’t appear to work.

I don’t understand the “Map” toggle, nor how the map function is supposed to be formatted should that function be necessary.

I’ve searched the community topics and posts, along with the Make documentation, but it’s still not clear what I should be doing here.

I’m a developer of 20 years, so doing this by hand is straight forward to me, but I’m looking to use Make to save custom development hours and have this process maintainable by a non-tech person.

Screenshots: scenario setup, module configuration, errors

Welcome to the Make community!

When you see an Array, think Iterator.

Every result (item/record) from an Iterator module will output a bundle. To “combine” them into a single structure, you’ll need to use an aggregator of some sort.

Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module.

Read This

The Array Aggregator module allows you to build a complex array of collections for a later module’s field to map multiple items (collections) to it.

Here is an example of using the “Target structure type” of an Array Aggregator module:

As you can see, the “Map” toggle on fields are used when you have an array. You can easily build an array variable to map to a field, by using an Array Aggregator module and select the “Target Structure Type” as the future field you want to map the array into.

So, to answer your question, you need an Iterator and Array Aggregator.

samliewrequest private consultation

Join the Make Fans Discord server to chat with other makers!


Fantastic, thank you!

1 Like