Add value to array based on another value

leeogrady

Member
Integration is Shopify Order ti Xero Invoice. Works fine but want to make it slightly smarter.
I use a iterator for line items (products) and a iterator for shipping (shipping)

Xero needs to have 2 fields supplied, 'Line Item Code' and 'Line Account Code'.
Shopify does not provide any indication of item type in its line item array.
As products can have 1 or many lines the mapping function of the xero fields need more than just a value.

Can I add a value in the iterator for foreach line item that I can then use in the 'Line Item Code' and 'Line Account Code'?

for example, 'Line Item Unit Amount' is doing the right idea;
1669405009463.png

Cheers
Lee
 

Supreme

Well-known member
Staff member
Can I add a value in the iterator for foreach line item that I can then use in the 'Line Item Code' and 'Line Account Code'?
To pass the data in Line Item format you can use the "Line Itemizer" action step.

Further, in the Line Item Code and Line Item Account Code, you can pass the Id of by toggling the map button.

1669446216542.png


 

leeogrady

Member
Thanks @Supreme , however this doesn't get the desired result.
from the line itemizer there maybe 1,2,5, or 100 rows returned. as in the amount column in the screenshot its visible there are 2 amounts for the first itemizer then another listed containing only 1.
adding strings as indicated doesnt account for the variable quantity.

I feel like i have to manipulate the line itemizer data prior to being able to populate this field.

Cheers
Lee
 
Top