Order Approval
Discover how order approval in HotWax Commerce ensures seamless integration with NetSuite, preventing conflicts and errors in order fulfillment.
Last updated
Discover how order approval in HotWax Commerce ensures seamless integration with NetSuite, preventing conflicts and errors in order fulfillment.
Last updated
Orders that are in "Created" status in HotWax Commerce are pushed to NetSuite rather than orders that are in "Approved" status. It's important to note the rationale behind this decision.
Initially, we attempted to synchronize approved orders from HotWax Commerce to NetSuite. However, this posed challenges when dealing with orders that contained both available and unavailable inventory items for fulfillment. In such cases, only a partial order could be pushed to NetSuite, causing complications. If the order was partially fulfilled in NetSuite due to certain available items, a subsequent attempt to send the remaining items led to conflicts. NetSuite recognized the initial order as complete and did not accept the remaining partial order, causing system errors and duplication.
To circumvent such complexities and ensure a seamless process, a strategic shift was made. Orders, upon their creation within HotWax Commerce, are designated as "Created" status. It is at this phase that critical order information is captured and assembled into CSV files for transmission to NetSuite. By choosing the "Created" status for order synchronization, HotWax Commerce retains control of the integration process and its sequence of interactions with NetSuite, enhancing accuracy and mitigating errors that arose from attempts to synchronize orders in "Approved" status.
Orders will only be allocated for fulfillment after they have been approved.
To successfully create a sales order in NetSuite, it is a prerequisite to have the customer information pre-existing within NetSuite's database. If the order contains a new customer not present in NetSuite, the system won't allow the order to be pushed.
Actions
A scheduled job within HotWax Commerce Integration Platform operates at defined intervals to generate a CSV file comprising customers who have not been synchronized to NetSuite. This job can be configured to run at regular intervals, typically set at an hourly frequency. Customers who haven't been synchronized within the last hour are included in this CSV file and placed at an SFTP location for synchronization with NetSuite.
HotWax Internals
Identify new customers by checking the Person table for entries where the roleTypeId is CUSTOMER
and where the PartyIdentification
record for identification type NETSUITE\_CUSTOMER\_ID
is not created.
SFTP Location
A Scheduled Script in NetSuite is responsible for downloading the CSV file of customers not yet synchronized and utilizes the ImportTask function of the N/Task module. This script processes and creates customer records within NetSuite, ensuring that the necessary customer information is available in NetSuite for order creation.
SuiteScripts
Import new customers from SFTP
Once customers are created in NetSuite, a scheduled script exports recently created customers in a CSV file at an SFTP location to be imported by HotWax Commerce.
A scheduled job in Hotwax Commerce OMS reads this file from the SFTP location and syncs the NetSuite customer IDs, confirming the customer synchronization in the OMS.
SuiteScripts
Export recently created customers to SFTP
SFTP Location
Job in HotWax Commerce
Import NetSuite Customer IDs from SFTP
"*" denotes fields that are required to be sent to NetSuite for the customer sync to work
Capturing orders in HotWax Commerce initiates the creation of orders in "Created" status. In this step, created sales orders are pushed from HotWax Commerce to NetSuite for further processing.
A job within HotWax Commerce Integration Platform generates a CSV file of orders in "Created" status that have not yet been sent to NetSuite and places this file at an SFTP location. When creating this file HotWax Commerce also ensures that the customer already exists in NetSuite using the customer ID saved in the last step.
The file contains details such as unit prices, order adjustments, and shipping costs, excluding direct tax amounts. HotWax Commerce omits the tax amount from the file and sends tax codes for the individual order items because NetSuite independently computes the taxes based on these codes and applies them accurately to each order item, ensuring precise tax calculations within NetSuite.
Order and Item Discounts
If an order has a discount code applied to it, during order sync to NetSuite, HotWax checks if the applied code is available in NetSuite. If the code is available then the exact code is used and the value of the discount is shared as the Rate
. In the event that the code is not available in NetSuite, HotWax will use a default discount code SHOPIFY DISCOUNT
along with the value of the discount.
Item-level discounts have special handling as well. They are synced as a separate line item in the order using a SHOPIFY DISCOUNT ITEM
item, however, HotWax does not send an order line ID for this item. The amount of the adjustment is added in the Amount
field when preparing the CSV for NetSuite and the Price Level
is always set to Custom
.
Item Price
The price for products is not sent by HotWax when the order syncs to NetSuite. Instead, NetSuite automatically adds the value of the product upon order creation based on the price of the product in NetSuite.
Tax Codes
For retailers that use Avatax, the Tax Code and Shipping Tax Code will always contain AVATAX
when sent from HotWax. Avalara Tax calculation will automatically compute taxes on the order in NetSuite when the order is created.
We've added a limit to how many orders can be synced in one file to NetSuite to ensure the NetSuite file size limit is not breached. NetSuite has a limit of 25,000 rows in one CSV, so if your order volume in one sync duration exceeds this limit, we automatically paginate the file to ensure NetSuite does not reject the file. During pagination, one order should not be split into separate files because this could lead to errors in the order import process in NetSuite. Assuming that most eCommerce orders contain 10 or fewer items, there is an upper limit of 1000 orders per file. This keesp the file size well below NetSuite's limit while also leaving a buffer for orders with more line items.
Though it may seem like this would significantly slow down the order sync, this is not actually the case. All valid orders are still exported from HotWax Commerce at once and then paginated for NetSuite, this means all the order files are available for NetSuite to process and the speed at which they're processed is determined by the configuration of NetSuite used by the retailer. Higher configurations will have faster and more concurrent file process capabilities.
SFTP Locations
A scheduled SuiteScript in NetSuite reads this CSV file from the SFTP location and creates sales order records in the "Pending Fulfillment" status using the CSV Import function of the N/Task module.
SuiteScript
To sync sales orders from HotWax Commerce to NetSuite, a required field is the "Order Status." As a part of our integration strategy, we have opted to directly set the value of "Order Status" in NetSuite as "Pending Fulfillment".
"*" denotes fields that are required to be sent to NetSuite for the sales order sync to work
This step syncs NetSuite sales order line item IDs with HotWax Commerce order items. This step helps in mapping and aligning the order line items in HotWax Commerce with their corresponding line item IDs in NetSuite. This synchronization enables a smooth and accurate cross-referencing of items and their relevant details between the two systems. Without syncing order line item IDs, any attempt to update an order item in NetSuite would result in a new order item being created.
Actions
A Map Reduce SuiteScript in NetSuite retrieves order line item IDs, generates and places the CSV file at an SFTP location.
SuiteScript
SFTP Location
A job within HotWax Commerce OMS imports this CSV file from the SFTP location and associates NetSuite order line item IDs with corresponding order items.
Job in HotWax Commerce
This step synchronizes NetSuite sales order IDs with orders in HotWax Commerce for tracking and identification. This step enables cross-referencing and linkage between orders in both systems, paving the way for accurate tracking and management.
The synchronization of Sales Order IDs from NetSuite to HotWax Commerce serves as an indicator that the orders in HotWax Commerce have been successfully integrated into NetSuite. Additionally, it is an essential step for various functions, including the creation of item fulfillment, return authorization, and customer deposit records in NetSuite. *** NOTE
Actions
A Map Reduce SuiteScript in NetSuite fetches pending fulfillment orders, generates a CSV file with internal sales order IDs and places this file at an SFTP location.
SuiteScript
SFTP Location
A job within HotWax Commerce OMS imports this CSV file and associates NetSuite order IDs with corresponding orders.
Job in HotWax Commerce
This step creates customer deposit records in NetSuite for authorized payments of sales orders. Generating a customer deposit in NetSuite is essential to represent authorized payments for orders. This step signifies the initiation of the financial transaction for orders.
Sync status of customer deposits to NetSuite is time-driven, this means that we check the entry date of an order into HotWax Commerce and manage a cursor for the last exported timestamp. If a customer deposit creation fails, it will not be automatically retried because it will have passed the order entry time condition.
To ensure that only applicable customer deposits are created in NetSuite, orders that have been canceled or refunded will not have their deposit created. However, if an order is canceled or refunded after the deposit has been created in NetSuite, it will have to be manually handled by a NetSuite user. HotWax provides a report for all orders that have been canceled or refunded where the customer deposit may need to be dealt with manually.
Actions
HotWax Commerce Integration Platform runs a scheduled job that generates a JSON file comprising of order details with their respective grand totals and places this file at an SFTP location.
SFTP Locations
Export customer deposit for orders with NetSuite order identification
A SuiteScript in NetSuite reads this JSON file from the SFTP location and creates customer deposit records in "undeposited" status. It employs the N/Record module for record creation.
SuiteScript
The HC_SC_CreateCustomerDeposit
SuiteScript also generates a CSV file highlighting erroneous records found during processing and uploads the file to the SFTP server. Simultaneously, an email alert is automatically triggered to designated personnel, helping them quickly pinpoint the source of the issue and accelerating troubleshooting.
This step involves marking orders as "Approved" for further processing and fulfillment. This step ensures that orders are appropriately marked "Approved" once all necessary details and required references are established. This authorization triggers the routing of orders to their designated fulfillment locations.
Actions
A scheduled job within HotWax Commerce Integration Platform validates order items, generates and places the CSV file at an SFTP location. A scheduled job within HotWax Commerce OMS reads this CSV file from the SFTP location and marks order items "Approved".
Approved orders are then processed by the brokering engine in HotWax Commerce for order routing. Following the execution of the order brokering engine, the available inventory for each order item is assessed. Consequently, the brokering engine in HotWax Commerce assigns suitable fulfillment locations to the order items that have inventory available for fulfillment.
After completing these steps, here is how much of the order sync is now complete:
Approve order in HotWax for fulfillment
HotWax brokering allocates orders
Sync item allocation to NetSuite for facilities where NetSuite fulfillment is used
Sync order item fulfillment details from NetSuite to HotWax
Sync order item fulfillment details from HotWax to NetSuite
Invoice orders in NetSuite
S.No. | Fields in HotWax Commerce | Fields in NetSuite |
---|---|---|
S.No. | Fields in HotWax Commerce | Fields in NetSuite |
---|---|---|
S.No. | Fields in HotWax Commerce | Fields in NetSuite |
---|---|---|
S.No. | Fields in HotWax Commerce | Fields in NetSuite |
---|---|---|
1
Shopify Customer ID
HC Shopify Customer ID
2
NetSuite Customer ID
Internal Customer ID
3
Name
Name
4
Emails
5
Phones
Phone
1
Product Store External ID
Subsidiary *
2
Customer-Closed Won
Status *
3
Individual
Type *
4
Party ID
External ID
5
Party Classification
Initial Lead Source
6
True
Taxable
1
NetSuite Sales Order ID
Internal Sales Order ID
2
Shopify Order ID
HC Shopify Order ID
3
Shopify Order Name
PO#
4
Sales Channel
HC Sales Channel
5
Customer
Customer *
6
Bill To Address
Billing Address *
7
Order Date
Date *
8
Product
Item
9
Qty
Quantity
10
Ship To
Shipping Address *
11
Ship Method
Shipping Method
12
Ship From
Location
13
Communications
Memo
1
Order Item Seq ID
External Order Line ID
2
Price Level NetSuite
Price Level
3
Tax Code
Tax Code
4
Product Promo ID
Discount Item
5
Product Store External ID
Subsidiary
6