Articles in this section

Set up item lookup for Amazon order sync using ASIN field

When you sync Amazon orders to NetSuite if you're getting the "Failed to add Amazon Order#xxx" error message, there is a possibility that you are using the ASIN field as a lookup in the Amazon(MFN) Order to NetSuite Order Add flow.

Note: The integration app adds its own lines to some orders: gift wrap, shipping, shipping discount, tax substitute, and promotion discount lines. These lines carry the SKU but no ASIN, so an item lookup that searches by ASIN searches for a blank value, and the whole order fails with an error like Could not find a match for "[[…asin…,"isempty"],…]". This applies to both the Order (MFN) and Order (FBA) flows. Keep the item lookup on Name (Internal) with the SKU instead, and use Item aliases are configured in NetSuite (available in both the Order (MFN) and Order (FBA) settings) to match items by alias.

If you keep the ASIN lookup, set the lookup value so that a line without an ASIN uses the ASIN of the order’s first product line: {{#if OrderItem.*.ASIN}}{{{OrderItem.*.ASIN}}}{{else}}{{{OrderItem.0.ASIN}}}{{/if}}. The substitute item settings for gift wrap, shipping, and other added lines don’t prevent this failure, because they’re applied after the lookup runs.

To resolve this error,

  1. Go to Settings > Integration Flows > Order (MFN).
  2. Select the Edit Mappings icon (Edit mappings) of the Amazon (MFN) Order to NetSuite Order Add flow.
  3. In the Edit mapping: Amazon (MFN) Order Import Adaptor pane, replace OrderItem[*].SellerSKU with OrderItem[*].ASIN.
  4. Select the Settings icon (Settings (gear) button) of the same field to access the Settings pane.
  5. Select Amazon Product ASIN in the Refresh search filters setting, next to the expression field, and select Settings.
    Settings.jpg
  6. On the Operand settings window, choose Expression, and select Save.
    Operand_settings.jpg
  7. In the Expression field, enter the handlebar expression {{#if OrderItem.*.ASIN}}{{{OrderItem.*.ASIN}}}{{else}}{{{OrderItem.0.ASIN}}}{{/if}}
    Expression.jpg

    Note: If you're adding the above handlebar, adding the item(internalid) mapping is recommended after the Quantity mapping. Ensure to disable the dynamic mode.
  8. Select Save & close to save the changes made in the Settings pane. and return to the Edit mapping: Amazon (MFN) Order Import Adaptor pane.
  9. Select Save & close to save the changes made in the Edit mapping: Amazon (MFN) Order Import Adaptor pane and return to the Amazon(MFN) Order to NetSuite Order Add flow.