Accessing line_item properties in handlebars

I am trying to map the properties (an array of objects) from our shopify line_items to the Items : Descriptions in NetSuite.

Following the pattern I see for mapping line_item values that comes out of the box with the order flows, I cam up with this:

{{jsonSerialize line_items.[*].properties}}

The result of this is mapping the entirety of the first line_item into the description, which overflows the 4000 character limit.

I am assuming line_items.[*] doesn't work the same way inside the handlebars.

How can I access that value?

 

Thanks

0

Comments

2 comments
Date Votes
  • line_items[*].X as above in shopify order json was the important syntax change that made handlebars work for me in the context of a line item (Items: custom field name) for Netsuite sales order . Example code

    {{#each line_items[*].properties}}  
    {{#compare name '==' 'discountA'}}
    {{split value ":" 1}};
    {{else compare name '==' 'discountB'}}
    {{split value ":" 1}};
    {{/compare}}
    {{/each}}
    1
  • Jolyon Blazey Just wanted to understand if you are facing the issue with the handlebars in a flow using the Shopify - NetSuite integrated app or is this issue surfacing while using a custom flow. Let us know so that we can direct your query to the appropriate team.

    0

Please sign in to leave a comment.

 

Didn't find what you were looking for?

New post