Mapping Salesforce Order Items to NetSuite Order Items
Trying to create a POC to integrate Salesforce Order and Order Item data into NetSuite. The Salesforce Order Items are set to be returned as line items. If I have multiple Order Items contained in the line item list, how do I map that to the NetSuite Item so the Order contains all items in the list? Using the mapping shown below, it’s trying to send to NetSuite as a comma-delimited value for each field and NetSuite is failing it.
Salesforce Find Child Records:
NetSuite Create Order Item sublist:
Page 1 / 1
@TavDev
We would need to see how the data is returned from the Salesforce step to see the structure of the line items to see if those are nested or not for the variables you are trying to map.
The NetSuite Item section indicates it supports line items, assuming the mapped variables values are structured as line items (aka array of items).
@Troy Tessalone - Thanks for your reply. Much appreciated. Is the below enough of a visual to determine how they are nested?
Tried to include two screen shots but one got dropped. This is a bit of the structure beyond that first image:
@TavDev
You are working with nested arrays.
1 > 1
Nested array items get flattened to a comma separated text string.
So you would need to use a Formatter step to convert the flattened text string back into an array.
Zap action: Formatter > Utilities > Line Items to Text
Zap action: Formatter > Utilities > Text to Line Items
Thanks, @Troy Tessalone.
I ended up adding a Line Itemizer formatter step to convert the Salesforce output to an array and that did the trick.
Hi @TavDev,
Thank you for sharing your work around for this issue. This will significantly help our members with the same issue.