Requirement
The client would like to implement a one-way sync for customer master from NetSuite to the third-party application.
Our Solution
Pre-Requisites
- Need an API end point to post the Data
- Berkely Needs to provide credentials of the API.
- Require unique identifier to know when the NetSuite customer record is edited.
- Need a sample API response reference.
- Require a test account of the third-party system if possible.
Description of the Solution
This requirement can be achieved by creating a script for NetSuite Customer Records. The script only works when the customer record is created and edited.
- The script will fetch the customer basic details from the NetSuite in the form of JSON.
- Using these details, we will make an API call for creating customers in the third-party application.
- When editing the customer record, we will push the same data into the application. We assume the data will be updated with the existing customer details in the application.
- We will be considering the following customer record fields -:
- Member ID
- Type
- Member Number
- Member Type
- MR./MS…
- Name
- Res.Type
- Category
- Status
- Gender
- DOB
- Nationality
- Occupation
- Marital Status
- Company Name
- Address
- Sales Person
- ALT.Phone
Field Customization
A Freeform Text type field will be created in the customer record to know whether the customer record is sent to the application or not. The response from the API will set into this custom field.
- If we get an error response on the API call, the script will send an email to the predefined user’s email to notify the sync failure with the received Response message
Assumptions
- We assume the third-party system provide the API and it will be a POST request in JSON format.
- Need to consider only the create and edit of the customer record in the NetSuite.
- The same API will be used for the both create and edit context of the customer records.
- When we edit the customer record, the data will be updated with the existing data in the application.
- We will be considering the copy context in the NetSuite.
- No need to migrate the historical data to third-party application. The proposed script will work for the newly created NetSuite customer records and when edited those records only.
- We will not delete the customers from application, if a customer is deleted in the NetSuite.
- The script will not be applicable to the Leads, Prospects, sub customers, contacts, and other relationships.
- 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 can update the external id in the customer record.
- Considered only the main body fields from the customer record.
Risks
- If the data required on the request body is not available in the customer record, then value corresponding to the key will be empty. So that the request may fail on the third-party system. This cannot be handled from our side
- Only the main body fields from the NetSuite customer records that are mentioned in the proposal are considered. If any other field/sub-list fields have to be included, then they will be considered in the additional scope.