I have the below scenario where I create a new Quote in Xero from data load from Google Sheet.
Xero LineItems expect multiple entry (Array) with specific required fields (JSON?) The field name must match what Xero expects. I have managed to make it work using below flow.
However it is using too many operations. For example if there are 30 LineItems. The “Aggregator Order Line Items” will use 30 operations.
I can get the data from Google Sheet already. Problem is it doesn’t create an array mapping field name to actual value. Xero Module fails due to no missing data (aka missing field names).
Is there a better way of doing the above using less operations?
An actual example from my output Bundle from Google Sheet.
Can I go from that to a Array or Array to be able to use in the Xero LineItem like below, without using the Array Aggregator which uses too many operations.
Example of valid LineItem data:
“LineItems”: [
{“Description”: “AVOCADO 8PC”",
“UnitAmount”: 10.24,
“ItemCode”: “7001074”,
},
{“Description”: “CHESE 8PC”,
“UnitAmount”: 10.24,
“ItemCode”: “7001081”,
}
]
I need to be able to select from only the fields I need for LineItem and then some how swap out the column names (that came from Google Sheet) to the name the Xero LineItem expects like above.
Thank you.