The Magento 2 – NetSuite integration template lets you sync customers, products, orders, shipments, invoices, order cancellations, refunds, return authorizations approval, item receipts, and return merchandise authorizations between Magento 2 and NetSuite.
Supported integration flows
The Celigo quickstart bundle contains workflows you can easily configure and deploy without coding or IT support. The following built-in flows sync from the specified source data to the corresponding destination.
Magento 2 to NetSuite
Flow |
Magento 2 order cancellation to NetSuite sales order cancellation |
Magento 2 return merchandise authorizations to NetSuite return authorization |
NetSuite to Magento 2
Gather your credentials
Before you install
Keep your Magento 2 and NetSuite account credentials ready:
-
Magento 2 – verify APIs and authorization
-
Before you set up a Magento 2 connection below, ensure you have the API and authentication details for your Magento 2 app.
-
Refer to the Magento 2 help documentation to learn more about APIs and authorization.
-
-
NetSuite – verify APIs and Authorization
-
Before you set up a NetSuite connection, ensure that you have the API and authentication details for your NetSuite app.
-
Refer to the NetSuite help documentation to learn more about APIs and Authorization.
-
Install the Magento 2 – NetSuite template
To install the Magento 2 – NetSuite template:
-
Navigate to integrator.io > Marketplace.
-
From the available templates, select either Magento 2 or NetSuite.
-
Find the Magento 2 - NetSuite template and click Preview. The Install template page appears.
-
Review the template’s contents and the ReadMe file, and click Install now to begin.
-
Add credentials and install the NetSuite integrator.io bundle (bundle ID: 399096).
-
Install the template.
Configure the Magento 2 – NetSuite flows
Additional record mapping is required to integrate the template’s exports and imports with your Magento 2 and NetSuite apps.
Note that all of your flows are disabled when first installed. After configuring the flows, you may enable them in your Flows dashboard or in Flow Builder with the Off/On toggle button and then run or schedule each flow.
Magento 2 customers to NetSuite customers
This integration flow syncs Magento 2 customers as NetSuite customers. When a new customer is added/updated in Magento 2, the integration flow exports customers from Magento 2 to NetSuite. It consists of two parts: an export from Magento 2 and an import to NetSuite.
Export: Retrieves customer data from Magento 2 using a delta export to fetch only updated records since the last flow run.
Import: Adds or updates customer records in NetSuite using the email address as the identifier. If a matching email exists, the customer record is updated; otherwise, a new record is created. The import includes key fields like name, email, phone, and address details.
This flow ensures that NetSuite customer data stays current with Magento 2 updates, providing seamless integration.
Setup Instructions
-
Before running the flow, configure the following hardcoded mapping in the Import NetSuite customers step according to your business requirements.
Source record field (Magento 2) |
Destination record field (NetSuite) |
"13" |
Status (InternalId) |
“3” |
Subsidiary (InternalId) |
“16” |
Custom Form (InternalId) |
"true" |
Address Book: Replace All Lines |
NetSuite customers to Magento 2 customers
This integration flow syncs customer data from NetSuite to Magento 2. It consists of two parts: an export from NetSuite and an import to Magento 2.
Export: Retrieves customer records from NetSuite that were created or modified since the last flow run. It filters out records without an email and transforms the data for compatibility.
Import: Adds or ignores customers in Magento 2 based on their email addresses, using lookups to prevent duplicates. The import includes detailed field mappings to ensure accurate data transfer.
This flow ensures that customer data in Magento 2 is kept up-to-date with the latest information from NetSuite, providing a seamless integration between the two systems.
Before you begin
An email address is mandatory for NetSuite customers.
Setup instructions
-
Before running the flow, configure the following static mapping in the Import Magento 2 customers step according to your business requirements.
Source record field (NetSuite) |
Destination record field (Magento 2) |
Billing State/Province |
customer.addresses[*].region.region_id |
NetSuite items to Magento 2 products
This integration flow syncs items from NetSuite to Magento 2 as products. It consists of two parts: an export from NetSuite and an import to Magento 2.
Export: Retrieves modified items from NetSuite using a delta operation and a RESTlet targeting the 'item' record type. The export includes necessary transformations and filters to prepare the data for import.
Import: Adds or updates products in Magento 2 using the SKU as the lookup identifier. The import handles HTTP requests, using PUT for updates and POST for new products. It includes a lookup to find the SKU in Magento 2 and processes each product individually, managing requests and responses in JSON format.
This flow ensures that product data in Magento 2 is kept up-to-date with the latest information from NetSuite, providing seamless integration between the two systems.
Setup instructions
-
Before running the flow, configure the following mapping in the Import Magento 2 products step according to your business requirements.
Source record field (NetSuite) |
Destination record field (Magento 2) |
Billing State/Province |
customer.addresses[*].region.region_id |
Magento 2 orders to NetSuite sales orders
This integration flow syncs orders from Magento 2 to NetSuite as sales orders. It consists of two parts: an export from Magento 2 and an import to NetSuite.
Export: Retrieves orders from Magento 2 that were created since the last flow run, using a REST API call with pagination. A lookup retrieves customer details from Magento 2, excluding guest customers.
Import: First, it imports customer data into NetSuite, using the email address as the lookup identifier and mapping relevant fields. Guest customers are handled separately. Then, it imports sales orders into NetSuite, using a custom field as the lookup identifier. The import includes mapped fields for order details, addresses, payment, and shipping methods.
This flow ensures accurate synchronization of orders between Magento 2 and NetSuite, providing seamless integration between the two systems.
Before you begin
The items in Magento 2 and NetSuite should be the same.
Setup instructions
Before running the flow, configure the following mapping in the Import NetSuite sales orders step according to your business requirements.
Source record field (Magento 2) |
Destination record field (NetSuite) |
“3” |
Subsidiary (InternalId) |
“1” |
Currency (InternalId) |
"Check / Money order" |
paymentmethod.internaid |
extension_attributes.shipping_assignments.0.shipping.method |
Ship Via (InternalId) |
"Partner Discount" |
Discount (Name) |
NetSuite sales orders to Magento 2 orders
This integration flow syncs sales orders from NetSuite to Magento 2. It consists of two parts: an export from NetSuite and an import to Magento 2.
Export: Retrieves sales orders from NetSuite that were created since the last flow run. A lookup is used to retrieve necessary customer details from NetSuite.
Import: First, it imports customer data into Magento 2, using lookups to prevent duplicate entries. Then, it imports the sales orders into Magento 2, transforming the data to match Magento 2's format. The import includes mapped fields for order details, customer information, addresses, and order status. Finally, the NetSuite sales order is updated with the Magento Order ID to ensure proper data linkage.
This flow ensures accurate synchronization of orders between NetSuite and Magento 2, providing seamless integration between the two systems.
Before you begin
The items in Magento 2 and NetSuite should be the same.
Setup instructions
In Magento 2 customer import, configure the following mappings depending on your requirements:
-
Static mapping for customer.addresses[*].region.region_id, entity.shipping_description, entity.extension_attributes.shipping_assignments[*].shipping.method, entity.extension_attributes.shipping_assignments[*].shipping.address.region_id, entity.billing_address.region_id, and entity.payment.method.
-
Dynamic map for customer.id.
-
Mapping for customer.website_id
-
Mapping for entity.customer_group_id and entity.store_name.
Source record field (NetSuite) |
Destination record field (Magento 2) |
Billing State/Province |
customer.addresses[*].region.region_id, |
"Flat Rate - Fixed" |
entity.shipping_description |
"flatrate_flatrate" |
entity.extension_attributes.shipping_assignments[*].shipping.method |
Shipping State/Province |
entity.extension_attributes.shipping_assignments[*].shipping.address.region_id |
Billing State/Province |
entity.billing_address.region_id |
"Check / Money order" |
entity.payment.method |
customer.id |
|
"1" |
customer.website_id |
"1" |
entity.customer_group_id |
entity.store_name |
Magento 2 order cancellations to NetSuite sales order cancellations
This integration flow synchronizes order cancellations from Magento 2 to NetSuite as sales order cancellations. It consists of two parts: an export from Magento 2 and an import to NetSuite.
Export: Retrieves canceled orders from Magento 2 using a delta export type and an HTTP GET request, filtering specifically for orders marked as canceled.
Import: First, it matches the Magento 2 order IDs and items with their corresponding NetSuite records through lookups. Then, it updates the existing sales orders in NetSuite using the 'update' action. During the import, the flow sets the 'isclosed' field to 'true' for canceled items and utilizes distributed imports for faster processing. This ensures data consistency between Magento 2 and NetSuite.
This flow ensures accurate synchronization of order cancellations between Magento 2 and NetSuite, providing seamless integration between the two systems.
Before you begin
Magento 2 order is recorded as ‘pending’ fulfillment status on NetSuite sales orders.
Setup instructions
-
In the NetSuite import, configure mapping for Items: closed.
NetSuite sales order cancellations to Magento 2 order cancellations
This integration flow synchronizes sales order cancellations from NetSuite to Magento 2. It consists of two key parts: an export from NetSuite and an import to Magento 2.
Export: The flow exports canceled sales orders from NetSuite using a delta export type and a RESTlet.
Import: The flow then imports these cancellations into Magento 2 by sending a POST request to the relevant API endpoint. It incorporates data transformation and filtering steps, processes data in JSON format, and handles one record at a time. Additionally, it automatically resolves matching trace key errors to ensure data consistency between the two systems.
This flow ensures accurate and seamless synchronization of sales order cancellations between NetSuite and Magento 2.
Before you begin
-
Sync orders in NetSuite and Magento 2.
-
Magento 2 order ID should be stored as DocumentNumber(Order#) in NetSuite sales orders
Magento 2 shipments to NetSuite item shipments
This integration flow synchronizes shipment data from Magento 2 to NetSuite. It consists of two key parts: an export from Magento 2 and an import to NetSuite.
Export: The flow exports new or updated shipments from Magento 2 using a delta export and processes the data through paging to handle large volumes efficiently.
Import: The flow imports the shipment data into NetSuite as item shipments. It performs lookups to map carrier codes and link shipments to the corresponding sales orders.
This flow ensures efficient and accurate synchronization of shipment data between Magento 2 and NetSuite.
Before you begin
-
Sync orders in Magento 2 to NetSuite. Magento 2 entity_id should be stored as a custom field in NetSuite sales order.
-
The item names in Magento 2 and NetSuite should be the same.
Setup instructions
-
Configure static mapping for carrier code depending on your requirements.
-
Configure a dynamic map for depending on your requirements.
-
Records are ignored per the configured filter rules in NetSuite item shipments import.
Source record field (Magento 2) |
Destination record field (NetSuite) |
order_id |
created from (InternalId) |
tracks[0].carrier_code |
Ship Via (InternalId) |
NetSuite item receipts to Magento 2 return merchandise authorizations
This integration flow synchronizes NetSuite item receipts with Magento 2 return merchandise authorizations (RMAs). It consists of two key parts: an export from NetSuite and an import to Magento 2.
Export: The flow exports new or updated item receipts from NetSuite using a delta export type to capture recent changes. The data is then transformed and mapped to the required structure.
Import: A lookup operation retrieves additional RMA details from Magento 2 using the Magento_RMA_ID. The flow then updates the RMA records in Magento 2 by sending an HTTP PUT request.
This flow ensures that both systems are kept up-to-date with the latest information, maintaining synchronization between NetSuite and Magento 2.
Before you begin
-
The return authorizations in NetSuite and Magento 2 should be the same.
-
Magento 2 RMA ID should be stored in a custom field in NetSuite return authorizations.
Setup instructions
-
In the Magento 2 return merchandise authorizations import, configure mapping for rmaDataObject.status and rmaDataObject.items[*].status depending on your requirements.
Source record field (NetSuite) |
Destination record field (Magento 2) |
"Processed and Closed" |
rmaDataObject.status |
"approved" |
rmaDataObject.items[*].status |
NetSuite Invoices to Magento 2 Invoices
The integration flow synchronizes invoice data from NetSuite to Magento 2. It consists of two key parts: an export from NetSuite and an import to Magento 2.
Export: The flow exports invoices from NetSuite that were created or modified since the last run, transforming the data for further processing.
Import: A lookup retrieves order details from Magento 2 using the Magento Order ID. The flow then imports the invoice data into Magento 2, ensuring that duplicate data is ignored. Finally, it updates the NetSuite invoice with the Magento Invoice ID.
This flow runs automatically and resolves matching trace keys to handle errors efficiently, ensuring accurate and seamless synchronization of invoices between NetSuite and Magento 2.
Before you begin
-
The Magento 2 orders and NetSuite sales orders should be the same.
-
Magento 2 order ID should be stored in the Custom field in NetSuite sales orders.
Setup instructions
-
To fetch the custom field (Magento 2 order ID) from the sales order record type, configure the saved search result with the formula depending on the requirement.
-
The formula is "{createdfrom.custbodyceligoat_magento_orderid}", where "created from" is the sales order, and "custbodyceligoat_magento_orderid" is the custom field.
Magento 2 return merchandise authorizations to NetSuite return authorizations
This integration flow synchronizes return merchandise authorizations (RMAs) from Magento 2 to NetSuite as return authorizations. It consists of two key parts: an export from Magento 2 and an import to NetSuite.
Export: The flow retrieves RMAs from Magento 2 using a delta export type, filtering specifically for RMAs with a 'pending' status.
Import: The data is transformed and processed through two lookups: one to retrieve order details from Magento 2 and another to obtain sales order details from NetSuite. The flow then creates return authorizations in NetSuite, mapping fields and linking them to the appropriate sales orders.
This flow ensures accurate and efficient synchronization of RMAs between Magento 2 and NetSuite.
Before you begin
-
Sync orders in Magento 2 to NetSuite. Magento 2 order ID should be stored in a custom field in NetSuite sales order.
-
The item names in Magento 2 and NetSuite should be the same.
-
Item shipment should be done for NetSuite sales orders.
Setup instructions
-
In the NetSuite return authorization import flow, configure dynamic mapping for “created from (InternalId)” depending on your requirement.
-
In the NetSuite return authorization import flow, configure the mapping for Status (InternalId), Priority, Order Type (InternalId), End User (2) (Name), Priority (9), and Items: Tax Code (InternalId) depending on your requirement.
Source record field (Magento 2) |
Destination record field (NetSuite) |
created from (InternalId) |
|
“A” |
Status (InternalId) |
"50" |
Priority |
“1” |
Order Type (InternalId) |
"1" |
End User (2) (Name) |
"50" |
Priority (9) |
NetSuite return authorizations to Magento 2 return merchandise authorizations
This integration flow synchronizes return authorizations from NetSuite with return merchandise authorizations (RMAs) in Magento 2. It consists of two key parts: an export from NetSuite and an import to Magento 2.
Export: The flow exports return authorizations from NetSuite, transforming and filtering the data as needed.
Import: A lookup operation retrieves corresponding order details from Magento 2. The flow then imports the return merchandise authorizations into Magento 2 and updates the NetSuite records with the Magento RMA ID.
This flow ensures accurate and efficient synchronization between NetSuite return authorizations and Magento 2 RMAs.
Before you begin
-
Sync orders in Magento 2 to NetSuite. Magento 2 order ID should be stored in a custom field in the NetSuite sales order.
-
Shipment should be done for the Magento 2 order.
Setup instructions
-
In the Import Magento 2 return merchandise authorizations import, configure the mapping for rmaDataObject.items[*].status, rmaDataObject.status, and rmaDataObject.items[*].resolution depending on your requirement.
Source record field (NetSuite) |
Destination record field (Magento 2) |
"pending" |
rmaDataObject.items[*].status |
"pending" |
rmaDataObject.status |
"5" |
rmaDataObject.items[*].resolution |
NetSuite return authorizations approval to Magento 2 return merchandise authorizations
This integration flow synchronizes return authorizations from NetSuite with return merchandise authorizations (RMAs) in Magento 2. It consists of two key parts: an export from NetSuite and an import to Magento 2.
Export: The flow exports return authorizations from NetSuite, transforming and filtering the data as necessary.
Import: A lookup retrieves the corresponding order details from Magento 2. The flow then imports the RMAs into Magento 2 and updates the NetSuite records with the Magento RMA ID.
This flow ensures accurate and seamless synchronization of return authorizations between NetSuite and Magento 2.
Before you begin
-
The value of return authorizations in NetSuite and return merchandise authorizations in Magento 2 should be the same.
-
Store the Magento 2 return merchandise authorizations ID in the NetSuite custom field.
Setup instructions
-
In the Magento 2 return merchandise authorizations import, configure static mapping for rmaDataObject.status and rmaDataObject.items[*].status depending on your requirement.
Source record field (NetSuite) |
Destination record field (Magento 2) |
"Pending Receipt" |
rmaDataObject.status |
"Pending Receipt" |
rmaDataObject.items[*].status |
Magento 2 refunds to NetSuite customer refunds
This integration flow synchronizes return authorizations from NetSuite with return merchandise authorizations (RMAs) in Magento 2. It consists of two key parts: an export from NetSuite and an import to Magento 2.
Export: The flow exports return authorizations from NetSuite, transforming and filtering the data as necessary.
Import: A lookup retrieves the corresponding order details from Magento 2. The flow then imports the RMAs into Magento 2 and updates the NetSuite records with the Magento RMA ID.
This flow ensures accurate and seamless synchronization of return authorizations between NetSuite and Magento 2.
Before you begin
-
The Magento 2 orders and NetSuite sales orders should be the same.
-
Magento 2 order ID should be stored in Order # and custom field (Magento 2 Order id) in NetSuite sales orders.
Setup instructions
-
Configure mapping for Order Type, End User, Status, Items:Location, Items: Receive, Location, Refund Method, Use Dynamic Mode, Credits:Apply, Credits:Type depending on your requirements.
-
Configure dynamic mapping for Created from, celigo_nlobjTransformId, Credits:Ref No. depending on your requirements.
Source record field (Magento 2) |
Destination record field (NetSuite) |
"1" |
Order Type |
"111039" |
End User |
"B" |
Status |
"25" |
Items:Location |
"true" |
Items: Receive |
"30" |
Location |
"1" |
Refund Method |
"true" |
Use Dynamic Mode |
"true" |
Credits:Apply |
"Credit Memo" |
Credits:Type |
order_id |
Created from |
celigo_nlobjTransformId |
|
CreditMemoID |
Credits:Ref No. |
NetSuite customer refund to Magento 2 refund
The integration flow synchronizes customer refund data from NetSuite to Magento 2. It consists of two key parts: an export from NetSuite and an import to Magento 2.
Export: The flow begins by exporting customer refunds from NetSuite, transforming the data as needed.
Import: Lookups are performed to retrieve return authorization details and order information from Magento 2. The flow then imports the refund data into Magento 2, ensuring that all refund information is accurately transferred and recorded in both systems.
This flow ensures seamless synchronization of customer refunds between NetSuite and Magento 2.
Before you begin
-
The Magento 2 orders and NetSuite sales orders should be the same.
-
Magento 2 order ID should be stored in Order # in NetSuite sales orders.
-
The invoice should be present in Magento 2 for creating a refund.
NetSuite non-PayPal cash refunds to Magento 2 refunds
This integration flow synchronizes non-PayPal cash refunds from NetSuite with refunds in Magento 2. It consists of two key parts: an export from NetSuite and an import to Magento 2.
Export: The flow begins by exporting new or modified cash refunds from NetSuite, transforming the data to extract the necessary IDs.
Import: A lookup retrieves the corresponding order details from Magento 2. The flow then imports the refund data into Magento 2 and updates the NetSuite records to mark them as processed.
This flow ensures consistent and accurate synchronization of cash refunds between NetSuite and Magento 2.
Before you begin
-
The Magento 2 orders and NetSuite sales orders should be the same.
-
Magento 2 order ID should be stored in a custom field in NetSuite cash sales.
-
Shipment has to be done for Magento 2 orders.
-
The invoice must be created for the Magento 2 order.
NetSuite PayPal cash refunds to Magento 2 refunds
The integrationflow synchronizes PayPal cash refunds from NetSuite to Magento 2. It consists of two key parts: an export from NetSuite and an import to Magento 2.
Export: The flow starts by exporting cash refunds from NetSuite that were created since the last run, using a RESTlet and delta export type. The data is transformed to extract the Magento Order ID and internal ID.
Import: A lookup retrieves the corresponding order details from Magento 2 via an HTTP GET request. The flow then imports the refund data into Magento 2, adding new refunds or ignoring duplicates by sending a POST request with the refund details. Additionally, another import operation updates NetSuite cash refunds by internal ID, ensuring that only unsent records are processed.
This flow leverages delta exports, lookups, and filters to ensure efficient and accurate synchronization of PayPal cash refunds between NetSuite and Magento 2.
Before you begin
-
Shipment has to be done for Magento 2 orders.
-
An invoice must be created for the Magento 2 order.
Comments
Please sign in to leave a comment.