Proposal Summary
This proposal outlines the development of a streamlined functionality within NetSuite to fetch and populate relevant information for GRW018 Vehicle custom records. The proposed solution involves integrating a button into the record creation/edit view, triggering a popup page for Growire Groups to input API parameters. These parameters will be used in an API call to retrieve data in JSON format, which will then be used to populate the GRW019 Vehicle custom record fields. The aim is to enhance Growire Group efficiency and data accuracy by seamlessly integrating external data into NetSuite, thus improving the overall Growire Group experience.
Requirement
Growire Group has a specific requirement to include a button on the custom record “GRW018 Vehicle.” When this button is clicked, it should perform the following functionality:
Retrieve all relevant information via the REST API (refer to the attached document) for the following fields:
- Chassis Number: custrecord_grw017_vehicle_chassisnmbr
- Car Manufacturer (make name): custrecord_grw017_vehicle_manufacturer
- Fuel: custrecord_grw017_vehicle_fuel
- Catalog Value: custrecord_grw017_vehicle_catalogvalue
- Model (name): custrecord_grw017_vehicle_type
- CO2NEDC: custrecord_grw017_vehicle_co2nedc
- CO2WLTP: custrecord_grw017_vehicle_co2wltp
- Fiscal HP: custrecord_grw017_vehicle_fiscalhp
- Non Deductible VAT % Private: custrecord_grw017_vehicle_nondedvatpriv
- Non Deductible VAT % Company: custrecord_grw017_nondedvatcomp
- Policy: custrecord_grw017_vehicle_policy
- Current Residual Value: custrecord_grw017_vehicle_curresval
- Future Residual Value: custrecord_grw017_vehicle_futresval
- Colour: custrecord_grw018_vehicle_colour
- Bodywork Type: custrecord_grw018_vehicle_bodywork
- Status: custrecord_grw018_vehicle_status
- Legal Status: custrecord_grw018_vehicle_legalstatus
- Administrative Status: custrecord_grw018_vehicle_adminstatus
- Gearbox: custrecord_grw018_vehicle_gearbox
This button is intended to streamline the retrieval of this information from the REST API.
Prerequisites:
- Valid API key from the external REST API provider (in this case, ‘https://api.inmotiv.be/rest/lookup/1.7/’) for accessing vehicle details.
- API key should remains active throughout the implementation and testing phases.
- Ensure that the required fields for populating the GRW018 Vehicle custom record are accurately defined and available within the external REST API.
Deliverables
To enhance the efficiency of obtaining essential information for ‘GRW-018 Vehicle’ custom records, Within the record creation and editing interface, a designated button named “Get Details” is integrated. This button triggers a tailored popup page, facilitating the input of API parameters required for retrieving specific details through the designated API.
The popup page features input fields as follows:
The VIN number
The list of blocks
The current number of kilometers for the vehicle
The version ID of the commercial version, derived from a prior request of block C
Also includes a submit button to fetchthe details by using the inout field values.
The popup page ensures the provision of necessary details such as the VIN number, block list, current kilometers, and version ID. This comprehensive input guarantees that subsequent data retrieval precisely aligns with the Growire Group’s informational needs.
In the backend process, the system seamlessly executes an API call using the provided parameters, with the API key for authentication being passed as a script parameter.
Subsequently, the retrieved details are seamlessly integrated into the ‘GRW-018 Vehicle’ custom record, populating the respective fields.
Following the API call, the obtained JSON structure is utilized to fill the relevant fields inside the custom record. If the API call fails, then no updates will be done on the field values.
This dynamic data reflection guarantees that Growire Groups continually have access to the latest and most accurate information.
To address potential delays in data retrieval, a buffering symbol is displayed on the custom record, providing a visual cue. Once all details are fetched, custom fields are auto-populated. This action repeats with every click, allowing Growire Groups to continuously update custom fields by clicking the button.
Importantly, the API request remains optional, ensuring the functionality of the custom record vehicle without it.
Example of a request by VIN
The response using an example of a request for XML.
https://api.inmotiv.be/rest/lookup/1.7//WAUZZZ4G5HN009507/BXERSTPCAVF/7705/150602 59 5 / 20 In this example, the following components are:
• WAUZZZ4G5HN009507: the VIN number
• BXEMRSTPCAVF: the list of blocks
• 7705: the current number of kilometers of this vehicle
• 15060259: the versionID of the commercial version, coming from a former request of block C
If any error occurs during the process of fetching details or the API call, a real-time error message will be displayed within the ‘GRW-018 Vehicle’ custom record.
Error Handling:
We will add a subtab named “Lookup Response” within the GRW-018 Vehicle custom record.
This subtab incorporates two crucial fields to facilitate effective error handling:
- Request Field:
- The “Request” field captures the details of the latest API request made to fetch relevant information.
- Response Field:
- Within the “Response” field, the system logs the latest response obtained after executing the data retrieval process. In cases where the last API request encounters an error, this field will display the error details. The failed API request will also be recorded in the “Request” field, ensuring a comprehensive record of unsuccessful interactions.
Assumptions:
- The external API is reliable and accessible. The solution relies on the consistent functioning of this API to fetch details.
- Correct and valid authentication credentials (API key) will be provided and maintained for secure access.
- The effectiveness of the solution depends on Growire Group’s to provide accurate details such as the VIN number, list of blocks, current kilometers, and version ID. Any inaccuracies in user input may result in erroneous data retrieval.
- The system will effectively display a buffering symbol during the data retrieval process to indicate that information is being fetched.
- The solution assumes that the API request is optional, and the ‘GRW-018 Vehicle’ custom record will still function adequately without relying on the external API.
- Each time the Growire Group clicks the “Get Details” button and submits the popup/page, the retrieval process initiates, and the custom record (‘GRW-018 Vehicle’) is updated. The popup/page interaction is designed to be dynamic and consistently triggers the retrieval and update process for the custom record. This ensures that Growire Groups can seamlessly refresh and update the information in the custom record by interacting with the popup/page whenever needed. The update of the fields in the custom record will carried out only if the API call succeeds. If the API call fails, then the old data if any will persist on the fields
- In order to utilize the LOOKUP REST API service, similar to other Autoconnect API services, an API key is required. This API key should be associated with an existing Growire Group in Autoconnect. The assumption is that this API key will be securely passed as a script parameter during the integration process. The use of the API key is fundamental for authentication and access to the LOOKUP REST API service, ensuring a secure and authorized data retrieval process.
- The data retrieved from the LOOKUP REST API will not be stored anywhere within the system. In the event of an error during the process of fetching details or the API call, a real-time error message will be displayed directly within the ‘GRW-018 Vehicle’ custom record.
Risks
- Any modifications or updates to the LOOKUP REST API, such as changes in endpoint URLs or parameters, could impact the functionality of the solution.
- The LOOKUP REST API may have rate limits imposed by the service provider. Exceeding these limits could result in throttling or temporary restrictions, affecting the ability to fetch details and update the custom record in real-time.
- The testing of API functionality using the LOOKUP REST API in Postman has not been conducted extensively due to associated costs with each API call. While the API key will be utilized during development for testing purposes, any complications encountered in this limited testing phase may influence the final output, potentially leading to delayed outcomes. This constraint could also impact the estimated time frame for the overall project.