Shipping Rule
Shipping Rule in ERPNext allows you to define and automate shipping charges based on conditions such as order value, weight, or destination. It helps businesses apply consistent delivery charges without manually calculating them in every transaction.
These rules are commonly used in retail and e-commerce setups where shipping cost varies based on invoice value or shipment size, and can also be used to offer discounts on shipping for high-value orders.
1. Where Shipping Rule is used
Shipping Rules can be applied in both sales and purchase workflows:
- Sales Transactions: To charge customers shipping fees based on order conditions.
- Purchase Transactions: To account for inbound shipping costs from suppliers.
Shipping Rules help standardize logistics charges such as flat shipping, tiered delivery fees, or weight-based freight costs.
2. How to create a Shipping Rule
- Go to Shipping Rule list and click New.
- Enter a descriptive name such as “Standard Shipping”, “Express Delivery”, or “Next Day Delivery”.
- Select the Shipping Account where the shipping income or expense will be booked.
- Select the appropriate Cost Center for accounting allocation.
- Define the Shipping Amount or calculation logic.
- Save the rule.
Shipping Account and Cost Center are mandatory to ensure proper posting in the “Taxes and Charges” section of sales or purchase documents.
3. Calculation Methods
Shipping Rules can be calculated using different bases depending on business needs:
- Fixed Amount: A flat shipping charge applied to the transaction.
- Net Total: Shipping is calculated based on invoice value ranges.
- Net Weight: Shipping is calculated based on total weight of items.
4. Shipping Rule Conditions
When using Net Total or Net Weight, you can define tier-based shipping logic:
- Define From and To ranges.
- Assign a specific Shipping Amount for each range.
- Add multiple tiers for different pricing slabs.
Higher-value orders can be configured with lower shipping charges or free delivery to encourage larger purchases.
5. Country-Based Shipping Rules
Shipping Rules can be restricted to specific countries:
- Add allowed countries in the Shipping Rule configuration.
- If no country is set, the rule applies globally.
- If a country is specified, it applies only when the customer’s country matches.
6. How Shipping Rule is applied
- Create or update a Sales Order or Sales Invoice.
- Select items and customer details.
- The system automatically checks applicable Shipping Rules.
- Matching rule is applied to the “Taxes and Charges” table.
- Shipping cost is added to the final invoice total.
If multiple rules exist, ERPNext evaluates conditions and applies the most relevant Shipping Rule based on defined criteria.
7. Key Benefits
- Automates shipping cost calculation in transactions.
- Ensures consistent pricing across sales documents.
- Supports flexible pricing models (fixed, weight-based, value-based).
- Enables country-specific logistics pricing.
- Reduces manual effort in billing and order processing.
8. Related Topics
- Taxes and Charges
- Sales Order
- Sales Invoice
- Pricing Rule
- Shipping Address