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/