PIM

PIM - Structural Topology & Domain Model

Tactical domain modeling, aggregate root boundaries, dynamic attribute family schemas, multi-tree taxonomies, and BOM recipe graphs for the PIM domain.

Structural Topology & Domain Model

The structural topology of the Product Information Management (PIM) domain defines the tactical arrangement of catalog entities, value objects, and aggregate boundaries. In accordance with Vlad Khononov’s Learning Domain-Driven Design, aggregates serve as transactional consistency boundaries, ensuring that internal invariant rules remain intact under concurrent modifications.


1. Tactical Modeling: Aggregate Roots & Boundaries

The PIM bounded context is organized around five primary Aggregate Roots. Each aggregate encapsulates its internal entity graph and exposes explicit domain operations:

flowchart TD
    subgraph AR_Product["Product Aggregate Root (SPU)"]
        SPU["Parent Product Entity<br/>Handle, Brand, Master Category"]
        Options["Option Type Bindings<br/>Size, Color, Capacity"]
        SKUs["Child Variant Entities (SKUs)<br/>Barcode, Weight, Dimensions"]
        Media["Asset Attachment Links<br/>Role: hero, gallery, swatch"]
        AttrValues["Scoped Attribute Values<br/>Channel + Locale Values"]
        SPU --> Options
        SPU --> SKUs
        SPU --> Media
        SPU --> AttrValues
    end

    subgraph AR_Family["Attribute Family Aggregate Root"]
        AF["Attribute Family Entity"]
        Groups["Attribute Groups"]
        Attrs["Attribute Definitions & Validation Rules"]
        AF --> Groups --> Attrs
    end

    subgraph AR_Category["Category Tree Aggregate Root"]
        Tree["Category Tree Entity<br/>Master vs Merchandising"]
        Nodes["Hierarchical Category Nodes"]
        Tree --> Nodes
    end

    subgraph AR_BOM["Bill of Materials Aggregate Root"]
        BOM["BOM Header Entity<br/>Finished SKU, Revision Code"]
        Comp["Component Line Items<br/>Quantity, Scrap %"]
        BOM --> Comp
    end

    subgraph AR_Channel["Channel Syndication Aggregate Root"]
        Channel["Sales Channel Entity"]
        Locales["Permitted Locales"]
        Gates["Completeness Criteria Rules"]
        Channel --> Locales
        Channel --> Gates
    end

    AR_Family -.->|"Schema Definition"| AR_Product
    AR_Category -.->|"Classification"| AR_Product
    AR_Product -.->|"Finished Assembly"| AR_BOM
    AR_Channel -.->|"Readiness Validation"| AR_Product

Aggregate Boundary Definitions

Aggregate RootEncapsulated Entities & ObjectsConsistency Responsibility & Invariant Scope
Product (SPU)Product SPU, Child Variant SKUs, Option Types, Option Values, Asset Attachments, Localized Attribute Values.Enforces variant option uniqueness, prevents orphan SKUs, manages lifecycle state changes, and coordinates completeness evaluations.
Attribute FamilyFamily Definition, Attribute Groups, Attribute Configurations, Type Constraints, Unit Bindings.Guarantees attribute code uniqueness, enforces data type schemas, and manages structural template revisions without altering database tables.
Category TreeCategory Tree Definition, Category Nodes, Hierarchy Paths, Channel Linkages.Enforces tree acyclicity, guarantees parent-child node integrity, and validates single-parent constraints for the Master Taxonomy.
Bill of Materials (BOM)BOM Header, Revision Tag, Component Lines, Quantity Requirements, Scrap Ratios.Enforces acyclic assembly graphs ($P_A \notin \text{Descendants}(P_A)$), mandates positive component quantities, and guarantees immutability upon approval.
Channel SyndicationChannel Entity, Enabled Locales, Mandatory Attribute Lists, Asset Resolution Criteria.Evaluates publication readiness, calculates completeness percentages, and maintains channel-specific validation rules.

2. Entities vs. Value Objects

A foundational DDD tenet is segregating mutable entities (defined by continuous identity) from immutable value objects (defined strictly by their structural attributes):

