Proposal summary
The scope of this proposal includes updating the ready to update checkbox in the vendor return authorization record based on the saved result, as well as updating the additional tracking number field in the purchase order based on the API response.
Requirement
The current requirement mainly relates to two Netsuite customizations.
1. Updating the “ready to update” checkbox in the vendor return authorization record based on the saved result.
2. Updating the additional tracking number field in the purchase order based on the API response.
We’ll use a saved search called APC | VRMA LIST NOT MARKED READY TO RETURN (id : customsearch860) to update the “ready to update” checkbox field in the VRMA record.
From the saved search results, we’ll get all of the vendor return authorization document numbers. Also, if the VRMA record exists in the saved search result, check the “ready to update” checkbox in the VRMA record.
The second requirement for updating the “additional tracking number” field in the purchase order record. For this, create an API endpoint in netsuite when a user calling this API from the external system the tracking numbers fetch from the body of the API request and update automatically in the purchase order “additional tracking number” field in the purchase order record.
The sample API request body is given below:
{
“PO Number” : “Tracking Number”,
“PO Number” : “Tracking Number”,
“PO Number” : “Tracking Number”,
“PO Number” : “Tracking Number”,
}
Our Solution
For VRMA ready to update field update
1. We’ll use a Netsuite scheduling script to do this.
2. Once a day, this script runs (every day at 8.00 am). Obtaining a VRMA document number from the APC | VRMA LIST NOT MARKED READY TO RETURN saved search (id : customsearch860).
3. Then we will check the “ready to update” field in the VRMA record if this vendor return authorization record exists on the saved search.
1. We will create a token based integration in Netsuite.
2. Using this integration record we will create a restlet script. The restlet script external url is working like the API endpoint.
3. When a user sends a post request on the restlet endpoint, we will fetch the JSON data from the API request body.
4. The body must be in the following format.
{
“PO Number” : “Tracking Number”,
“PO Number” : “Tracking Number”,
“PO Number” : “Tracking Number”,
“PO Number” : “Tracking Number”,
}
5. We will process purchase orders in real time if the request json contains less than 5 purchase orders. Also, in the purchase order record, updating tracking number values in the “additional tracking number” field.
6. If it is greater than 4, we will use a map-reduce script to process this restlet request in JSON. We will send completion emails to your email address once the process of updating the “additional tracking number” field has been completed. This is not going to be a real-time procedure. (This method aids in the resolution of the restlet script execution error and restlet script execution problem.)
Assumption
1. In Netsuite, we’ll create an integration record and an integration role.
2. Following the creation of the integration record, Consumer secret, consumer key, token id, and token secret
3. Users can authenticate the API endpoint using these credentials.
4. We’ll share the postman collection for updating the “additional tracking number” field with the Restlet API call.