Component Model Reference
Complete property reference for the ProductComponent model in Omnium.
This page documents all properties of the ProductComponent model used for defining package and bundle components.
ProductComponent Properties
| Property | Type | Description |
|---|---|---|
ComponentId | string | Unique identifier for this component within the package |
ProductId | string | Product ID of the component product |
SkuId | string | Specific variant SKU (for preselection) |
Quantity | decimal | Quantity of this component in the package |
Options | List<ComponentOption> | Selectable variant options |
IsRequired | bool | Indicates if component is required (informational only) |
ComponentName | string | Display name when no default option is selected |
Legacy Properties
| Property | Type | Description |
|---|---|---|
Id | string | Legacy component product ID (use ProductId instead) |
Key Properties Explained
ComponentId
Unique identifier for tracking this component across orders and inventory.
- Auto-generated if not provided
- Used to link order lines back to the component definition
- Required for component option tracking
ProductId vs SkuId
These properties work together to identify the component product:
| Scenario | ProductId | SkuId | Behavior |
|---|---|---|---|
| Specific variant | Set | Set | Uses exact SKU specified |
| Any variant | Set | Empty | Allows any variant of the product |
| With options | Set | Empty | Customer selects from options |
Example: Specific SKU
Example: Any variant
Quantity
The quantity of this component included in one package unit.
This affects:
- Inventory calculation: Available packages = floor(component_inventory / quantity)
- Order lines: Component quantity = package_quantity × component_quantity
IsRequired
Indicates whether the component is mandatory for the package.
The IsRequired flag is informational only and does not enforce business logic. It's used by external systems or UI to indicate component requirements.
ComponentName
Display name shown when no specific option is preselected.
ComponentOption
Options allow customers to choose between different variants for a component.
ComponentOption Properties
| Property | Type | Description |
|---|---|---|
SkuId | string | SKU of the selectable option |
ProductId | string | Product ID (when SKU should not be defaulted) |
PriceOffsets | List<Price> | Price adjustments for this option (packages only) |
Basic Options
Simple variant selection:
Options with Price Offsets
For packages, options can have price adjustments:
Price offsets only apply to packages (IsPackage: true), not bundles. For bundles, component prices are typically independent.
Options with ProductId Only
Allow any variant of a product to be selected:
When only ProductId is set, the customer can select any variant of that product.
Complete Component Examples
Fixed Component
A component with a specific SKU and quantity:
Selectable Component
A component where the customer chooses a variant:
Optional Component
A component that may or may not be included:
Package with Multiple Components
Complete example of a package product:
Searching Components
Components are stored as nested objects within products, which enables queries like:
- Find all packages containing a specific product
- Search for packages with certain components
- Filter by component quantity