Domain ConstructTactical TypeMutabilityStructural Representation & Invariant Characteristics
Product (SPU)EntityMutableDefined by a persistent handle and product ID. State transitions follow an explicit lifecycle.
Product Variant (SKU)EntityMutableDefined by its internal variant identity, but its natural SKU code becomes permanently locked once transacted.
SkuCodeValue ObjectImmutableFormatted, alphanumeric string adhering to standardized enterprise SKU naming conventions.
GtinBarcodeValue ObjectImmutableOptical string validated against GS1 Modulo 10 check-digit algorithms (EAN-13, UPC-A, GTIN-14).
DimensionSetValue ObjectImmutableEncapsulates length, width, height, and unit of measure: { length: 35.0, width: 28.0, height: 5.0, unit: "cm" }.
WeightMetricValue ObjectImmutableEncapsulates gross physical mass: { value: 480.0, unit: "g" }. Negative values are mathematically rejected.
MonetaryAmountValue ObjectImmutableCurrency code and decimal amount: { amount: 450.00, currency: "USD" }.
CompletenessVectorValue ObjectImmutableRatio of fulfilled vs required criteria: { channel: "web", locale: "en-US", score: 1.0, missing: [] }.
ScrapRateValue ObjectImmutablePercentage allowance bounded strictly between zero and one: $0.0 \le S < 1.0$.

3. Product & Variant Structural Hierarchy

The catalog foundation separates the conceptual product from concrete physical variants:

Product (SPU) - "Mountain Apex Technical Jacket"
├── Brand: "Apex Outdoors"
├── Master Taxonomy Leaf: Apparel > Outerwear > Jackets > Technical Shells
├── Attribute Family: "Technical Apparel Schema"
│   ├── Material: 3-Layer GORE-TEX Pro Shell
│   ├── Waterproof Rating: 28,000 mm
│   └── Breathability: 25,000 g/m²/24h
├── Shared Media: Hero Campaign Photography, Brand Video
├── Base List Price: $450.00 USD
├── Option Axes: [Color, Size]
└── Child Variants (SKUs)
    ├── Variant SKU: APEX-BLK-M
    │   ├── Option Values: Color = Black, Size = Medium
    │   ├── Barcode (GTIN-13): 0793573194012
    │   ├── Packaged Dimensions: 35cm x 28cm x 5cm | Gross Weight: 480g
    │   ├── Variant Price Override: null (inherits base $450.00 USD)
    │   └── Specific Media: Black Colorway Swatch & Model Images
    ├── Variant SKU: APEX-BLK-L
    │   ├── Option Values: Color = Black, Size = Large
    │   ├── Barcode (GTIN-13): 0793573194029
    │   ├── Packaged Dimensions: 37cm x 30cm x 5cm | Gross Weight: 510g
    │   ├── Variant Price Override: null (inherits base $450.00 USD)
    │   └── Specific Media: Black Colorway Swatch & Model Images
    └── Variant SKU: APEX-RED-M
        ├── Option Values: Color = Solar Red, Size = Medium
        ├── Barcode (GTIN-13): 0793573194036
        ├── Packaged Dimensions: 35cm x 28cm x 5cm | Gross Weight: 480g
        ├── Variant Price Override: null (inherits base $450.00 USD)
        └── Specific Media: Red Colorway Swatch & Model Images

Responsibility Split: Product SPU vs. Variant SKU

Operational DimensionProduct SPU LevelVariant SKU Level
Identity & SlugsGlobal handle, SEO friendly slug, marketing title.SKU code, optical GTIN/EAN barcode, internal part number.
Imagery & AssetsBrand campaign lookbooks, technology diagrams.Colorway swatches, package photos, angle-specific imagery.
Pricing ModelBaseline catalog MSRP, default list price.Variant price overrides (surcharges for premium sizes/materials).
Logistics SpecsBroad freight classification (e.g., standard parcel).Exact packaged length, width, height, gross weight, and base UOM.
Operational ExecutionNone (abstract marketing grouping).Warehouse bin storage, POS scanning, sales order line fulfillment.

4. Dynamic Attribute Family & Schema Topology

PIM supports diverse product categories without requiring ongoing database schema modifications. The dynamic schema engine organizes attributes into structured families:

