Multi-Field mapping to NetSuite items list
Hello, we're attempting to map the results of a multi-field expression source to a Sales Order Items : List destination in a NetSuite mapping. However, only the first line item is being populated with the result of the expression. In the screencap you can see we have direct field mappings (line_items[*].quantity -> Items : Quantity), hard-coded mappings ("-1" -> Items : Price Level), and expression mappings (Items : Sales Territory/Tax Rate/Tax Code). The direct and hard-coded mappings are present on each line item, but the multi-field mappings are not. Is this by design? If so, is there a workaround for multi-field?
This step is in a WooCommerce -> NetSuite orders flow, but we see the same behavior in the preview for our Shopify -> NetSuite orders flows.
Thanks!
-
Official comment
Thanks for sharing this Lakhan Bhagnani. Please let us know if this works Bryan Carroll otherwise, please raise a support team and our team will assist you in resolving the issue. Thanks!
-
Hey Bryan,
I have faced a similar thing before and was curious to understand why and how we can do it.
Why it didn't set for the rest of the items is "Shipping.country" is single in an object whereas Line items is an array of objects hence we were able to set the value only once.To workaround, I have added if handlebar to iterate the handlebar for each line_item.
{{#if line_items[*].name}}{{#compare shipping.country "==" "CA"}}3242{{else compare shipping.country "==" "US"}}324{{else}}540{{/compare}}{{/if}}
Let me know if that works for you.
0 -
Lakhan Bhagnani This works perfectly. Thanks! I figured that it was because was shipping.country was a scalar and not an array, but wasn't 100% sure.
0
Please sign in to leave a comment.
Comments
3 comments