Components in Orders
How package and bundle components are handled in orders, including line item structure and pricing.
When packages or bundles are added to orders, they can be represented as individual component lines or as a single package line. This page explains how components work in orders.
Order Line Structure
When a package is added to an order with breakdown enabled, it creates multiple order lines:
OrderLine Properties for Packages
| Property | Type | Description |
|---|---|---|
IsPackageProduct | bool | Line is a package/bundle product |
IsPackageBrokeDown | bool | Package was broken into components |
IsBundle | bool | Line is a bundle |
PackageName | string | Display name of the parent package |
PackageSkuId | string | SKU of the parent package |
PackageLineItemId | string | Links component to parent package line |
ComponentId | string | Matches component in package definition |
Components | List<ProductComponent> | Nested component definitions |
Parent Line Properties
The package line item:
Component Line Properties
Each component line item:
Adding Packages to Orders
Automatic Breakdown
When DisablePackageAutoBreakdownOnAddProductFromOrder is false (default):
- Package is added to order
- System retrieves component definitions
- Creates separate order line for each component
- Links components to parent via
PackageLineItemId - Calculates prices for all lines
No Breakdown
When DisablePackageAutoBreakdownOnAddProductFromOrder is true:
- Package is added as single line item
Componentsproperty contains component data- No separate component lines created
- Package price applies to single line
Quantity Handling
Component quantities are multiplied by package quantity:
Example
Package ordered: quantity = 2 Components:
- Camera: qty 1 → Order line: 2
- Batteries: qty 2 → Order line: 4
- Bag: qty 1 → Order line: 2
Pricing in Orders
Package Pricing
Without price allocation:
Price Allocation
With AllocatePackagePricesToComponents enabled:
Example: Price Allocation
Package price: $300, Quantity: 1 Components: Camera (60%), Lens (30%), Bag (10%)
| Line | ExtendedPrice |
|---|---|
| Package | $0 |
| Camera | $180 |
| Lens | $90 |
| Bag | $30 |
| Total | $300 |
Component Options in Orders
When a component has options, the selected option's SKU is used:
Selection Flow
- Package added with component options
- Customer/system selects option for each component
- Selected
SkuIdis used for the component order line - Price offsets (if any) are applied
Order Line with Selected Option
Modifying Package Orders
Changing Package Quantity
When package quantity changes:
- All component line quantities are recalculated
- Component qty = new package qty × component qty
- Prices are recalculated
Removing a Package
When a package is removed:
- Package line is deleted
- All component lines with matching
PackageLineItemIdare deleted - Order totals are recalculated
Modifying Components
Modifying individual component lines after package breakdown may cause inconsistencies. Consider removing and re-adding the entire package instead.
Order Calculation
Total Calculation
Order totals consider package structure:
Tax Calculation
Taxes are calculated per line:
- Package line: Tax on package price
- Component lines: Tax on component prices (if allocated)
Discount Application
Discounts can apply to:
- Package line: Discount on entire package
- Component lines: Discount on individual components
Shipment Integration
When packages are added with shipment context:
All component lines inherit the shipment from the package.
Inventory Reservation
When packages are ordered:
With Breakdown
Each component line reserves inventory separately:
- Camera: Reserve 1
- Batteries: Reserve 2
- Bag: Reserve 1
Without Breakdown
Package line may reserve package-level inventory or trigger component reservations based on configuration.
Order Display
Invoice Display
Configure how packages appear on invoices:
| Setting | Display |
|---|---|
| Breakdown enabled | Shows each component as line item |
| Breakdown disabled | Shows package as single line |
| Price allocated | Shows component prices |
| Price not allocated | Shows package price only |
Customer-Facing Display
Consider:
- Whether to show package grouping
- Component vs package pricing display
- Quantity representation
Troubleshooting
Components Not Linked
| Symptom | Cause | Solution |
|---|---|---|
Component lines missing PackageLineItemId | Direct component add | Add via package, not directly |
ComponentId not set | Old data format | Re-add package to order |
Price Discrepancies
| Symptom | Cause | Solution |
|---|---|---|
| Double-counted prices | Allocation not enabled | Enable AllocatePackagePricesToComponents |
| Zero component prices | Allocation enabled | This is expected behavior |
Quantity Mismatch
| Symptom | Cause | Solution |
|---|---|---|
| Wrong component quantities | Package qty changed after add | Recalculate component quantities |
| Missing components | Partial breakdown | Re-add entire package |
