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.
{{#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,
- Log in to your integrator.io account
- Click Amazon – NetSuite integration app.
- Go to Flows > Order (MFN) section.
- Next to the Amazon (MFN) Order to NetSuite Order Add flow, click Edit mapping ().
- Replace the existing value for the Customer (InternalId) mapping with the custom handlebar, as shown below:
- 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:
Comments
Please sign in to leave a comment.