Overview
The Shipping Fee feature allows Business Central to automatically calculate shipping fees on Waybills when posting Warehouse Shipments. The system generates Shipping Fee Lines on the Sales Order that will be invoiced together with the rest of the order.
Key Capabilities:
Calculate fees by Flat Rate or Per Package
Set minimum amount for free shipping on the Customer
Automatically or manually assign fees to sales orders
Important: This feature only works if you are using Warehouse Shipments.
Setup
1. Sales & Receivables Setup
Navigation: Search for "Sales & Receivables Setup"
Required Configuration:
Field | Required Value | Description |
|---|---|---|
Auto Post Non-Invt. via Whse. | All | This setting is mandatory for the Shipping Fee feature to work. The system will show an error if this is not set to "All". |
Screenshot Reference: [Insert screenshot showing the field set to "All"]
2. Shipping Manager Setup
Navigation: Search for "Shipping Manager Setup"
Optional Configuration:
Field | Description | Recommendation |
|---|---|---|
Auto Calc And Assign Ship. Fee | When enabled, shipping fees are automatically calculated when the waybill is sent to the broker, and fee lines are automatically assigned to the sales order. | Enable for automatic processing; leave disabled if you want manual control over fee calculation and assignment. |
Access Shipping Fee Price List:
Click on the "Shipping Fee" field to open and manage the Shipping Fee Prices page
3. Shipping Fee Prices (Per Package Method)
Navigation: Search for "Shipping Fee Prices"
Use this setup when calculating fees per package type. The system will search for matching price records based on the waybill details.
Fields:
Field | Description |
|---|---|
Country Code | Specifies the Ship-To Country Code (from the sales order). Leave blank for a default that applies to all countries. |
Currency Code | Specifies the Currency Code for the Unit Price. Leave blank to apply to all currencies. |
Package Type | Specifies the Package Type for the Price. This must match the package types used on your waybills. |
Shipping Agent | Defines the Shipping Agent delivering the package. Must match the shipping agent on the sales order. |
Shipping Agent Service | Specifies the Shipping Agent Service Code. Must match the service on the sales order. |
Shipping Fee Item | The Item No. used when creating the Shipping Fee line on the Sales Order. This item will appear on the sales invoice. |
Use Price from Item | If set to Yes, the system uses the Sales Price from the Item master instead of the Unit Price field below. |
Unit Price | The Unit Price for shipping. Used only if "Use Price from Item" is set to No. |
Matching Logic:
When calculating fees "Per Package", the system searches for matching Shipping Fee Price records in this order:
First: Exact match on Country Code, Currency Code, Package Type, Shipping Agent, and Shipping Agent Service
Second (Fallback): Same criteria but with blank Package Type (acts as a default for any package type)
Important: If no matching price record is found, the system will generate an error. Make sure you have appropriate price records set up for your combinations.
Example Setup:
Country | Currency | Package Type | Shipping Agent | Agent Service | Fee Item | Unit Price |
|---|---|---|---|---|---|---|
DK | DKK | PALLET | DHL | STANDARD | SHIP-FEE | 250.00 |
DK | DKK | PARCEL | DHL | STANDARD | SHIP-FEE | 95.00 |
DHL | STANDARD | SHIP-FEE | 75.00 |
Note: The last row with blank Country, Currency, and Package Type acts as a fallback default.
Customer Setup
Shipping Fee Configuration per Customer
Navigation: Open Customer Card → Scroll to "Shipment Method" section
Fields:
Shipping Fee Calculation Method
Option | Description |
|---|---|
None | No shipping fees will be calculated for this customer. |
Flat Rate | A fixed shipping fee will be applied regardless of package count. Requires both "Shipping Fee Item" and "Shipping Fee" fields to be filled. |
Per Package | Shipping fees are calculated based on the number and type of packages. Requires Shipping Fee Price setup (see above). |
Default: None
Shipping Fee Item (Flat Rate Only)
Used when: Calculation Method = "Flat Rate"
Description: The Item No. that will be added to the Sales Order as the shipping fee line
Required: Yes (when using Flat Rate)
Error if blank: System will show error: "In order to use Flat Rate, both Shipping Fee Item and Shipping Fee must be specified"
Shipping Fee (Flat Rate Only)
Used when: Calculation Method = "Flat Rate"
Description: The fixed price amount (in the customer's currency) for shipping
Required: Yes (when using Flat Rate)
Currency: Displayed in the customer's currency code
Error if blank: System will show error: "In order to use Flat Rate, both Shipping Fee Item and Shipping Fee must be specified"
Example: If customer currency is EUR and you enter 50.00, a 50 EUR shipping fee line will be added to all warehouse shipments.
Free Shipping Min. Amt LCY
Description: Minimum order amount (in Local Currency - LCY) required for free shipping
Behavior:
If the shipment amount (LCY) is greater than or equal to this value, NO shipping fee is calculated
This check applies to BOTH "Flat Rate" and "Per Package" methods
Required: Yes - This field MUST be greater than 0 for the shipping fee feature to work
Error if zero: System will show error: "Free Shipping Min. Amt LCY is zero for Customer: [Customer No.]"
Important Notes:
Always calculated in LCY (Local Currency), even if the customer uses a foreign currency
System converts the sales order amount to LCY before comparing
Set this to a very high value (e.g., 999999.99) if you want to ensure fees are always calculated
Example:
Customer has Free Shipping Min. Amt LCY = 1000
Order amount = 1200 (LCY) → No shipping fee calculated
Order amount = 800 (LCY) → Shipping fee IS calculated
Configuration Examples
Example 1: Flat Rate Customer (Always Charges Shipping)
Shipping Fee Calculation Method: Flat Rate
Shipping Fee Item: SHIP-FEE-STD
Shipping Fee: 75.00 (in customer currency)
Free Shipping Min. Amt LCY: 999999.00 (effectively disabled)Example 2: Per Package Customer (Free Shipping over 5000)
Shipping Fee Calculation Method: Per Package
Shipping Fee Item: (leave blank - comes from price setup)
Shipping Fee: (leave blank - comes from price setup)
Free Shipping Min. Amt LCY: 5000.00Example 3: No Shipping Fees
Shipping Fee Calculation Method: None
Shipping Fee Item: (leave blank)
Shipping Fee: (leave blank)
Free Shipping Min. Amt LCY: (leave blank or any value)Daily Use
Sales Order
When a new sales order is created, the Shipping Fee information from the Customer Card is automatically transferred to the sales order.
Customer-Level Settings Copied to Order:
Shipping Fee Calculation Method
Shipping Fee Item (if Flat Rate)
Shipping Fee amount (if Flat Rate)
Free Shipping Min. Amt LCY
Flexibility: You can modify the shipping fee settings individually on each sales order if needed, even if they differ from the customer's default settings.
Important: Changes made to the customer card after the sales order is created do NOT update existing orders.
Warehouse Shipment
Navigation: Open Warehouse Shipment
Adding Waybill Lines
Add Waybill Lines automatically as normal
Ensure packages are assigned with correct Package Types
Critical Requirements for "Per Package" Method:
Before shipping fees can be calculated, verify you have set up:
✅ Package Type (on waybill lines)
✅ Shipping Agent (on warehouse shipment/sales order)
✅ Shipping Agent Service Code (on warehouse shipment/sales order)
✅ Currency Code (on sales order)
✅ Country Code (on ship-to address)
All of these must match an existing Shipping Fee Price record.
Shipping Fee Calculation Process
There are two ways shipping fees can be calculated:
Option 1: Automatic (Recommended)
Prerequisites:
"Auto Calc And Assign Ship. Fee" is enabled in Shipping Manager Setup
Waybill is linked to the warehouse shipment
Process:
Create and release the warehouse shipment
Add waybill lines with packages
Post the warehouse shipment
System automatically:
Calculates shipping fees based on packages
Creates Shipping Fee Lines on the waybill
Assigns them to the related Sales Order
Posts the fees along with the shipment
User Action: None required - fully automatic
Option 2: Manual
Prerequisites:
"Auto Calc And Assign Ship. Fee" is disabled (or you want manual control)
Process:
Open the Warehouse Shipment
Navigate to Waybill Shipping Fee Lines
Location: Waybill → Lines → Shipping Fee subfolder
Calculate Shipping Fee
Click the "Calculate Shipping Fee" button
System analyzes packages and creates fee lines
Fee lines are calculated but NOT yet assigned to the sales order
Review the Fee Lines
Check Package Type, Quantity, Unit Price
Verify the fees are correct
Modify if needed (before assignment)
Assign Shipping Fee
Click the "Assign Shipping Fee" button
System creates sales lines on the related sales order
These lines will be posted and invoiced with the shipment
Post the Warehouse Shipment
Shipping fees are now included in the shipment posting
Workflow Summary:
Calculate → Review → Assign → Post → InvoiceShipping Fee Lines (Waybill Subform)
Fields on Shipping Fee Lines:
Field | Description | Editable |
|---|---|---|
Shipping Fee Item | Item number used for the fee line | Yes |
Description | Description from the item | Yes |
Quantity | Number of units (typically = number of packages) | Yes |
Unit Price | Price per unit (from setup or customer) | Yes |
Line Amount | Quantity × Unit Price | Calculated |
Order No. | Sales Order number (populated after assignment) | No |
Order Line No. | Sales Order Line number (populated after assignment) | No |
Assigned to Sales Order | Checkmark indicating if assigned | No |
Package Type | Package type from price setup | No |
Manual Actions Available:
Action | Description |
|---|---|
Calculate Shipping Fee | Recalculates all fee lines based on current waybill packages. Deletes existing unassigned fees. |
Assign Shipping Fee | Assigns all unassigned fee lines to the related sales order. Creates sales lines. |
Troubleshooting
Common Errors and Solutions
Error Message | Cause | Solution |
|---|---|---|
"Free Shipping Min. Amt LCY is zero for Customer: [No.]" | The Free Shipping minimum amount field is blank or zero | Go to Customer Card → Set "Free Shipping Min. Amt LCY" to a value > 0 (e.g., 999999.00 if you want fees always calculated) |
"In order to use Flat Rate, both Shipping Fee Item and Shipping Fee must be specified" | One or both required fields for Flat Rate are blank | Go to Customer Card → Fill both "Shipping Fee Item" AND "Shipping Fee" fields |
"No related Shipping Fee Price has been found" | No matching price setup for the package type, agent, service, currency, and country combination | Go to Shipping Fee Prices → Create a record matching your Warehouse Shipment details OR create a "default" record with blank Country/Currency/Package Type |
"Auto Post Non-Invt. via Whse. must be set to All" | Sales & Receivables Setup is not configured correctly | Go to Sales & Receivables Setup → Set "Auto Post Non-Invt. via Whse." to "All" |
"Shipment Amount exceeds Free Shipping Min. Amt" | The order value is too high for shipping fees | This is expected behavior - no fee will be calculated. Lower the Free Shipping minimum or increase the order value threshold. |
"One or more Waybill Shipping Fee lines have already been assigned" | Trying to recalculate fees that are already assigned to the sales order | Delete the existing shipping fee lines from the Sales Order first, or create new unassigned lines |
Diagnostic Checklist
If shipping fees are not calculating:
Is "Auto Post Non-Invt. via Whse." set to "All" in Sales & Receivables Setup?
Is "Free Shipping Min. Amt LCY" > 0 on the Customer?
Is the shipment amount LESS than the "Free Shipping Min. Amt LCY"?
Is Shipping Fee Calculation Method set to "Flat Rate" or "Per Package" (not "None")?
For Flat Rate:
Is "Shipping Fee Item" filled in?
Is "Shipping Fee" amount > 0?
For Per Package:
Do you have Shipping Fee Price records set up?
Do the price records match your:
Country Code
Currency Code
Package Type
Shipping Agent
Shipping Agent Service
Have you assigned packages to the waybill lines?
Do the packages have a Package Type specified?
Best Practices
Setup Best Practices
Always set Free Shipping Min. Amt LCY
Never leave it at 0
Use 999999.00 if you want to always charge shipping
Create Default Price Records
For "Per Package" method, create records with blank Country/Currency/Package Type as fallbacks
This prevents errors when exact matches aren't found
Use Consistent Item Numbers
Use the same "Shipping Fee Item" across all setups for easier reporting
Example: "SHIP-FEE" for all shipping fees
Test Before Go-Live
Create test orders for each customer type (Flat Rate, Per Package, Free Shipping)
Verify fees calculate correctly and post to the general ledger
Operational Best Practices
Manual Process Users:
Always click "Calculate" before "Assign"
Review fee lines for accuracy before assignment
Once assigned, fees cannot be automatically recalculated
Automatic Process Users:
Verify package types are correctly assigned before posting
Check the sales order after posting to confirm fee lines were added
Multi-Currency Customers:
Ensure Shipping Fee Price records exist for each currency you use
Or create a blank currency record as a default
Monitoring:
Regularly review Shipping Fee Price records for accuracy
Update prices when shipping carriers change rates
Check that the correct "Shipping Fee Item" is used across all records
Process Flow Diagrams
Automatic Calculation Flow
[Create Sales Order]
↓ (Shipping Fee info copied from Customer)
[Create Warehouse Shipment]
↓
[Add Waybill Lines with Packages]
↓
[Post Warehouse Shipment]
↓
[System Checks: Free Shipping Minimum]
↓
[IF Order < Minimum]
↓
[System Calculates Fees (Flat Rate or Per Package)]
↓
[System Creates Shipping Fee Lines]
↓
[System Assigns Fees to Sales Order]
↓
[System Posts Sales Order with Fees]
↓
[Invoice Includes Shipping Fees]Manual Calculation Flow
[Create Sales Order]
↓
[Create Warehouse Shipment]
↓
[Add Waybill Lines with Packages]
↓
[Click "Calculate Shipping Fee"]
↓
[Review Shipping Fee Lines]
↓
[Adjust if Needed]
↓
[Click "Assign Shipping Fee"]
↓
[Post Warehouse Shipment]
↓
[Invoice Includes Shipping Fees]FAQ
Q: Can I use this feature without Warehouse Management?
A: No. The Shipping Fee feature only works with Warehouse Shipments. Direct posting from Sales Orders is not supported.
Q: Can I manually change the shipping fee after it's calculated?
A: Yes, before assignment. Once you click "Calculate Shipping Fee", you can modify the Quantity, Unit Price, or Item before clicking "Assign Shipping Fee". After assignment, you must edit the sales order line directly.
Q: What happens if I change the Customer's settings after creating a sales order?
A: Changes to the customer card do NOT affect existing sales orders. The shipping fee settings are copied to the order at creation time and remain independent.
Q: Can I override the free shipping minimum on a specific order?
A: Yes. The Free Shipping Min. Amt LCY is copied to the Sales Order, and you can edit it directly on the order before creating the warehouse shipment.
Q: Do shipping fees apply to credit memos or returns?
A: No. The feature is designed for outbound shipments only (Sales Orders via Warehouse Shipments).
Q: Can I have different fees for the same package type depending on country?
A: Yes. Set up multiple Shipping Fee Price records with different Country Codes and the same Package Type. The system will match based on the Ship-To Country.
Q: What if my customer has multiple currencies?
A: You need to set up Shipping Fee Price records for each currency, OR leave the Currency Code blank on the price record to apply it to all currencies.
Q: Can I calculate fees based on weight instead of package count?
A: No. The current feature calculates fees based on package quantity. Each package (of a specific type) generates one fee line.
Technical Notes
Tables Involved
Customer: Stores default shipping fee settings
Sales Header: Inherits shipping fee settings from customer
Warehouse Shipment Header: Links to waybill
SCB Waybill Header: Contains waybill information
SCB Waybill Line: Contains package information
SCB Waybill Shipping Fee Line: Stores calculated fees before assignment
SCB Shipping Fee Price: Master data for per-package pricing
SCB Shipping Manager Setup: Global settings
Key Functions
CalcShippingFee(): Main calculation functionAssignAllWayBillShippingFeeLinesToSalesOrder(): Assigns fees to sales orderValidSalesSetup(): Validates Sales & Receivables Setup
Integration Points
Sales Order posting
Warehouse Shipment posting
Waybill creation and transmission
Version History
Version | Date | Changes |
|---|---|---|
1.0 | [19-01-2026] | Initial guide based on code analysis |
Support
For additional support or questions about this feature, please contact your Business Central administrator or implementation partner.
Related Documentation:
Warehouse Management Setup
Sales Order Processing
Waybill Management