Proposal Summary
This proposal outlines the implementation of Shopify Integration to NetSuite using suite script.
Requirement
The client requires to integrate the following features from Shopify to NetSuite and NetSuite to Shopify:
- Orders from Shopify to NetSuite
- Products from NetSuite to Shopify
- Inventory levels from NetSuite to Shopify
- Fulfilments from NetSuite to Shopify
We assume that the data will be imported into the Shopify if there is any historical data migration required for the following records:
- Customer records
- Order records
- Item records
- Any historical open orders (Sales, purchase, transfer) need to be imported to Shopify if required
- Any fulfilment records related to historical orders in Shopify
Deliverables
Prerequisites:
- The Shopify website should be set up by the client. All the outlets and initial set-up should be completed to start the development.
- Provide a sandbox/staging site for the Shopify website if possible.
Field Customizations
The Customer, Item, Sales Order, and fulfilment records need to be customised, and we need to add a checkbox field and a text field for each record. These fields will display under a custom subtab called “Shopify Sync”.
- When a sync between NetSuite and Shopify occurs, we will check the check box in the corresponding record in NetSuite.
- Text field for storing the unique ID of each record in Shopify in their corresponding records in NetSuite.
- For orders, there will be a Shopify Status field in the custom subtab.
- For all records in NetSuite, there will be a “Last Sync Date” to show the latest sync date and time.
Custom Record for API Information
We will create a custom record to store the API details in NetSuite. We will be storing the domain URL, authorisation and permission type in the custom record which will be helpful for the NetSuite user to edit the details such as update in authorisation token through a custom record in NetSuite.
Auth 1.0
We will be using the auth 1.0 code authorisation for the authorisation to Shopify website. The client credentials and access token will be saved in the custom record .
Master Data Integration
Item Sync
Item Sync from NetSuite to Shopify
Inventory Item Create / Update / Delete:
Whenever an item is created/ updated /deleted in NetSuite, that will be reflected in Shopify. We will be considering the SKU as the unique key for the item sync. SKU in the Shopify website will be mapped to the Item Name field in the item record in NetSuite.
Matrix Item Create/Update:
When a parent matrix item is created, that will be reflected in the Shopify website as the parent item having variants. When a child matrix item is created/updated in NetSuite, then the sync will happen as a scheduled one.
The item record has three customized fields:
- ShopifyParentID (Parent item and child item have in common)
- ShopifyID (Unique Shopifyproduct Id)
- ShopifyVariant ID (Child item Id)
We will be referring to the above-mentioned custom fields to sync the details of matrix and child items from NetSuite to Shopify Software.
We will be sending the matrix item details as a scheduled script for creating the details from NetSuite to Shopify.
Pricing:
We assume that there will be a custom price level (such as “Shopifyprice”) which will be synced to Shopify from NetSuite. Also, we will not be considering quantity level pricing for each item. If there is no Shopifyprice defined in the item record, we can consider only one price level for sending the price to Shopify website.
Note
- The creation or addition of variants in NetSuite can be reflected in the Shopify but not the deletion of variants/parent record
- We will not be considering the tax schedule in the item record for sending the online price to Shopify
Outbound Processes Integration
Order sync
Order Sync from Shopify to NetSuite
The Sync will be a scheduled integration from Shopify to NetSuite.
Customer sync from Shopify to NetSuite
When an order is created in Shopify and synced to NetSuite, if the customer used in the order is not present in NetSuite, we will be creating a new customer record in NetSuite. We will be using the customer email address to find the corresponding customer in NetSuite.
Create a sales order
Order with paid status
We can create the sales orders from Shopify to NetSuite by scheduling and fetching all orders from Shopify and if a customer does not exist in the NetSuite account, we’ll create the customer record in NetSuite with the response details.
Item records will be available in the NetSuite and if any item is not available, we will be throwing an error in the custom record when order creation.
We will be fetching all orders with paid status modified in the Shopify in one day and update/create in NetSuite. We will complete the update of Sales orders only if the fulfilment has not been started.
For paid statuses order with payment done, we will create a sales order in NetSuite. When there is payment done and not fulfilled then, it’ll create a customer deposit record and sales order for the same in NetSuite, otherwise, we will create a sales order record only.
For the retail orders, the payment type can be Cash, card, or cheque. So, we will set the payment method accordingly. So, the client must provide the account to be deposited in this case. If the payment method is credit, then we must set any of the credit card types in cash sales like VISA, MasterCard etc.
Note:
- The customer deposit record will be created in NetSuite for all types of payments made in Shopify except the gift cards/vouchers.
- If the payment method is “gift card”, we will be adding a discount item (hardcode Shopify discount) as a line item in the sales order in NetSuite. We assume that the discount item record for the gift card will be created in the NetSuite.
- Orders will be created in pending fulfillment status in NetSuite and the approval processes will not be considered.
- The Sync of images is not considered. The order sync will fail even if the customer has no email address.
- Shipping methods are not considered since no methods are available in Shopify.
- If there is a shipping cost in Shopify, we will add it in the shipping cost field in the NetSuite sales order record irrespective of the shipping method.
- No tax calculations are considered.
- Partial payments are possible in the Shopify website and NetSuite.
- Payment methods in Shopify need to be created in NetSuite.
- We will not be defining payment methods in sales orders where the invoice needs to be created in NetSuite.
- Removing a line item from a sales order record while updating a sales order in NetSuite will not be reflected in the Shopify website.
- Any update or creation of Shopify order details in NetSuite will not be reflected on the Shopify Website.
Fulfillment Sync
Fulfilment Sync from NetSuite to Shopify
All details in the sales order will be used to create the fulfilment record. It is possible to update fulfilment status from NetSuite to Shopify as either “partially fulfilled” or “Fulfilled”. In Shopify, the sales order with statuses as “Unfulfilled” and “partial” can only be fulfilled.
We will be doing a real-time sync for fulfilment sync from NetSuite to Shopify, on saving the item fulfilment record in NetSuite with the “Shipped” status.
Note
- For fulfilment sync there is only one-way sync possible, from NetSuite to Shopify.
- We cannot update fulfilment status from Shopify to NetSuite. It is a one-way sync, only from NetSuite to Shopify.
- 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.
- 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.
Auto Invoicing from fulfilment Record
We will be creating an auto invoice script for creating invoices when an item fulfilment record with shipped status has been created. When there are multiple item fulfilment records in NetSuite, we will create a single invoice for each order in NetSuite when all the item fulfilment records associated with one record are created with the “Shipped” status.
Note:
The invoice will auto be generated, and the unit price will be set the o Total amount/ Quantity from the sales order.
Regarding the Amount field in the Invoice, we can’t set the value for more than 2 decimal points.
As it is a NetSuite Standard functionality, we couldn’t make any change in the precision. It will be rounded to 2 numbers (fractional part) after the decimal point.
Inventory Integration
Inventory levels Sync
Inventory Level sync from NetSuite to Shopify
A custom field will be available in the item records to indicate that the items will be synced with Shopify. If the custom checkbox is checked, then the stock quantity will be updated to the Shopify. Otherwise, the item’s availability will not be updated in the Shopify.
Create a custom field in the item record to store the ShopifyID of the product. Once the value is stored in the field, we will make the field disabled to avoid user error. This field value will be updated while the item integration happens.
A script will be running every hour to check whether all item haves having a custom field checked or not. Once we retrieve the ShopifyID, we will be updating the stock quantity for every item in the Shopify.
For updating the stock quantity, the script will check the ’quantity available’ field in NetSuite corresponding to locations(outlets) in the item record.
We will be implementing a scheduled script to fetch the inventory stock level from NetSuite to Shopify website. We will be only considering the one-way sync of inventory stock from NetSuite to Shopify website.
Note:
- We assume that the stock take activities will not be conducted in the Shopify website.
- Sales orders fulfilment actions in Shopify website reflected in NetSuite and the inventory levels will be the same in NetSuite and Shopify.
- Any inventory adjustment or write-offs of the products will always be handled on the NetSuite Side.
- No updates of stock level from Shopify to NetSuite will not take place.
Error Handling
Master Data Integration:
- We will be creating a field in a custom subtab in the item record to keep the error that occurs during item sync.
- Also, for sales order records, there is a customized field for error handling which holds the error that occurs while order sync.
Outbound processes Integration:
To handle errors, a custom record will be created for every sales order. Any error that occurs while creating a sales order 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 customer deposit 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.
Technical Summary
Item Sync:
- Inventory item: Real time sync from NetSuite to Shopify (Create/update/Delete)
- Matrix item: Scheduled sync from Shopify to NetSuite (Create/Update)
Sales Order Sync:
- Scheduled sync from Shopify to NetSuite (Create/Update)
Fulfilment Sync:
- Real time sync from NetSuite to Shopify (Create)
- Real time sync from NetSuite to Shopify (Delete)
Inventory Level Sync:
- Scheduled sync from NetSuite to Shopify
Assumptions
- Field mapping should be defined in the initial stage of development.
- 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 already if there is any historical data migration required.
- We assume that the Customers will be already imported into Shopify, so no customer sync or migration will be required. The customer sync will be out of scope of this integration.
- The Shopify customer in the NetSuite will be mapped or identified by using the email address. So, assume that the email addresses in NetSuite and Shopify will be same and email address will be available for all customers in both Shopify and NetSuite.
- The Return and refund sync will be out of the scope of this integration.
- It is possible to have a real-time integration from NetSuite to Shopify for most cases, but the integration from Shopify to NetSuite side will be a scheduled one.
- All the sales orders will be created as status “Pending fulfilment” in NetSuite.
- If there is a customer with the given details in the NetSuite but it is inactive, a new customer will not be created before creating the sales order.
- We will not consider tracking details for item fulfilment records from Shopify to NetSuite and NetSuite to Shopify.
- Applicable only to inventory, Matrix item in NetSuite. Not applicable to 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.
- No tax details will be considered while creating the sales order. The tax details should be automatically sourced by NetSuite, and we won’t override any Tax information.
- The deletion of the cash refund, credit memo and customer deposit will not be considered.
- Shipping methods are not considered in order sync since no methods are available in the Shopify.
- We assume that, payment types will be predefined in Shopify website and the corresponding payment methods and their accounts will be already set up in both systems.
- Phone field format will not be considered and in NetSuite, the phone field value should have at least five digits and we expect a minimum of five digits in the phone field value entered in the Shopify website .
- There are limits for the fields like a city with a maximum word length of 50 characters in NetSuite and this will be limited while sending data from NetSuite to Shopify website
- Class or department classifications in transactions are out of the scope of this development.
- We assume that while fulfilling a sales order, the fulfilled quantity will always be less than or equal to the quantity in the sales order.
- No more additional line items can be fulfilled in Shopify or NetSuite system while fulfilling a sales order.
- Sending any emails from the script is 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.
- We assume that the item fulfillments will be created based on the committed quantities in NetSuite.
- Warehouse locations will not include any bin management.
- Single master data can only be sent at a time.
- We are not considering the exchange rate of transactions in NetSuite. We will keep the amount as it is in the Shopify and the currency will be auto-populated in the NetSuite sales order from the primary currency of the customer record in NetSuite.
- We are not considering the unit of measure specified in any records. We will use the default populated units for the items in NetSuite.
- The date format of the data sent to Shopify API Should be UTC format and the date format in NetSuite will be followed according to the global preference set up in the account.
- Intercompany transactions are out of the scope of this development.
- If there is an approval (standard approval) in NetSuite, only the approved transactions will be sent to the Shopify website.
- Inbound shipment records are out of the scope of this development.
- The performance of the integrations is dependent on the number of processors in the account. The scheduled actions will be processed based on the processing queues. So even if the script can be executed as scheduled, it may get even more delayed if there is no available queue to process.
- Automatic application of customer deposit to invoice with fulfilled orders will take place in NetSuite.
- The integration will consider only one Shopify integration instance and one location in Shopify.
- Price levels in customer records in NetSuite are not reflected in Shopify and the price list for items is not considered.
Risk
- Some of the API endpoints will be deprecated/version/authentication update can take place in the future.
- If there are any null values in any fields in NetSuite or Shopify, we will be updating the null value itself in the corresponding fields.
- Some API will infer some mandatory fields while sending data to Shopify website and which will not be a mandatory field in NetSuite, and we might need to make it a mandatory field in NetSuite.
- Invoice created in NetSuite will not be reflected in Shopify.
- Creating a cash sale is out of the scope of the integration. Also, the return for the standalone cash sale records will not be considered.
- Creation of items on the Shopify website will not be reflected in NetSuite.
- While we are deleting the records in Shopify, if there are any dependent records, the deletion of a record in Shopify will not take place.
- Observed Behavior:
- If the tax calculation apps in Shopify and NetSuite are different, there may be a chance that there is a small difference in the total amount as the tax amount is not set by our script.
Time
200 Hours