Shipping charge calculation
A shipping user exit is invoked during the getOrderPrice API call to get the shipping charge. Shipping charge calculation logic is externalized. The shipping user exit is invoked if implemented, even if the shipping charge is passed in the input. If the shipping user exit is not implemented, it uses the shipping charge provided by the caller of the API.
The following types of shipping rules govern shipping charge discounts and surcharges:
- Shipping Charge Order Total: These rules provide discounts on shipping charges based upon order total. Discounts can be a fixed amount, a percentage, or a flat fee shipping charge. You can attach the Shipping Charge Order Total rule to customer segments, and specify the shipping types, products, or product categories.
- Item
Shipping Surcharge: These rules operate at the line item level to
associate a shipping surcharge with items that have a specified feature.
Surcharges apply only to the items that are shippable and have not
been flagged for in-store pickup.
For example, let us suppose that you want to charge an additional flat fee for shipping oversized items such as refrigerators. You can create a feature type called Oversized, and then create an Oversized: refrigerators feature and associate it with all the refrigerators. When you create the item shipping surcharge rule, you attach the surcharge by selecting the Oversized: refrigerators feature.
When the rule applies to a product in the order, the system multiplies the surcharge by the quantity of the product being purchased and adds the resulting amount to the shipping charge.