Create NetSuite sales order from Magento invoice

EcommerceAccountingERPCRMFinancial ManagementHR managementRecipe Tools

What it does

When a new invoice is created in Magento, this automation retrieves the order details and syncs them to NetSuite as a sales order. It creates missing customers and inventory items so the order record is complete.

Who it's for

Accounting teams who need Magento invoices synced to NetSuite without manual data entry.

How teams use this

Sync invoices to NetSuite automatically

When someone creates an invoice in Magento, the order syncs to NetSuite as a sales order with all line items. No manual entry is needed and both systems stay in sync.

Route orders by customer type

Add a condition to check the customer type in NetSuite and route wholesale orders to a different department. The sync flow stays the same and only the destination changes.

Include custom fields on the order

Set custom fields like purchase order number or shipping method on the NetSuite sales order when it is created. The automation checks for these fields in Magento and maps them to NetSuite.

Filter orders by minimum amount

Add a condition to only create sales orders in NetSuite when the Magento invoice total exceeds a threshold. Small invoices are logged but not synced.

How it works

  1. New invoice created in Magento. A new invoice is generated in Magento 2, which starts this automation to sync the order to NetSuite.
  2. Retrieve the order details. Get the order by ID in Magento 2 to pull the customer, items, and quantities needed for the NetSuite record.
  3. Check for the customer in NetSuite. Search NetSuite for a matching customer. If none exists, create the customer so the sales order has a valid reference.
  4. Verify inventory items exist. For each item in the Magento order, search NetSuite inventory. Create any missing items before the sales order is built.
  5. Create the sales order. Create the sales order in NetSuite with the customer, items, and quantities from the Magento invoice.