Proposal summary
This proposal describes the updates in the Shipping script in Netsuite.
Requirement
Flowco Ltd t/a Waterworks team needs the following updates in Shipping Scripts [LIT] CS Shipping Charges and [LIT] UE Shipping Charges.
Currently, these scripts calculate the shipping charges as follows:
- All orders with any items with a ‘Class’ of Pipe or Tube less than $350.00 subtotal (exc. GST) have a set Truck Delivery charge of $45.00
- For clarity then, all orders with any items with a ‘Class’ of Pipe or Tube more than $349.99 subtotal (exc. GST) have no shipping charges added
- All orders with any items with a ‘Class’ of Fittings less than $200 subtotal (exc. GST) have a set Courier delivery charge of $12.50
- For clarity then, all orders with any items with a ‘Class of Fittings more than $199.99 subtotal (exc. GST) have no shipping charges added
- All collected orders, irrespective of item ‘Class’ have no shipping charges added
- These scripts are partially based on the custom field ‘Ship Via’ (Field ID: custbody_ship_via). As this is a custom field this data does not connect with the WMS, however the native NetSuite ‘Shipping Method’ field (Field ID: shipmethod) does connect with the WMS.
- When a sales order is saved the shipping charges are calculated and added to the sales order. Once the Sales Order is saved (after initial record save but sill ‘Pending Fulfilment’ status) the shipping script is disabled. Checkbox ‘Disabled Shipping Script’ is ticked. Any subsequent changes to the Sales Order that impact the subtotal value, such that it is more than #349.99 or $199.99, the shipping charges have to be manually amended.
- The shipping charges are added after the last line of the sales order, however, if the sales order is edited, the new items remain below the shipping charges.
- Additional Shipping charges for Rural Delivery and Saturday Delivery. Saturday Delivery Based on Checkbox being ticked, and Rural Delivery Checkbox ticked in Address. These charges apply regardless of the order subtotal amount.
New updates:
- The script needs editing to amend using the data from the ‘Ship Via’ field to using the data from the ‘Shipping Method’ field.
- When the ‘Shipping Method’ field is edited after the sales order record is initially saved that impacts the record subtotal value, but before any fulfillment has occurred, that the shipping charges be recalculated automatically on re-save of record.
- When a sales order is edited, regardless of order status, the shipping charges need to relocate to the last line of the order.
- This script needs to work on NetSuite direct entry orders and also orders created via the WMS/scanners and Website.
Our Solution
Description of the task
The requirement can be achieved by updating Shipping Scripts [LIT] CS Shipping Charges and [LIT] UE Shipping Charges scripts.
- We will replace the Ship via field with the Shipping method field in the [LIT] UE Shipping Charges script and [LIT] CS Shipping Charges script.
- Update the [LIT] UE Shipping Charges script to relocate all shipping charges to the last line of sales orders after saving the sales order. We will remove the existing shipping charge items which are not fulfilled and add this to the last line of the sales order.
- We will deploy one user event script in the item fulfillment record, it will set true in the ’Disable Shipping Script’ checkbox in related sales order if the item fulfillment is created or updated with the shipped status. Also will set FALSE in the ’Disable Shipping Script’ checkbox in related sales order if all applied item fulfillments are deleted for that sales order.
- And the script [LIT] UE Shipping Charges will remove the existing shipping charge items and add new shipping charge items using the same calculation method only if the status of the sales order is not Pending Billing/Partially Fulfilled and Disabled Shipping Script checkbox is false. And this script will not set or uncheck value in the “DISABLE SHIPPING SCRIPT” checkbox. Users can enable this checkbox through UI if they want. So in that case the shipping charge recalculation will not happen since the user enabled then “DISABLE SHIPPING SCRIPT” checkbox through UI.
- In the case of the supply proposal, the scripts will not set true in the DISABLE SHIPPING SCRIPT checkbox in any case. Users can enable this checkbox through UI if they want. The Script [LIT] UE Shipping Charges will remove the shipping charge and add new shipping charge items by recalculation when editing the supply proposal if the DISABLE SHIPPING SCRIPT checkbox is false and status is ‘Open’ or ‘Expired’.
- In the case of an invoice, we will replace the Ship via field with the Shipping method field and all script will work as it is now.
- When the orders come from the scanner or website, the existing shipping charge will be removed and new shipping charges will add by recalculation if the sales order status is not Pending Billing/Partially Fulfilled and Disabled Shipping Script checkbox is false.
Risk
- If the user enables the ’Disable Shipping Script’ checkbox through UI, the script will not recalculate the shipping charge.
- The current scripts consider only “Courier Freight(id: 3338)”, “Courier Rural Delivery ( id:3339)”,” Courier Saturday Delivery (id:3340)”,” Truck Delivery (id:6849)”,” Truck Rural Delivery (id:6850)” as shipping charge items. So we will consider only these items for relocating to the last line of sales order.
- The script will not relocate fulfilled/billed shipping charge items to the last line of the sales orders. Because we cannot remove fulfilled shipping charge items from sales orders without removing this shipping charge item from related item fulfillment.
- Due to the relocation of shipping items using the script, the Sales Order save performance may reduce.