Issue:
We are attempting to solve the Note Attribute Fields. Because these fields are not required in Shopify, the Note Attribute number may differ for each order. We are trying to solve that with the following (see the example for poFile:
{{#contains $.[note_attributes[0\]].name "poFile"}} $.[note_attributes[0\]].value
{{else}}{{#contains $.[note_attributes[1\]].name "poFile"}} $.[note_attributes[1\]].value
{{else}}{{#contains $.[note_attributes[2\]].name "poFile"}} $.[note_attributes[2\]].value
{{else}}{{#contains $.[note_attributes[3\]].name "poFile"}} $.[note_attributes[3\]].value
{{else}}{{#contains $.[note_attributes[4\]].name "poFile"}} $.[note_attributes[4\]].value
{{else}}{{#contains $.[note_attributes[5\]].name "poFile"}} $.[note_attributes[5\]].value
{{else}}{{#contains $.[note_attributes[6\]].name "poFile"}} $.[note_attributes[6\]].value
{{else}}{{#contains $.[note_attributes[7\]].name "poFile"}} $.[note_attributes[7\]].value
{{else}}{{#contains $.[note_attributes[8\]].name "poFile"}} $.[note_attributes[8\]].value
{{else}}{{#contains $.[note_attributes[9\]].name "poFile"}} $.[note_attributes[9\]].value
{{else}}{{#contains $.[note_attributes[10\]].name "poFile"}} $.[note_attributes[10\]].value
{{else}}{{#contains $.[note_attributes[11\]].name "poFile"}} $.[note_attributes[11\]].value
{{else}} undefined {{/contains}} {{/contains}}{{/contains}} {{/contains}} {{/contains}} {{/contains}} {{/contains}} {{/contains}} {{/contains}} {{/contains}} {{/contains}} {{/contains}} "
The error we are getting speaks to a NetSuite field explained below.
| Source | Code | Message |
| netsuite | exceeded_max_field_length | "Unable to create the order in NetSuite for the Shopify order #********* Failed to create, update/transform record because The field custbody_celigo_etail_transaction_ids contained more than the maximum number (300) of characters allowed." |
Resolution:
This is the formula that should be used:
{{#each $.note_attributes}}{{#compare this.name "===" "poFile"}}{{this.value}}{{/compare}}{{/each}}
Here is another alternative solution to resolve the error "Failed to create, update/transform record because The field custbody_celigo_etail_transaction_ids contained more than the maximum number ( 300 ) of characters allowed." You can accept until 300 characters and cut off the rest. This resolution would not affect anything in your order.
Important: Although the maximum supported length remains 300 characters, certain special characters may be counted differently during processing. As a result, truncating the value to 300 characters using the following expression may not always prevent the error: substring sourceTransactionIds "0" "300"
If you continue to receive the error "contained more than the maximum number (300) of characters allowed", reduce the substring length further (for example, 250, 225, or 200 characters) until the value is accepted. This is a known issue, and this guidance serves as a temporary workaround until a permanent fix is available.
To resolve this error, create a handlebar expression in the order flow mapping:
In the Shopify - Netsuite integration app, go to the Flows > Order >Shopify order to NetSuite sales order (add) flow.
- Click the mapping icon as shown as a sample in the screenshot.
Set the handlebar expression below on the export field (Shopify) of the Etail Transaction Id(s). See the sample screenshot below.
{{substring sourceTransactionIds "0" "300"}}- Click Save and Close.
- Go to the integration.io Dashboard and retry the error message to resolve the issue.