Ox tools needs to integrate Netsuite customers, orders, Invoices, and credit memos with Numerik.
Requirement
Create a connection between Netsuite and Numerik, to send the Netsuite sales data with Numerik for the Canada subsidiary.
The sales data are sent to the numerik when creating customers, sales orders, invoices, and credit memos in Netsuite.
There must be certain conditions we have to consider.
- Sales orders are to be deleted once they’re invoiced.
- Only sales orders with ‘pending-fulfillment are to be uploaded. If the status is changed the corresponding data will be deleted from Numerik.
- Orders on-hold are not to be pushed to numerik, however, if they’re marked as on hold after they’ve already been pushed to Numerik, the sales data need to be deleted from numerik.
- If any edits are made to an invoice, it is best to delete the whole invoice and re-push.
- Only sales orders with items ‘committed’ quantities are to be pushed.
- When a user deletes a sales order from Netsuite the corresponding data is deleted from Numerik also.
Our Solution
Need to develop new scripts in Netsuite for achieving this Canada subsidiary Numerik integration. We can Implement scripts from scratch with our own logic by referring to the existing script for payload creation for API calls.
For customer integration.
We will deploy a new user event script for customers in Netsuite. The script only works if the customer’s subsidiary is Canada.
- The script will fetch the customer API payload details from Netsuite.
- Using this payload we will make an API call for creating customers in numerik.
- When editing the customer record we will push the same data into numerik. As per our communication, the data will be updated with the existing customer details in numerik.
- We will not delete the customers from Numerik, If a customer is deleted in the Netsuite.
For sales order integration.
- We will deploy a new script for the sales order. The script only works if the sales order subsidiary is canada.
- When creating a new sales order in Netsuite. We will check the subsidiary, on hold status, and order status.
- If the sales order subsidiary is Canada and on-hold is false and status is pending-fulfillment, then we will push the sales order data into the Numerik.
- Before pushing the sales order, we will check if the sales order customer already exists on the Numerik. If a customer exists, we will use the same customer in the sales data API payload. If a customer does not exist we will create a new customer in Numerik and the customer id will be used in the API payload.
- When the sales order status is changed from pending-fulfillment to another status. We will remove this sales order data from Numerik.
- When a user makes the order is on hold. We will check if the same sales order data exists on the Numerik. If it exists this data will be removed from the Numerik.
- Before pushing the sales data, we will push the sales order items to Numerik. Only we take items with committed quantities greater than 0.
- Then push the sales data to Numerik along with items and customer details.
For invoice integration.
- We will deploy a new user event script in the invoice record. The script only works if the invoice subsidiary is canada.
- When creating a new invoice we will push invoice data into Numerik. At the same time we will remove the corresponding invoice Created from sales order data from Numerik. For the standalone invoice creation scenario, this rule is not applicable.
- When deleting an invoice in the Netsuite, the sales data for the invoice is deleted in Numerik. The transaction id is used to identify the data.
- When an invoice is edited in the NetSuite the same invoice sales data is deleted and again the same invoice data pushed to Numerik. The transaction id is used to identify the data.
- The items with INCOME ACCOUNT is revenue account are only considered as the sales data in invoice.
For Item Fulfilment Deletion integration.
- We will check the created from sales order status when deleting each IF record in Netsuite. If the sales order status is “pending fulfilment” the sales order data will be pushed to Numerik.
Note :
We will not delete sales data when creating new item fulfilments in Netsuite.
For credit memo integration.
- We will deploy a new user event script in the credit memo record. The script only works if the credit memo subsidiary is Canada.
- When creating a new credit memo record, we will push credit memo data into Numerik.
- When deleting a credit memo record the same credit memo sales data is deleted from Numerik. The transaction id is used to identify the data for delete.
- When a credit memo record is edited in the NetSuite the same credit memo record’s sales data is deleted from the Numerik database and again the data is pushed to Numerik. The transaction id is used to identify the data.
Assumptions
- The sales order data is not pushed to numerik when a user reverts the sales order status is another status to pending fulfillment. Scenario when a user deletes item fulfillments and invoices created for the sales order.
- We don’t want to migrate historical data to numerik.
- The button for deleting sales order data from Numrik need not be required for Canada integration.
- We can use the same payload (data used to send Numerik) data for API used in the Numerik integration with other subsidiaries.
Risk
- Not considered the Sales Data deletion/update on Item fulfillment creation
- There is a chance for script governance error if more items exist in the transaction.
- The integration may affect the performance of the sales order, invoice, and credit memo record. (Due to the multiple scripts deployed for the same records)
Timeline
| Task | Time Required |
| Analysis, Script for edit and update the customer data in numerik, Script for sales order integration, Script for invoice integration, Script for Sales data integration on Item Fulfillment Deletion, Script for credit memo integration, Testing, Documentation and Deployment | 48 hours |
| Total | 48 hours |