Interface: ModularElement
Represents a product element in a modular configuration, with complete details.
The ModularElement interface provides comprehensive information about a product that has been added to a modular scene, including its identity, configuration, pricing, and selected options. This is a data-rich representation used for displaying product details, calculating prices, and generating reports.
Unlike the ProductElement interface which focuses on scene placement and connections, ModularElement focuses on business data like pricing, options, and product information.
Properties
configurationCode
configurationCode:
string
Configuration code representing all selected options.
This code encapsulates all the option selections and customizations applied to this specific product instance. It's a serialized representation of the product's current configuration state.
The configuration code can be used to recreate this exact product configuration in the future or to look up pricing and availability.
description?
optional
description:Nullable
<string
>
Plain text description of the product.
This optional property contains a human-readable description of the product, explaining its features, benefits, and characteristics. This helps users understand the product's purpose and value.
Product descriptions are important for customer education and often appear in detailed view modes and documentation.
image?
optional
image:string
Absolute URL to the product thumbnail image.
This optional property provides a direct URL to an image representing this product. This is used for integration with external systems that need a simple image URL rather than complex thumbnail settings.
Direct image URLs simplify integration with order management systems, websites, and other platforms that display product imagery.
itemKey
itemKey:
string
Unique item key combining product ID and configuration.
This key uniquely identifies this product with its specific configuration. It's a combination of the product ID and configuration code that creates a unique identifier for this exact product variant.
The itemKey is useful for tracking unique product configurations across orders, even when the same product appears multiple times with different options.
itemPrice?
optional
itemPrice:number
Per-unit price for this product.
This optional property contains the price for a single unit of this product at the current quantity level, after any applicable quantity break discounts have been applied. This is the price component that gets multiplied by the quantity.
Unit pricing helps customers understand the component costs in orders with multiple units of the same product.
levels?
optional
levels:PriceLevel
[]
Quantity break pricing tiers for this product.
This optional property defines different pricing tiers based on order quantity. Each level specifies a quantity range with its own per-unit price and one-time price component, potentially offering better pricing for larger quantities.
Quantity breaks encourage volume purchases by making the per-unit price more attractive at higher quantities, while clearly showing the discount structure to customers.
oneTimeAmount?
optional
oneTimeAmount:number
One-time price component of the product price.
This optional property indicates what portion of the product price is a one-time fee rather than a per-unit cost. This corresponds to the pricePart value in the applicable price level and doesn't scale with quantity.
One-time amounts cover fixed costs like setup, processing, or special handling that occur once regardless of order quantity.
options
options:
SimpleOption
[]
List of options selected for this product.
This property contains detailed information about all the options that have been selected for this product instance. Each option includes information about the block, name, and value of the selection.
The options list provides a complete picture of how this product has been customized and is essential for order processing and manufacturing.