Proposal summary
This proposal is to implement a custom solution to calculate Shipping Cost based on multiple parameters.
Requirement
Key requirement is that this functionality must work in both SCA and NetSuite UI.
- As before shipping rules should exist dependent on destination country (allowing multiple countries via country code)
- As before shipping rules should exist dependent on customer type (individual/company)
- Ability to have multiple shipping options available during checkout (standard delivery, expedited delivery etc.) is required, being priced differently.
- Ability to select the quantity of bikes per order before delivery charges qualify as FOC.
This functionality should also be dependent on the destination country along with customer type (individual/business).
Example:
- 3+ bikes to UK destination FOC delivery
- 5+ bikes to German destination FOC delivery
- 100+ bikes to USA FOC – or alternatively make a rule that if quantity allowed is equal to 0 basically the destination is never eligible for FOC delivery.
- Unlike the original development items that are classed as “Accessories“ or “Spare Parts“ also need to be included with shipping rules once again differing depending on customer type, and destination but should also be determined by the item weight (ideally using a Min Weight to Max Weight range – see example below)
- However if a bike is included in the purchase the “Accessories“ or “Spare Parts“ would go FOC either when the order includes delivery charges for the bike or has reached a quantity level that rules the delivery to be FOC.
- If the sales order is flagged as a “click and collect“ order (this will only be for consumers – custbody_nbs361_clickandcollect) then the bike shipping charge should not look at the Consumer Bike Charge value but the Click & Collect Charge value which can/may differ. Usual rules apply with accessories and spares going free when a bike is ordered. No change in delivery costs for click and collect orders that only include “Accessories“ or “Spare Parts“
Below is an example custom record that pulls together the requirements, this may need splitting into more than one table to better serve the functionality and also reduce duplication in the fields.
Our Solution
We will be creating additional Shipping Items – FB Standard and FB Expedited (which can be extended in the future).
The custom shipping cost calculator works only when the Sales Order shipping method is defined in the custom record. This custom solution is devised to work only on Sales Order.
Custom record is created to store the Shipping Rules.
Shipping cost is treated differently for both Individual Customer (Consumer) and Company Customer (Trade). Shipping Cost also depends on Shipping Methods defined in the custom record. (Ex: Shipping Method – FB Standard and FB Expedited).
There are fields on custom record to set the Country, Currency (as single select Field) and Country Code (as multi select field). The Country and Currency will be standard NetSuite List and Country Code will be a custom List.
From the custom record, we will cross match the currency with Sales Order currency and Country Code with Shipping (destination) Address Country Code.
- If the Sales Order contains at least one bike, shipping cost for the accessories will be discarded (when the order includes delivery charges for the bike or has reached a quantity level that rules the delivery to be FOC)
- There is a Free Of Charge (FOC) quantity validation applicable on the Sales Order for both Trade as well as Consumer. If the total sales order quantity for the bikes becomes equal or greater than FOC quantity, shipping cost will be discarded.
- There is an additional option called ‘Click and Collect Charge’ which is applicable only to consumers. There will be a custom checkbox field ‘CLICK AND COLLECT’ (Field Id:custbody_nbs361_clickandcollect) in sales order to indicate whether the current Sales Order shipping cost should be applicable for ‘Click and Collect Charge’. If the checkbox is checked, we will overwrite the shipping cost with the ‘Click and Collect Charge’ from the custom record only if the customer type is Consumer. If not, this follows the usual Charge.
If the sales order contains FOC quantity, then the click and collect charge won’t be applied even if the click and collect checkbox is checked on the sales order. - Additionally, there is cost for different weight ranges for both Consumer and Trade.
Weight cost is not charged when the order qualifies for FOC. Weight Cost is calculated for the entire order (which means all the items such as Bike, Accessories, Spare Parts etc are considered).
- If the Sales Order does not contain at least one bike, shipping cost for the accessories will be calculated. The shipping cost is calculated only for the Weight Cost. The click and collect charge won’t be applied on this case.
This custom records details and calculations specifics will be shared with the SCA Team and they need to reimplement the Shipping Cost calculation on their end.
Regardless, the shipping cost calculation will always be triggered on Saving the Sales Order (and only on Saving Sales Order when created from NetSuite UI)
The CATEGORY (Field Id: custitem_nbs361_category) in Item Record determines if the Item should be treated as a Bike or something else.
Weight Conversion Logic :
Since the Transaction Unit defined in Sales Order as well as Sales Unit and Stock Unit defined in the Item Record will be ‘Each’, we won’t be doing any UOM Conversion. If the weight unit defined in Item Record is other than Kilogram (KG), we will convert the weight into Kilogram (for consistency between all Sales Order Item lines) assuming that the weight will be for per Each
Assumptions
- Weight in Item Record should be specified on the field ‘ITEM WEIGHT’ (field Id: weight) in Inventory Items, Kit/Package Items and Assembly/Bill of Materials Item
- Weight defined on the Custom record should be in Kilogram (kg). If not, we will convert them to Kg during weight calculation
- All units should be in “Each” (Sales Unit and Stock Unit in Item Record as well as Transaction Unit in Sales Orders).
- UOM is definitely not required, and any items that aren’t currently set to “each” are either obsolete or will be moved to each before we commence this project
- If the category (custitem_nbs361_category) is Bike (ID : 1), then only the Shipping Charge, Click and Collect Charge and Weight Cost are considered. If not, only weight charge is considered.
- If the sales order contains Free Of Charge (FOC) quantity, then the click and collect charge won’t be applied even if the click and collect checkbox is checked on the sales order.
- Weight cost is not charged when the order qualifies for FOC. Weight Cost is calculated for the entire order (which means all the items such as Bike, Accessories, Spare Parts etc are considered).
- Country Code should be compatible with NetSuite Country Code
- Only Inventory Items, Kit/Package Items and Assembly/Bill of Materials Items are considered in Sales Order.
Time
Estimated effort: 30 hrs