Proposal summary
This proposal describes the NetSuite- Shopify integration.
Requirement
The GRAPH TECH INNOVATIONS LTD-Canada-NS have already done the NetSuite -Shopify integration for the store “Graph Tech Guitar Labs”. They would like to do the new NetSuite -Shopify integration for the new store “Graph tech B2B portal”.
They would like to collect the order from Shopify to NetSuite and update the order in Shopify based on the status of payment and fulfillment.
Shopify must have all the updated information about the order and send status emails to the customer. And the customer must see the order history in the Shopify account (correct data incl. shipping cost).
Prerequisites
We must create one new Heroku and Git to connect to Shopify and NetSuite. We can check Heroku subscription plans in Pricing | Heroku and Git pricing in Pricing · Plans for every developer · GitHub .
Our Solution
The requirement can be achieved by connecting Shopify and NetSuite with the use of the Heroku server, APIs, and scripts.
Order Sync:
We will send order details from Shopify to the Heroku server. We will add script in Heroku to connect Shopify with NetSuite. And with the help of the Git repository, the script will call the NetSuite script from the Heroku server. So, the script in NetSuite will create/update/cancel the order in NetSuite using Shopify data.
Create:
When new order creates in Shopify the script will create the sales order in NetSuite and if the customer is not existing in NetSuite, then the script will create a new customer in NetSuite. Otherwise, the script will update the address and other details in the customer record based on new Shopify data.
Update:
If the user updates order in the Shopify and no item fulfilments are created in NetSuite for this order, then the script will update the sales order in NetSuite.
Cancel:
When the user cancels the order in Shopify, then the script will close the sales order in NetSuite.
Refund:
If the user refunds the order, then the script will create a return authorization record from sales order and a credit memo from return authorization in NetSuite if no return authorization is not created for that SO and item fulfilment is created for that sales order.
Item fulfilment sync:
When an item fulfilment is created for the Shopify orders in the NetSuite, then the connector needs to acknowledge Shopify that the order is fulfilled. The status of fulfilments in Shopify is Fulfilled, Unfulfilled, partially fulfilled
On the successful creation of item fulfillment record creation with Shipped status in NetSuite, Shopify will automatically set the status of the Order to “fulfilled” if item fulfilments are created for all items. Otherwise, script will set the status as partially fulfilled” in Shopify, when partial fulfilment records are created in NetSuite.
We can use the existing NetSuite script to update the order in Shopify when the user creates item fulfilment for the sales order in NetSuite. And we will add one location field to sales order record and source it to item fulfilment so that the script will identify orders from “Graph tech B2B portal” and “Graph Tech Guitar Labs” store.
The Shopify fulfillment id will be stored in the corresponding item fulfillment record.
Note:
- The item fulfilment API fires when the item fulfilment status changes to shipped. The fulfilment of a Shopify order is only considered when it has been shipped.
- We will not be considering picked, packed statuses of item fulfilments for updating in Shopify and we will be updating the fulfilled status in Shopify when all the item fulfilment record is created with Shipped status.
- The script will update the Shopify order only if the Shop item fulfilment id field in item fulfilment is blank.
- This will be a one-way integration from NetSuite to Shopify. We cannot update the fulfilment status from Shopify to NetSuite.
- If an item fulfillment is deleted in NetSuite, the changes will not be updated in Shopify. Also, if status of item fulfilment is moved back to pick/pack status from shipped status, this will not be reflected in Shopify
- Once the tracking number is added to the Shopify orders, we will not consider those item fulfilment records for further script execution.
- If there are multiple item fulfilment records in NetSuite, we will update the “fulfilled” status in Shopify only when all the item fulfilment records are created with the “Shipped” status. Otherwise script will set “partially fulfilled” status in Shopify.
Payment sync:
The script will set the financial status of the Shopify order to paid/partially paid in the scheduled process. The script will trigger in every (say 1hr) interval of time and update the financial status in Shopify when the payment completes for the Shopify order in NetSuite.
Note:
- The script will trigger only for the Shopify order and Shopify order id should not be blank in the sales order.
- The script will not execute and make any changes on Shopify in the edit/delete of payments for sales order in NetSuite.
- This will be one way integration. The payment made in Shopify will not make any changes in NetSuite.
Error handling
To handle errors, a custom record will be created for every sales order. Any error that occurs while creating a sales order, item fulfilment sync and payment sync will be recorded in the order sync custom record fields.
- For every sales order there will be creating an instance containing the details. If there is no error occurs during creation and there will be no value appear in the custom record error handling field.
- Using this custom record, errors related to sales orders, item fulfilment, and payment syncs are handled. If any errors occur during any sync, they will be recorded in related fields of the custom record.
- These custom records will be attached in a custom subtab of sales orders
- An email will send to specific employees if there is an error occur during other order creation.
Assumption
- We have added the estimated time on our assumptions. This may vary in the development stage.
- Field mapping should be defined in the initial stage of development. The field mapping of sales order will be same as integration done for Graph Tech Guitar Labs.
- Integration will be active for new records created in NetSuite or updates happen in NetSuite. The migration of existing/historical data will be out of the scope of this development
- We assume that the data will be imported in the Shopify and NetSuite if there is any historical data migration required
- If there is a customer with the given details in the NetSuite but it is inactive, then script will activate that customer before creating the sales order.
- Applicable only to inventory. We haven’t considered matrix items, special order, drop ship, kit, service, item group, other charges items
- Not applicable for a lot or serialized items
- Expired or damaged items stock quantity should be updated accurately in the NetSuite as we will be considering Items in good condition.
- We assume that the fulfillment creation will happen only from the NetSuite side.
- Class or department classifications in transactions are out of the scope of this development
- Sending any emails from the script are out of the scope of this development. For example, if the send email to customers after fulfillment feature is enabled in the NetSuite account, the emails will be sent from NetSuite.
- Intercompany transactions are out of the scope of this development
- We assume that no manufacturing processes involved in business and assembly items are out of the scope of development
Risk
- Some of the API endpoints will be deprecated in the future. Need to update the API endpoints for the same in the future.