Proposal summary
This proposal covers the scope for populating the body level and line level location values in the Netsuite sales order record creation.
Requirement
The automation is used to populate the location value in a sales order. We need to find the corresponding location based on the shipping address zip code from the sales order. When a new Netsuite sales order is created by a user.
The zip code of the shipping address will be determined and used to populate the body level and line level location. This location population script only needs to be used in sales orders with the order type “Home Delivery.” And the new script/workflow only needs to function during the sales order’s creation time.
Users must be granted permission to update the zip code mapping (for adding new mapping and updating existing mapping and deleting)
Our Solution
We need to create one user event script and one custom record to achieve this functionality. The custom record is useful for storing mapping for zip code and location information. The user event script assists in populating the body and line-level location values.
Custom record (Zipcode location mapping)
- This record will assist in the storage of the location and zip code mapping.
- There will be two fields in this mapping record.
Field one zipcode (Free form text).
Field two location (list field sourcing the location value).
- We will not permit the use of duplicate zip codes in multiple records.
- In the initial stage, we will import a CSV file to create a custom record entry.
User event script
- This script will retrieve the zip code for the sales order shipping address.
- We will retrieve the corresponding location value from the “Zipcode location mapping” custom record using this zip code.
We will not run the script if the shipping address does not include a zip code.If the shipping address in the sales order does not have a zip code- location linked to record notavailable will be usedWe will not populate the location if there is no corresponding location for the zip code. if there is no corresponding location for the zip code- location linked to record notavailable will be used- If any location mapping is discovered. The corresponding location will then be filled in at the body and line levels.
- The “Zipcode location mapping” will be validated using the same script(avoiding multiple warehouses for the same zip code)
- We will not allow duplicate records with the same zip code value to be created.
- The script will only perform the sales order with order type “Home delivery”
Assumption
- We assume that all location values in the mapping support for item sublist and body location(based on the subsidiary used in item and entity record)
- When creating/updating the “Zipcode location mapping” record via CSV, users must use the following template.
- ExternalId, Shipping Zip Code, and Warehouse must all be included in the heading.
- The externalId value must be the corresponding zip code.
- On the CSV import scenario, check the box labeled “Run server suite script and trigger workflow.”
- We performed the initial data mapping. You must supply a location and zip code mapping file.