flowchart TD
    AF["Attribute Family<br/>e.g., Technical Apparel Schema"]
    
    G1["Attribute Group: Performance"]
    G2["Attribute Group: Material & Care"]
    G3["Attribute Group: Logistics"]

    A1["Attribute: Waterproof Rating (Unit Metric)"]
    A2["Attribute: Windproof Rating (Boolean)"]
    A3["Attribute: Fabric Composition (Text)"]
    A4["Attribute: Country of Origin (Choice Code)"]

    AF --> G1
    AF --> G2
    AF --> G3

    G1 --> A1
    G1 --> A2
    G2 --> A3
    G3 --> A4

Supported Attribute Data Types

Data TypeDescriptionValue Schema ExampleInvariant Validation & Boundaries
Text / StringSingle-line alphanumeric string."GORE-TEX Pro 3L"Regex patterns, min/max length constraints.
Rich TextMulti-line formatted markdown or HTML."<p>Engineered for alpine conditions...</p>"Tag whitelisting, prohibited script tags.
NumericInteger or decimal numbers.28000Min/max numerical boundaries, step intervals.
Unit MetricNumeric value bound to a unit of measure.{ "value": 28000, "unit": "mm" }Unit must exist within the global Unit Registry.
BooleanBinary true/false flag.trueStrict boolean literal (no null if mandatory).
Date / TimeSpecific calendar date or ISO timestamp."2026-10-01"ISO-8601 formatting, chronological validity.
Single ChoiceDiscrete selection from a predefined set."hardshell_jacket"Code must match an active attribute option choice.
Multi ChoiceMultiple selections from a predefined set.["waterproof", "breathable", "windproof"]Subset check against approved attribute choices.
Media RefPointer to a centralized digital asset."uuid:asset-9042-tech"File type and resolution conformance.

5. Multi-Channel & Multi-Locale Scoping Topology

Enterprises sell globally across varied storefronts and regional markets. Attribute resolution adheres to an explicit four-tier fallback cascade:

flowchart TD
    Query["Attribute Resolution Request<br/>(Entity, Attribute, Channel, Locale)"] --> C1{"Specific Channel & Specific Locale<br/>Defined?"}
    C1 -->|Yes| R1["Return: Channel + Locale Value"]
    C1 -->|No| C2{"Specific Channel & Default Locale<br/>Defined?"}
    C2 -->|Yes| R2["Return: Channel + Default Locale Value"]
    C2 -->|No| C3{"Global Scope & Specific Locale<br/>Defined?"}
    C3 -->|Yes| R3["Return: Global + Locale Value"]
    C3 -->|No| C4{"Global Scope & Default Locale<br/>Defined?"}
    C4 -->|Yes| R4["Return: Global Default Value"]
    C4 -->|No| R5["Return: Null / Missing Attribute Error"]

Scoping Matrix Resolution Examples

Attribute CodeScoping LevelWeb Store (en-US)Web Store (ar-SA)Retail POS (en-US)Marketplace (en-US)
sku_codeGlobal (Non-Translatable)APEX-BLK-MAPEX-BLK-MAPEX-BLK-MAPEX-BLK-M
titleChannel + Locale ScopedMen’s Apex Jacketجاكيت أبيكس للرجالApex Mns JktMen’s Apex Waterproof Alpine Shell Jacket
short_descChannel + Locale ScopedLightweight alpine shellسترة خفيفة مقاومة للماءDisplay: Apex MHigh-performance GORE-TEX waterproof jacket
gross_weightGlobal (Physical Spec)480g480g480g480g
list_priceChannel Scoped$450.00 USD1,690.00 SAR$450.00 USD$439.99 USD

6. Multi-Tree Category Taxonomy Topology

To support rigid financial reporting alongside fluid digital marketing, PIM isolates Master Taxonomies from Merchandising Navigation Trees:

