Articles in this section

Sync Amazon MFN orders to multiple default customers

The Amazon Seller Central – NetSuite integration app allows you to sync Amazon MFN orders to a single default customer in the Default NetSuite customer for all Amazon orders setting under Settings > Order (MFN) > Customers. If your order flow is high and you have many invoices which are yet to be settled, this would result in some issues. To avoid these issues, you may need to sync the Amazon orders to multiple default customers. This article details how you can sync your Amazon MFN orders to multiple default customers using handlebars.

Custom handlebar for adding multiple default customers

The following custom handlebar can be used to add multiple default customers:

  {{#compare (subtract (substring AmazonOrderId 17 19) (multiply (floor (divide
  (substring AmazonOrderId 17 19) n)) n)) "===" 0}}customerInternalId1{{else compare
  (subtract (substring AmazonOrderId 17 19) (multiply (floor (divide (substring
  AmazonOrderId 17 19) n)) n)) "===" 1}}customerInternalId2{{else compare (subtract
  (substring AmazonOrderId 17 19) (multiply (floor (divide (substring AmazonOrderId
  17 19) n)) n)) "===" 2}}customerInternalId3 ... {{else compare (subtract (substring
  AmazonOrderId 17 19) (multiply (floor (divide (substring AmazonOrderId 17 19)
  n)) n)) "===" n-2}}customerInternalIdn-1{{else}}customerInternalIdn{{/compare}}
  • The above handlebar allows you to add multiple default customers for “n” customers.
  • Each customer you want to add as a default customer, you need to add a new string:
        customerInternalId1{{else compare (subtract (substring AmazonOrderId 17 19)
        (multiply (floor (divide (substring AmazonOrderId 17 19) n)) n)) "===" 1}}
  • You need to replace customerInternalId with the InternalId value for the customer record in NetSuite for each customer at the beginning of each string.
Example: To add three default customers whose InternalId values in NetSuite are 1432695, 1432896, and 1432796; the handlebar would be constructed as follows:
{{#compare (subtract (substring AmazonOrderId 17 19) (multiply (floor (divide (substring AmazonOrderId 17 19) 3)) 3)) "===" 0}}1432695{{else compare (subtract (substring AmazonOrderId 17 19) (multiply (floor (divide (substring AmazonOrderId 17 19) 3)) 3)) "===" 1}}1432896{{else compare (subtract (substring AmazonOrderId 17 19) (multiply (floor (divide (substring AmazonOrderId 17 19) 3)) 3)) "===" 2}}1432796{{/compare}}

Edit mappings for the Order (MFN) flow

To add multiple default customers in the Default NetSuite customer for all Amazon orders setting under Settings > Order (MFN) > Customers, the custom handlebar needs to be updated in the Mappings for the Amazon (MFN) Order to NetSuite Order Add flow.

To edit the mappings for the Amazon (MFN) Order to NetSuite Order Add flow,

  1. Log in to your integrator.io account
  2. Click Amazon – NetSuite integration app.
  3. Go to Flows > Order (MFN) section.
  4. Next to the Amazon (MFN) Order to NetSuite Order Add flow, click Edit mapping (Edit mappings).
  5. Replace the existing value for the Customer (InternalId) mapping with the custom handlebar, as shown below:
    Edit mappings for Customer (InternalId)
  6. Click Save & close to update the mappings with the selected values.

Add multiple default customers in Settings

Once the mappings have been updated with the custom handlebar for the Amazon (MFN) Order to NetSuite Order Add flow, you can add multiple default customers in the Default NetSuite customer for all Amazon orders setting under Settings > Order (MFN) > Customers as shown below:

Multiple default customers added

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.