Split Shipment Cost
Distribute shipping cost evenly across multiple shipments.
Overview
The Split Shipment Cost step distributes the total shipping cost evenly across all active shipments. This ensures fair cost allocation when orders are split into multiple shipments.
Identifier
| Property | Value |
|---|---|
| Key | SplitShipmentCost |
| Group | Shipments |
| Applicable Statuses | New |
Configuration Properties
This step has no configurable properties.
Behavior
What It Does
- Calculates total shipping cost from all shipments (excluding delivered/cancelled)
- Counts active shipments with order lines (not delivered/cancelled)
- Divides total cost evenly:
newCost = totalCost / numberOfShipments - Rounds down to 2 decimal places
- Adds any remainder to the last shipment
- Recalculates order totals and prices
Prerequisites
- Order must have multiple shipments
- Shipments must have line items
Side Effects
- Shipment
ShippingSubTotalvalues updated - Order totals recalculated
- Remainder cents added to last shipment
Business Cases
When to Use
- Split orders: After splitting order into multiple shipments
- Fair allocation: Distribute shipping costs proportionally
- Multi-warehouse: When fulfilling from multiple locations
Example Scenarios
Scenario 1: Equal Split Order has $30 shipping and splits into 3 shipments. Each shipment gets $10 shipping.
Scenario 2: Remainder Handling $10 shipping split into 3 shipments: $3.33, $3.33, $3.34 (remainder on last).
Scenario 3: Some Delivered Order has 3 shipments, 1 already delivered. Step only splits cost among the 2 active shipments.
Scenario 4: Empty Shipments Shipment has no line items (will be deleted). Step excludes it from cost split.
Error Handling
| Condition | Result | Continues Workflow? |
|---|---|---|
| No shipments | Success (no action) | Yes |
| No active shipments | Success (no action) | Yes |
| Split successful | Success | Yes |
| Exception | Error | Depends on StopOnError |
Related Steps
- Try Split Order to Warehouse - Splits order first
- Try Split Shipment by Category - Category-based split
