Order export for Magento 2
Orders are queued for export once they are placed.
Customer data
The customer is pushed with the order, as described here. Note that even if an order is placed anonymously, a customer is still created in NetSuite, since it has no concept of anonymous orders
Shipping Address
The shipping address is pushed with the order. As in Magento, the shipping address on the order is a separate entity from the customer's shipping address, so that even if the customer changes it in the future, the one on the order stays the same.
Billing Address
The billing address is pushed with the order. As in Magento, the billing address on the order is a separate entity from the customer's billing address, so that even if the customer changes it in the future, the one on the order stays the same.
Shipping Method
For the connector to work properly, a few settings must be defined at System->NetSuite->Settings->Shipping Methods:
| Setting | Example value | Description |
|---|---|---|
| Mapping between Magento and NetSuite shipping methods | Free-''-2 UPS ground-''-5 | A mapping between the active shipping methods in Magento and the defined shipping items in Magento. Each line has 3 options:
Note that the shipping costs will be passed from Magento and they will override the values defined in NetSuite. So this means that you don't necessarily have to have a one to one mapping between Magento and NetSuite, just make it granular enough so that it suits your needs. |
| If none of the rules above match, use this NetSuite shipping item internal id: | 2 | As described, a "catch all" for shipping methods that are not mapped. NetSuite won't take in an order with a shipping method that is not mapped, so we still need to pass in a value |
| Mapping between Magento Tracking number types and NetSuite shipping methods | UPS - 2 DHL - 5 | NetSuite will pass back tracking information. Magento supports a pre-defined number of carriers for auto tracking (i.e. clicking a tracking number will take you to the carrier page for the parcel). This map ensures that if you use one of the pre-defined carriers (DHL, UPS, USPS, Fedex), automatic tracking checking will work. If you don't use any of the carriers Magento supports, you can ignore this map. |
| Default tracking number carrier | DHL | A catch all for if the above map does not match. It defaults to "Custom", which means that the customer will still see the tracking number but without the ability to track the order. |
| Send tracking information when receiving tracking numbers from NetSuite | Yes | Whether the customer is announced about the tracking number addition/change. This will be done via the standard shipping update mail in Magento. If you choose not to use this feature, the customer can still see the tracking number in his account, but there will be no notice when one gets added or changed. |
Payment method
Payment method mapping
As with shipping methods, you need to define a one to one map between the Magento payment methods and the NetSuite ones. Each line contains:
- Magento payment method - pick the Magento payment method from the drop down. All active methods are listed
- Credit card - it is common to have a single payment method in Magento (i.e. "Cybersource"), but to want to map it to a different NetSuite payment methods in NetSuite based on the credit card type. If in this case, pick a specific credit card type from this drop down. Otherwise, choose "All"
- NetSuite internal id - the internal id of a payment method defined in NetSuite at Setup->Accounting->Accounting Lists, "Payment Method" view
Payment processor mapping
The payment processor mapping allows you to define the fields and behavior for the passed payment method. Each line item contains:
- Website. For credit card processing, you may choose to use a different merchant account for each website. This setting allows to define the mapping for a specific website or for "All"
- Payment method - Drop down from where you can select any active Magento payment method
- NetSuite Internal Id - the internal id of the credit card processor defined in NetSuite at Setup->Accounting->Credit Card Processing. If the specific method does not require credit card processing, you can leave this empty
- Payment Processor helper class - defines a few extra fields that are to be passed per payment method. Options are:
- Simple - no extra information is passed other than the mapped payment method. Can be used for most "general" payment methods
- Check - used for check/money order. Will also pass the check/money order number
Make sure you map all the used payment methods. A common omission is "No Payment Information required", which appears when the whole order is covered by user points/store credit. If this is a valid use case for your store, make sure you also map it.
Only Authorize & Capture is fully supported
For security reasons, saving plain card data and sending it to NetSuite to allow capturing on shipment is not supported. If you charge the card when placing the order this should be of no concern. All the payment gateway communication will happen inside Magento and the connector will only send not sensivite payment information to NetSuite (i.e. card type). If you need to charge at shipment type, the charge must be done manually inside the payment gateway.
Line items and discount
For a product to be passed to NetSuite, it must have a NetSuite internal id, i.e. it must be imported from NetSuite or linked as described here. NetSuite will not take in random SKUs, i.e. products created in Magento that it does not know about.
For discounts, a discount item must be defined in NetSuite. Then its NetSuite internal id must be entered at NetSuite->Settings->Order Settings->Discount item internal id. All the discounts in Magento will be aggregated under this item. The rate will also be overridden. In case the rate is not overridden, contact NetSuite support. On some instances this feature is off.
Taxes
Tax must be defined manually in Magento (there is no import/sync). The entire order tax will be passed as a separate line item in NetSuite, due to Netsuite's inability of accepting tax if tax codes are not defined.
Order states
A Magento to NetSuite (and vice-versa) status mapping can be defined at NetSuite->Settings->Order Settings->Status Mapping. Every status change in NetSuite will update the status in Magento according to this map. Note that this does not work the other way around though: only the initials status in Magento will be pushed to NetSuite according to map, all other status changes in Magento will be ignored, as it is assumed all order processing is done in NetSuite.
Custom fields
Custom fields can also be pushed to NetSuite. You can define a map at NetSuite->Settings->Order Settings->Custom fields that are to be synched between Magento and NetSuite. Each line contains:
- NetSuite field name - the field name as defined in NetSuite. Must be defined at Sales Order level
- NetSuite field type:
- custom field - simple : any field of a simple type, i.e. string, text area, number, date etc
- custom field list : field of type list
- standard : an order standard field. The list of possible standard fields can be found in the SuiteTalk documentation
- standard record ref : an order RecordRef field type. This feature allows to map NetSuite select options with fixed or order values in Magento. The value that will be sent should be the same as a NetSuite option's internalId. Can be found in the SuiteTalk documentation.
- NetSuite list internal id: the internal id of the list, in case the type of the field is list. Leave it empty otherwise
- Value type:
- Magento order attribute - whether the value to be passed is an attribute of the Magento order object
- Fixed value: pass the value exactly as defined in the next field. Usecase: always pass the value of "Magento" to a "channel" field
- Value. If value type is fixed, the value here will be passed with the order as-is. If value type is "Magento order attribute", then you need to pass the attribute exactly as it appears as a column name in the sales_flat_order table.
Full list of order fields
Order level
| NetSuite field (SalesOrder) | Magento field (Order) | Notes |
|---|---|---|
| tranDate | Created at | |
| entity | Customer | A customer entity will be created in NetSuite, see this section for more details. |
| orderStatus | System config at Order Settings > Default order status | Note that only "Pending Fulfillment" and "Pending Approval" are available since there are the two statuses NetSuite allows creating orders in. Also, in case an order is created in "Pending Approval", the invoice will not be pushed until the order is approved. |
| shipMethod | - | Using the mapping defined in the connector's configuration at "Mapping between Magento and NetSuite shipping methods", the proper NetSuite shipping method will be assigned. The shipping price will always be custom (overridden by Magento). |
| paymentMethod | - | The "Mapping between Magento and NetSuite payment methods" and "Mapping between Magento payment methods and NetSuite payment processors" fields in the connector config will define a map to the proper payment methods and payment processors. |
| Custom fields | - | The "Custom fields that are to be synched between Magento and NetSuite" settings allows defining simple mappings to other custom fields at SalesOrder level |
Order address level
| NetSuite field (Address object) | Magento field (Order address object) | Notes |
|---|---|---|
| addr1 | street1 | |
| addr2 | street2 | |
| city | City | |
| country | Country | Country code converted from ISO format to the format NetSuite expects |
| state | RegionCode | |
| zip | PostCode | |
| addressee | firstName + lastName | |
| addrPhone | Telephone |
Order line item level
| NetSuite field (SalesOrderItem) | Magento field (Sales order item) | Notes |
|---|---|---|
| description | Product name, possibly with a description of the custom options | |
| quantity | Ordered quantity | |
| quantityCommited | Ordered quantity | |
| item | reference to the ordered item via the NetSuite Internal Id | |
| price | - | Reference to the price level, will always be -1 (custom price level) |
| taxCode | - | Reference to the tax code, will always be the "Not taxable internal NetSuite id" defined in the connector's setting. The actual tax will be added as a separate line item (single line item for the entire order) |
| location | - | Reference to the inventory location, globally defined as "Location internal id" in the connector configuration screen |
| rate | price | The price is grabbed from the order item to correspond with the actual paid sum, not the initial product price |
Special line items
- tax line item - a line item containing the tax (entire order). The NetSuite internal id for the tax item is defined in the connector's configuration as "Tax item internal NetSuite id"
- discount line item - a line item containing the discount (entire order). The NetSuite internal id for the discount item is defined in the connector's configuration as "Default discount item internal id". There is no default way to have different type of discounts.
No comments to display
No comments to display