flowchart TD
    subgraph Master_Taxonomy["Master Taxonomy (Single-Parent, Strict Rollup)"]
        M1["Root: Enterprise Merchandise"] --> M2["Division: Apparel"]
        M2 --> M3["Category: Outerwear"]
        M3 --> M4["Leaf: Technical Shells (Canonical Node)"]
    end

    subgraph Merchandising_Trees["Merchandising Trees (Multi-Parent, Flexible Discovery)"]
        W1["Web Navigation Tree"] --> W2["Men's New Arrivals"]
        W1 --> W3["Mountaineering Expedition Gear"]
        S1["Seasonal Campaign Tree"] --> S2["Winter Clearance: Shells Under $500"]
    end

    Product["Product: Apex Technical Jacket"]
    
    Product ===|1 : 1 Mandatory Link| M4
    Product -.->|Flexible Association| W2
    Product -.->|Flexible Association| W3
    Product -.->|Flexible Association| S2

Structural Taxonomy Constraints

  1. Strict Single-Parent Assignment: Every active product must be assigned to exactly one leaf node within the Master Taxonomy. Parent node assignment is prohibited.
  2. Multi-Parent Merchandising Associations: Products may be projected into multiple marketing trees and seasonal categories without impacting master corporate reporting.

7. Digital Asset Management (DAM) Attachment Topology

Digital assets are stored in a centralized asset repository and associated with catalog entities through role-based attachment links:

flowchart LR
    Asset["Centralized Asset Library<br/>UUID, MimeType, Checksum"]
    
    Link["Attachment Relationship Link"]
    Asset --> Link

    Link -->|Scope: Global, Role: hero_image| Product["Parent Product (SPU)"]
    Link -->|Scope: Global, Role: tech_sheet| Product
    Link -->|Scope: Variant, Role: swatch_icon| VariantBlack["Variant: APEX-BLK-M"]
    Link -->|Scope: Variant, Role: packshot| VariantBlack
Asset Role CodeAttached EntityPermitted FormatsStructural Business Purpose
hero_imageProduct (SPU)WebP, AVIF, JPEGPrimary thumbnail and detail hero image across digital storefronts.
gallery_imageProduct / VariantWebP, AVIF, JPEG, PNGMulti-angle detail views and lifestyle imagery in product media galleries.
swatch_iconVariant (SKU)SVG, WebP, PNGCompact visual preview representing specific colors, patterns, or materials.
tech_sheetProduct (SPU)PDFDownloadable technical datasheet and regulatory specification document.
safety_sdsProduct (SPU)PDFMandatory Safety Data Sheet (SDS) for hazardous or regulated chemical goods.
cad_modelProduct (SPU)STEP, IGES, GLTF3D dimensional model for engineering integration and AR viewing.

8. Bill of Materials (BOM) & Assembly Recipe Graph

For products assembled internally or via manufacturing partners, PIM models an engineering recipe as a Directed Acyclic Graph (DAG):

flowchart TD
    FG["Finished Good SKU: APEX-BLK-M<br/>BOM Revision: Rev B (Approved)"]
    
    C1["Fabric: GORE-TEX 3L Black<br/>SKU: RAW-FAB-001<br/>Gross Qty: 2.4 m | Scrap: 3.5%"]
    C2["Zipper: Waterproof 75cm<br/>SKU: RAW-ZIP-075<br/>Gross Qty: 1.0 pc | Scrap: 0.0%"]
    C3["Tape: Seam Sealing 20mm<br/>SKU: RAW-TAP-020<br/>Gross Qty: 0.1 kg | Scrap: 2.0%"]
    C4["Embroidered Logo Patch<br/>SKU: RAW-LBL-004<br/>Gross Qty: 1.0 pc | Scrap: 0.0%"]

    FG --> C1
    FG --> C2
    FG --> C3
    FG --> C4

BOM Topological Constraints

  • Strict Acyclicity (DAG): The recipe graph must be acyclic. An assembly can never contain itself as a sub-assembly, directly or transitively: $P_A \notin \text{Descendants}(P_A)$.
  • Component Atomicity: Every component line item points to an active raw material SKU or sub-assembly SKU with an explicit positive quantity ($Q > 0$).
  • Revision Immutability: Once an engineering revision reaches the Approved state, all constituent component lines and scrap rates are permanently locked.

Our Premium Sponsors

Obelaw is proudly open-source. Continued development, bug fixes, and community support are made possible by the generosity of our sponsors.

Sponsor Obelaw