The Order Export flow exports sales order data from NetSuite to Magento. This flow is triggered when the Export to Magento box on a NetSuite order is checked and the order is saved. The Connector only supports exporting a NetSuite order to create a new order in Magento. Updates to orders that are already in both systems are not synced.
Order created in NetSuite
Order exported to Magento in real time
The Order Export flow exports orders created in NetSuite to your Magento store. Because the standard Magento API does not support creation of orders in Magento, Celigo has developed a Magento extension that enables the Connector to export NetSuite orders to Magento. By default, Celigo installs the extension as a part of your setup. If you prefer to install it, please contact your Celigo resource for a set of instructions and the required files. At a high level, the installation involves adding some new PHP files to the Magento setup and modifying some existing PHP files.
When an export is triggered, the Connector checks that the order:
- Is not closed or cancelled. Closed or cancelled orders are not exported, and an error is logged in the Celigo Integration Logs.
- Has not already been exported to Magento. The Magento ID field on the sales order’s Custom tab should be blank.
- The customer record associated with the order is a Magento customer. The customer record in NetSuite should have a value in the Magento ID field under the Custom tab. If no Magento ID is present on the customer record, the export fails, and an error is logged in the Celigo Integration Logs. You will then need to manually export the customer to Magento, either by using the Connector’s Customer Export flow or by importing it to NetSuite using the Customer Import flow.
When an order is exported to Magento:
- The Connector sets the Magento ID field on the Custom tab of the sales order in NetSuite to maintain a hard link between the order in NetSuite and the order in Magento.
- The Connector checks the Magento box on the Custom tab of the NetSuite order.
- The Magento item ID of each item on the order is retrieved from Magento and set on the NetSuite order at line item level.
- The Connector cannot set the NetSuite transaction ID as the Magento Order ID, but it could add a comment to the Magento order that displays the NetSuite transaction ID.
Export of Line Items
The Connector attempts to export order line items from NetSuite to Magento without altering the line item data. However, the following scenarios can cause issues:
- If the Rate field is blank for a line item, it is not exported.
- If the Rate field is blank on one line but not blank on another line, the entire order fails to export.
- If the Item Name/Number (or other field you have mapped as the SKU) from the NetSuite order does not match a SKU in Magento, the Magento order is still created, and the line will have a blank value for SKU, preserving the order total.
- If the order totals do not match, the variance amount will be logged.
Order Statuses and Fulfillment / Billing Export Flows
If the order being exported has a status of Partially Fulfilled, Pending Billing/Partially Fulfilled, Pending Billing, or Billed, the Connector sets the Order Status to Complete in Magento.
Payments must be authorized and captured in NetSuite. All orders exported from NetSuite to Magento use a payment method named ‘NetSuite.’ This method is added to Magento when the Magento extension is installed to support the order export flow. The Connector cannot use any of the existing Magento payment methods due to limitations in the Magento API. Because Magento requires a payment method to be set while creating a new order, the Connector uses the NetSuite custom method, which does not require any other payment related information.
Magento Payment Method Limitations
The Connector cannot use any of the existing Magento payment methods due to limitations in the Magento API. Because Magento requires a payment method to be set while creating a new order, the Connector uses the NetSuite custom method, which does not require any other payment related information.
Re-exporting an Order Manually from NetSuite
An order might need to be re-exported to Magento if changes are needed on the NetSuite order after it is exported. To manually re-export an order to Magento:
- Delete the previously created order in Magento.
- Edit the sales order in NetSuite.
- On the Custom tab, clear the Magento box.
- Clear the Magento ID field.
- Check the Export to Magento box.
- Save the NetSuite order.
Multi-Currency and Order Totals
The Multi-Currency feature is not supported by the Order Export flow in the Connector. All orders are created in USD ($). To ensure that order totals match between the two systems, you must set up your shipping and tax rates exactly the same in the two systems. If the rates do not exactly match in the two systems, the Connector populates the order variance fields in NetSuite after successfully exporting the order to Magento.