Hey Celigo Team
am trying to process Orders for each scenario that happens in Shopify
The handlebar Works with some Orders some orders don't
The Handlebar
{{#if line_items[*].sku}}{{line_items[*].sku}}{{else}}{{#contains line_items[*].title "Gift Card"}}
Gift Card
{{else}}
{{#contains line_items[*].name "Gift Wrap"}}
Gift Wrapping
{{else}}
{{#contains line_items[*].name "Custom Engraving"}}
Custom Engraving
{{else}}
{{#contains line_items[*].name "Custom Stone Count"}}
Inlay Birthstone Bangle
{{else}}
{{#compare line_items[*].sku "==" "VW-HTO-NV-HTO Box"}}
VW-HTO-NV-HTO Box
{{else}}
{{#compare line_items[*].sku "==" "idkmysize-ringsizer"}}
idkmysize-ringsizer
{{else}}
{{/compare}}
{{/compare}}
{{/contains}}
{{/contains}}
{{/contains}}
{{/contains}}
{{/if}}
Normally with [*], it should Start from 0
1- Working
The Handlebar Working when there are More than 2 items
2- Not Working
The Handlebar is not working because we have 2 items
ERROR :
Unable to create the order in NetSuite for the Shopify order #4290262302808 Could not compile handle bar "{{#if line_items.2.sku}}{{line_items.2.sku}}{{else}}{{#contains line_items.2.title "Gift Card"}}Gift Card{{else}}{{#contains line_items.2.name "Gift Wrap"}}Gift Wrapping{{else}}{{#contains line_items.2.name "Custom Engraving"}}Custom Engraving{{else}}{{#contains line_items.2.name "Custom Stone Count"}}Inlay Birthstone Bangle{{else}}{{#compare line_items.2.sku "==" "VW-HTO-NV-HTO Box"}}VW-...
as you can see we have just 2 items in JSON, it should start from [0]-[1] but for some reason keep going like [1]-[2] typically [2] is not exist it gives IndexOf error