Skip to content

Semantic Constraints CatalogΒΆ

46 semantic constraints formalising relational rules across UC-BoK Business Objects.

Semantic Constraints define what JSON Schema cannot: relational correctness β€” which relationships between objects are valid, required, or forbidden.

SummaryΒΆ

Type Count Purpose
πŸ”— Association 20 Cardinality rules between Business Objects β€” defines which objects must, may, or cannot reference others.
🚦 Lifecycle Gate 10 Explicitly prohibited lifecycle state transitions β€” transitions that are never valid regardless of context.
πŸ›οΈ Ownership 6 Declares which application archetype is the system of record for a Business Object.
πŸ“¦ Domain Containment 10 Asserts which domain owns a Business Object, enforcing domain boundary integrity.
Severity Count Meaning
πŸ”΄ Invariant 41 Must always hold β€” violation is a model error
🟑 Constraint 5 Should hold β€” violation is a design smell
🟒 Guideline 0 Recommended β€” acceptable with justification

πŸ”— AssociationΒΆ

Cardinality rules between Business Objects β€” defines which objects must, may, or cannot reference others.

Constraint Subject Predicate Object Cardinality Severity
basket-line-references-product basket-line references inventory-item 1..1 πŸ”΄ Invariant
basket-may-have-lines basket contains basket-line 0..* 🟑 Constraint
catalogue-must-have-products catalogue contains product 1..* 🟑 Constraint
channel-must-have-catalogue channel contains catalogue 1..* πŸ”΄ Invariant
consent-belongs-to-customer consent belongs-to customer 1..1 πŸ”΄ Invariant
exchange-belongs-to-order exchange references order 1..1 πŸ”΄ Invariant
fulfillment-order-belongs-to-order fulfillment-order derives-from order 1..1 πŸ”΄ Invariant
invoice-belongs-to-order invoice references order 1..1 πŸ”΄ Invariant
loyalty-account-belongs-to-customer loyalty-account belongs-to customer 1..1 πŸ”΄ Invariant
loyalty-member-references-customer loyalty-member belongs-to customer 1..1 πŸ”΄ Invariant
order-belongs-to-customer order belongs-to customer 1..1 πŸ”΄ Invariant
order-line-references-product order-line references inventory-item 1..1 πŸ”΄ Invariant
order-must-have-lines order contains order-line 1..* πŸ”΄ Invariant
payment-belongs-to-order payment settles order 1..1 πŸ”΄ Invariant
picking-task-belongs-to-fulfillment-order picking-task belongs-to fulfillment-order 1..1 πŸ”΄ Invariant
refund-belongs-to-payment refund derives-from payment 1..1 πŸ”΄ Invariant
reservation-references-inventory reservation reserves inventory 1..1 πŸ”΄ Invariant
return-belongs-to-order return references order 1..1 πŸ”΄ Invariant
shipment-has-lines shipment contains shipment-line 1..* πŸ”΄ Invariant
shipment-references-address shipment references address 1..1 πŸ”΄ Invariant

??? details "Descriptions"

**`basket-line-references-product`** β€” Every Basket Line must reference exactly one Product.

**`basket-may-have-lines`** β€” A Basket may contain zero or more Basket Lines. An empty basket is valid before item selection.

**`catalogue-must-have-products`** β€” A published Catalogue must contain at least one active Product.

**`channel-must-have-catalogue`** β€” An active Channel must have at least one Catalogue assigned. A channel with no assortment cannot transact.

**`consent-belongs-to-customer`** β€” A Consent record must be associated with exactly one Customer.

**`exchange-belongs-to-order`** β€” An Exchange must reference the original Order it is replacing.

**`fulfillment-order-belongs-to-order`** β€” A Fulfillment Order must be derived from exactly one Order. Fulfillment cannot exist without a commercial commitment.

**`invoice-belongs-to-order`** β€” An Invoice must be associated with exactly one Order.

**`loyalty-account-belongs-to-customer`** β€” A Loyalty Account must be owned by exactly one Customer.

**`loyalty-member-references-customer`** β€” A Loyalty Member record must reference exactly one Customer profile.

**`order-belongs-to-customer`** β€” An Order must be associated with exactly one Customer. Anonymous orders are not supported in UC-BoK.

**`order-line-references-product`** β€” Every Order Line must reference exactly one Product. An order line without a product has no catalogue meaning.

**`order-must-have-lines`** β€” An Order must contain at least one Order Line. An empty order has no commercial meaning.

**`payment-belongs-to-order`** β€” A Payment must be associated with exactly one Order. Payment without a commercial context is not valid.

**`picking-task-belongs-to-fulfillment-order`** β€” A Picking Task must belong to exactly one Fulfillment Order.

**`refund-belongs-to-payment`** β€” A Refund must be applied against exactly one original Payment.

**`reservation-references-inventory`** β€” A Reservation must reserve a specific Inventory Item. Reservations without a specific item are not allowed.

**`return-belongs-to-order`** β€” A Return must reference the original Order it relates to.

**`shipment-has-lines`** β€” A Shipment must contain at least one Shipment Line. An empty shipment has no fulfillment meaning.

**`shipment-references-address`** β€” A Shipment must have exactly one delivery Address. Fulfillment without a destination is not possible.

🚦 Lifecycle Gate¢

Explicitly prohibited lifecycle state transitions β€” transitions that are never valid regardless of context.

