Requirement
The client would like to synchronise the item when created and updated from the NetSuite to the third-party Application.
Pre-Requisites
- We need following before the implementation.
- URL for calling the product API
- Needs to provide credentials of the API.
- We require JSON format for the request body.
- We require a text account of the third-party system if possible.
Our Solution
To achieve this requirement, we will implement a script. So, this will be a real-time integration using the API and NetSuite and scripts. We can map kit items and service items as products in the application.
Here we create a button in the item record and on clicking the button the request will be sent in the form of a POST from the record. After sending the requirement this will create a record in the third-party logic and the response of the same will be stored in the custom field. To identify whether the record is synchronised or not we can use a unique id.
- The script will fetch the API details from the NetSuite.
- Using these details, we will make an API call for creating items in the third-party application.
- When editing or updating the item record, we will push the same data into the application. We assume the data will be updated with the existing item details in the application.
- For the Kit items, the component details can be stored in the application Product Description. The stock availability could be calculated by checking all the components
Item Sync
When a new item is created or updated in the NetSuite , then we need to make the same updating in the third party application.
Creation of Items
- When an item is created in the NetSuite, the same item will be automatically synced into the third party application with correct details.
- Items are created in NetSuite, Items considered are : kit Item and Service Item.
- Before the script development field mapping should be confirmed.
- It is better to store the product id in the NetSuite item record.
- We are not considering the components associated with the kit .
- When an item is successfully synced, then the corresponding Application Item Id should be stored in the item record. A custom field can be used in the item record for storing the Application’s product id.
Updation of Item
- When an item is updated in the NetSuite after the sync then the same change will be reflected in the third party application.
- When an item is updated in the application it is not reflected in the NetSuite.
- The updating will only applicable to the newly created item ,it will not consider the existing item.
- Same field mapping is used for the updating also.
Request: Post
Parameters:
| JSON Field | NetSuite Field |
| PROD_ID | Internal id of the item record |
| PROD_NM | Item name field in the item record |
| PROD_NM1 | Description of the item |
| PROD_GR | Internal id of the selected department in the department field |
| SALE_RATE | Kit cost |
| TAX_CD | Hard coded value |
| STATUS | Active/inactive status of the item record |
Assumption
- For update and creation of records in Netsuite, we will be using the HTTP POST request method and the application should handle this.
- Single master data can only be sent at a time.
- We assume the same API will be used for the create and edit context of the records.
- We will not be migrating the historical data to third-party application. The script will work for the newly created NetSuite item records and updating of those records only.
- The data will be migrated only from the NetSuite to the Third-Party application. The data from the third party to the NetSuite is not considered here.
- We will only consider the kit item and service item.
We assume that after the sync a success or error message is created. This response is stored in a custom field that is created as a part of the integration. If it is an error message, we can send email notifications specifying the error reason.
Risk
- If the request body does not contain the necessary details to create the item record in the application, its creation will fail in the application.
- We are not considering location and inventory quantity.
Questions
- Could you please share the details regarding the unique identifier used in updating the item?