Component Inventory
How Omnium handles inventory for packages, bundles, and kits - including calculated inventory and kit assembly.
Omnium handles inventory differently for each composite product type. Packages and bundles use calculated inventory based on component availability, while kits have their own direct inventory created through assembly. This page explains both approaches.
Package & Bundle Calculated Inventory
Package and bundle inventory represents the maximum number of complete units that can be assembled from available component inventory. This inventory is calculated automatically and updates when component inventory changes.
Calculation Formula
Example
Package "Starter Kit" contains:
- 1× Camera (20 available)
- 2× Batteries (50 available)
- 1× Bag (15 available)
Calculation:
- Camera: 20 ÷ 1 = 20 packages possible
- Batteries: 50 ÷ 2 = 25 packages possible
- Bag: 15 ÷ 1 = 15 packages possible
Package inventory = 15 (limited by bag availability)
Inventory Properties
Package inventory is stored in the CalculatedInventory property:
| Property | Description |
|---|---|
InventoryItem.Inventory | Raw inventory count (not used for packages) |
InventoryItem.CalculatedInventory | Calculated package availability |
InventoryItem.Reserved | Reserved quantity |
Available Inventory Formula
For packages, CalculatedInventory contains the calculated package availability.
When Calculation Occurs
Package inventory is recalculated automatically in two scenarios:
On Product Save
When a package product is saved, Omnium recalculates its inventory based on current component availability.
On Component Inventory Update
When any component's inventory changes, Omnium identifies all packages that include that component and recalculates their availability.
Triggering Conditions
Recalculation is triggered when:
HasPackagestenant setting is enabled- Product has
IsPackage: trueorIsBundle: true - Variant has
IsPackage: trueorIsBundle: true
Nested Packages
Packages can contain other packages as components (nested packages).
Recursion Depth
The system supports up to 3 levels of nesting to prevent infinite loops:
Nested Calculation Example
Excluded Products
Certain products are excluded from inventory calculations:
Virtual Products
Products marked as virtual don't count toward inventory:
Virtual components are skipped in package inventory calculation.
Products Without Inventory
Components without inventory items are excluded from the calculation, allowing the package inventory to be determined by other components.
Warehouse-Specific Inventory
Package inventory can be calculated per warehouse when using warehouse-specific inventory.
Configuration
When inventory is warehouse-specific:
- Each warehouse has separate component availability
- Package inventory is calculated per warehouse
- Total package inventory = sum across warehouses
Example
| Warehouse | Camera | Battery (qty: 2) | Bag | Package Available |
|---|---|---|---|---|
| Oslo | 10 | 30 | 8 | 8 |
| Bergen | 5 | 20 | 12 | 5 |
| Total | 15 | 50 | 20 | 13 |
Component Options Impact
When components have options, inventory considers all selectable variants.
Behavior
- Component with specific
SkuId: Uses that SKU's inventory - Component with
Options: Uses the selected option's inventory - Component with only
ProductId: Considers aggregate variant inventory
Example with Options
Inventory depends on which option is selected or preselected via SkuId.
Performance Considerations
Large Component Lists
For packages with many components:
- Each component requires an inventory lookup
- Consider caching for frequently accessed packages
- Monitor recalculation time for complex packages
High Update Frequency
When component inventory updates frequently:
- Package recalculation is triggered each time
- Background processing queues prevent blocking
- Consider batching inventory updates
Package inventory recalculation happens asynchronously via background processing to minimize impact on API response times.
Troubleshooting
Package Shows Zero Inventory
| Cause | Solution |
|---|---|
| Component has zero inventory | Restock the limiting component |
| Component not found | Verify component ProductId/SkuId exists |
| Virtual component blocking | Check IsVirtual flag on components |
| HasPackages disabled | Enable in tenant settings |
Inventory Not Updating
| Cause | Solution |
|---|---|
| Recalculation not triggered | Save the package product to trigger |
| Background job delayed | Check background task queue |
| Nested package > level 3 | Simplify package structure |
Incorrect Calculation
| Cause | Solution |
|---|---|
| Wrong component quantity | Verify quantity values |
| Stale cache | Clear inventory cache |
| Warehouse mismatch | Check warehouse configuration |
Kit Inventory
Unlike packages and bundles, kits have their own direct inventory. Kit inventory is not calculated from components - it is created when kits are physically assembled.
How Kit Inventory Works
Kits use standard product inventory, not calculated inventory:
| Property | Package/Bundle | Kit |
|---|---|---|
Inventory | 0 (not used) | Actual kit count |
CalculatedInventory | Calculated from components | 0 (not used) |
Reserved | Package reservations | Kit reservations |
Creating Kit Inventory
Kit inventory is created through the "Create Kit" operation:
- Select a kit product and warehouse
- Specify quantity to assemble
- System validates component availability
- Component inventory is reduced (FIFO)
- Kit inventory is increased
- Kit cost is calculated from component costs
Kit Cost Tracking
When kits are assembled, the cost is calculated and stored:
- FIFO method: Component costs come from oldest inventory batches
- Currency handling: Mixed currencies are converted to kit currency
- Batch creation: Kit inventory includes cost for profit/valuation reporting
Kit vs Package Inventory Comparison
| Scenario | Package | Kit |
|---|---|---|
| Component inventory decreases | Package availability decreases (recalculated) | No change to kit inventory |
| Restocking components | Package availability increases (recalculated) | Must assemble new kits to increase kit inventory |
| Selling the composite product | Component inventory reserved/reduced | Kit inventory reduced |
| Inventory valuation | Based on components | Based on kit's own cost |
When to Use Kit Inventory
Use kits when you need:
- Independent inventory not tied to component availability
- Physical assembly before the product is sold
- Cost tracking for profit reporting
- Components sold individually while also available in kits
Kit assembly is irreversible. Once components are assembled into a kit, they cannot be disassembled. Plan kit quantities based on demand forecasts.
Inventory Export
When package inventory changes, export behavior depends on settings:
When export is enabled:
- Updated package inventory triggers export
- Component inventory updates cascade to package exports
- Export includes calculated availability
