• Instructions to Ask a Question

    Click on the "Ask a Question" button and select the application for which you would like to ask questions.

    We have 5 different products namely - Pabbly Connect, Pabbly Subscription Billing, Pabbly Email Marketing, Pabbly Form Builder, Pabbly Email Verification.

    The turnaround time is 24 hrs (Business Hours - 10.00 AM to 6.00 PM IST, Except Saturday and Sunday). So your kind patience will be highly appreciated!

    🚀🚀Exclusive Discount Offer

    Just in case you're looking for any ongoing offers on Pabbly, you can check the one-time offers listed below. You just need to pay once and use the application forever -
     

    🔥 Pabbly Connect One Time Plan for $249 (🏆Lifetime Access) -  View offer 

    🔥 Pabbly Subscription Billing One Time Plan for $249 (🏆Lifetime Access) - View offer

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