Constraint Subject From To Allowed Severity
basket-cannot-convert-abandoned basket abandoned converted ❌ No πŸ”΄ Invariant
order-cannot-cancel-when-completed order completed cancelled ❌ No πŸ”΄ Invariant
order-cannot-dispatch-without-confirmation order draft in-fulfilment ❌ No πŸ”΄ Invariant
order-return-only-from-completed order in-fulfilment return-in-progress ❌ No 🟑 Constraint
payment-cannot-reactivate-voided payment voided captured ❌ No πŸ”΄ Invariant
payment-capture-requires-authorisation payment pending captured ❌ No πŸ”΄ Invariant
payment-refund-requires-capture payment authorised fully-refunded ❌ No πŸ”΄ Invariant
reservation-cannot-confirm-expired reservation expired confirmed ❌ No πŸ”΄ Invariant
return-cannot-reopen-rejected return rejected approved ❌ No 🟑 Constraint
return-refund-requires-inspection return received refunded ❌ No πŸ”΄ Invariant

??? details "Descriptions"

**`basket-cannot-convert-abandoned`** β€” An abandoned basket cannot be directly converted to an order. It must be reopened and go through checkout.

**`order-cannot-cancel-when-completed`** β€” A completed order cannot be cancelled. Post-completion reversals must be handled as returns or exchanges.

**`order-cannot-dispatch-without-confirmation`** β€” An order must pass through confirmed state before entering fulfilment. Skipping confirmation bypasses fraud and stock checks.

**`order-return-only-from-completed`** β€” Returns can only be initiated after an order is completed. In-flight orders require cancellation, not return.

**`payment-cannot-reactivate-voided`** β€” A voided payment cannot be captured. A new payment authorisation must be initiated.

**`payment-capture-requires-authorisation`** β€” A payment cannot be captured without prior authorisation. Capture directly from pending bypasses fraud and fund-hold controls.

**`payment-refund-requires-capture`** β€” A payment cannot be refunded unless it has been captured. Refunding an authorisation must use void, not refund.

**`reservation-cannot-confirm-expired`** β€” An expired reservation cannot be confirmed. A new reservation must be created from available stock.

**`return-cannot-reopen-rejected`** β€” A rejected return cannot be re-approved in the same return lifecycle. A new return request must be submitted.

**`return-refund-requires-inspection`** β€” A return cannot be refunded without inspection. Inspection determines acceptance and refund eligibility.

πŸ›οΈ OwnershipΒΆ

Declares which application archetype is the system of record for a Business Object.

Constraint Subject Owner Application Exclusive Severity
customer-owned-by-crm customer crm Yes πŸ”΄ Invariant
inventory-owned-by-sim inventory sim Yes πŸ”΄ Invariant
loyalty-member-owned-by-loyalty-platform loyalty-member loyalty-platform Yes πŸ”΄ Invariant
order-owned-by-oms order oms Yes πŸ”΄ Invariant
payment-owned-by-payment-hub payment payment-hub Yes πŸ”΄ Invariant
product-owned-by-ecommerce-platform product ecommerce-platform No 🟑 Constraint

??? details "Descriptions"

**`customer-owned-by-crm`** β€” Customer identity and profile is exclusively owned by the CRM.

**`inventory-owned-by-sim`** β€” Inventory state for store locations is exclusively owned by the SIM.

**`loyalty-member-owned-by-loyalty-platform`** β€” Loyalty Member records are exclusively owned by the Loyalty Platform.

**`order-owned-by-oms`** β€” The Order lifecycle is exclusively owned by the OMS. No other application may modify order state.

**`payment-owned-by-payment-hub`** β€” The Payment lifecycle is exclusively owned by the Payment Hub.

**`product-owned-by-ecommerce-platform`** β€” Product catalogue management is typically owned by the eCommerce Platform or a dedicated PIM. Exclusive ownership is context-dependent.

πŸ“¦ Domain ContainmentΒΆ

Asserts which domain owns a Business Object, enforcing domain boundary integrity.

Constraint Subject Domain Exclusive Severity
channel-in-commerce-domain channel commerce Yes πŸ”΄ Invariant
customer-in-customer-domain customer customer Yes πŸ”΄ Invariant
inventory-in-inventory-domain inventory inventory Yes πŸ”΄ Invariant
loyalty-account-in-loyalty-domain loyalty-account loyalty Yes πŸ”΄ Invariant
order-in-order-domain order order Yes πŸ”΄ Invariant
payment-in-payment-domain payment payment Yes πŸ”΄ Invariant
product-in-commerce-domain product commerce Yes πŸ”΄ Invariant
promotion-in-promotion-domain promotion promotion Yes πŸ”΄ Invariant
shipment-in-fulfillment-domain shipment fulfillment Yes πŸ”΄ Invariant
store-in-store-domain store store Yes πŸ”΄ Invariant

??? details "Descriptions"

**`channel-in-commerce-domain`** β€” The Channel Business Object is owned by the Commerce domain.

**`customer-in-customer-domain`** β€” The Customer Business Object is owned by the Customer domain.

**`inventory-in-inventory-domain`** β€” The Inventory Business Object is owned by the Inventory domain.

**`loyalty-account-in-loyalty-domain`** β€” The Loyalty Account is owned by the Loyalty domain.

**`order-in-order-domain`** β€” The Order Business Object is owned by the Order domain.

**`payment-in-payment-domain`** β€” The Payment Business Object is owned by the Payment domain.

**`product-in-commerce-domain`** β€” The Product Business Object is owned by the Commerce domain.

**`promotion-in-promotion-domain`** β€” The Promotion Business Object is owned by the Promotion domain.

**`shipment-in-fulfillment-domain`** β€” The Shipment Business Object is owned by the Fulfillment domain.

**`store-in-store-domain`** β€” The Store Business Object is owned by the Store domain.

Generated from catalogs/constraints.yaml Β· Specification: specifications/012-semantic-constraints/