Create calculation from incoming array

I have a shipstation module where I receive order information. In the order details there is an array of all of the line items. In each of the array elements is the line item dollar total. I need to add all of these up and then subtract that total from the order total dollar amount in order to get the tax amount (not available in the orders coming from Shipstation) so I can import the order into Shopify with the correct tax amount. I am new to Make and am unsure how to do this.

Can you take a camera-viewfinder-duotone screenshot of your make scenario for me, along with the relevant module configurations and share-all-duotoneshare the images here?

I am attaching 4 images.

  1. Is just the two modules that I am using
  2. Shows the main data from Shipstation and shows the two line item array
  3. Shows the content of one of the line item array elements where the price and tax is shown
  4. Shows the fields in Shopify that I wish to populate by the calculation below

Order dollar total - (sum of line item array elements dollar * qty) = Tax to put in

Shopify fields.
(BTW, The images were uploaded in backwards order)

Hi @joe ,

You can do this by using a combination of 2 modules:

  • The iterator (To iterate over your array of line items)
  • The numeric aggregator (To sum up the values of whatever is coming out of the iterator)

If you map the line items of your order inside of the iterator it will check whatever is inside of the array.

Hope this helps you out!

1 Like