Skip to main content

Retail Domain Ontology

Industry Domains
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 11 October 2026
Audio Overview
FLOW ALGEBRA
TITLE: Retail Domain Ontology
VERSION: 1.0
DOMAIN: Industry Domains / Retail
SOURCE_URL: https://kirethresearch.org/booksai-core/ontologies/domain-ontologies/industry-domains/retail-domain-ontology.html
AUTHORS: Mark Higgins — Sky (Recursive AI)
STATUS: Domain-based draft; source page content not independently verified.

flow "RetailDomainOntology" v1.0

# PURPOSE
# Represent retail operations, actors, products, transactions and fulfilment as typed,
# traceable semantic relationships. Rules are illustrative, not executable software.

ENTITY_TYPES:
  Retailer: {id: string, name: string, channel: enum[physical,online,omnichannel]}
  Store: {id: string, retailer_id: string, location: string?}
  Customer: {id: string, consent_status: string?}
  Product: {id: string, sku: string, name: string, category_id: string?}
  ProductCategory: {id: string, name: string, parent_id: string?}
  Supplier: {id: string, name: string}
  InventoryRecord: {id: string, sku: string, location_id: string, quantity_on_hand: decimal, quantity_reserved: decimal}
  PriceOffer: {id: string, sku: string, currency: string, amount: decimal, valid_from: datetime, valid_to: datetime?}
  Promotion: {id: string, conditions: string, valid_from: datetime, valid_to: datetime?}
  SalesOrder: {id: string, customer_id: string?, created_at: datetime, status: string}
  OrderLine: {id: string, order_id: string, sku: string, quantity: decimal, unit_price: decimal}
  Payment: {id: string, order_id: string, amount: decimal, currency: string, status: string}
  Shipment: {id: string, order_id: string, carrier: string?, status: string}
  Return: {id: string, order_line_id: string, quantity: decimal, status: string}
  RetailChannel: {id: string, type: string}

RELATIONSHIP_TYPES:
  OPERATES: Retailer -> Store
  SELLS: Retailer -> Product
  BELONGS_TO_CATEGORY: Product -> ProductCategory
  SUPPLIES: Supplier -> Product
  STOCKED_AT: Product -> Store
  LISTED_ON: Product -> RetailChannel
  HAS_PRICE: Product -> PriceOffer
  ELIGIBLE_FOR: Product -> Promotion
  PLACED_BY: SalesOrder -> Customer
  CONTAINS_LINE: SalesOrder -> OrderLine
  REFERENCES_PRODUCT: OrderLine -> Product
  PAID_BY: SalesOrder -> Payment
  FULFILLED_BY: SalesOrder -> Shipment
  RETURNED_AS: OrderLine -> Return

CONSTRAINTS:
  - IDs are unique within entity types.
  - Quantity on hand, quantity reserved and ordered quantities must be non-negative.
  - Available stock = quantity_on_hand - quantity_reserved; negative results flag inconsistency.
  - Currency is explicitly specified for each monetary amount.
  - Price validity and promotion conditions must be evaluated at the transaction timestamp.
  - A payment marked successful must not alone imply an order was fulfilled.
  - A return must not exceed the quantity eligible for return under applicable rules.
  - Customer data usage is subject to consent, purpose limitation and applicable law.

INFERENCE_RULES:
  R1_AVAILABLE_STOCK:
    IF InventoryRecord.quantity_on_hand >= InventoryRecord.quantity_reserved
    THEN available_quantity = quantity_on_hand - quantity_reserved
    ELSE flag "inventory_inconsistency".
  R2_ORDER_SUBTOTAL:
    IF all OrderLine quantities and unit prices are known
    THEN subtotal = SUM(quantity * unit_price) before tax, discounts and shipping.
  R3_OUT_OF_STOCK:
    IF available_quantity <= 0
    THEN stock_state = "unavailable_at_location"; do not infer network-wide unavailability.
  R4_ACTIVE_OFFER:
    IF valid_from <= evaluation_time AND (valid_to is null OR evaluation_time < valid_to)
    THEN price_offer_is_temporally_valid = true; additional conditions may apply.
  R5_FULFILMENT:
    IF Shipment.status = "delivered" AND supporting carrier evidence exists
    THEN order_delivery_evidence = true; do not infer customer acceptance.
  R6_RETURN_RECONCILIATION:
    IF accepted_return is confirmed
    THEN adjust relevant financial and inventory records under recorded disposition rules.

CONFIDENCE:
  scale: [0.0, 1.0]
  evidence_required: true
  policy: "Distinguish directly observed records from estimates and inferred claims."
  example: {claim: "SKU available at Store A", score: 0.92, basis: "timestamped inventory feed"}

SEMANTIC_EQUIVALENCE:
  exact:
    - ["SKU", "stock keeping unit"]
    - ["POS", "point of sale"]
  contextual_not_exact:
    - ["retailer", "merchant"]
    - ["order", "purchase"]
    - ["inventory", "available stock"]
  rule: "Do not collapse context-dependent terms into unconditional equivalence."

PROVENANCE:
  fields: [source_system, source_record_id, observed_at, asserted_by, transformation_id, version]
  rule: "Every externally sourced claim must retain traceable provenance."

FLOW_HASH:
  algorithm: SHA-256
  input: "canonical UTF-8 serialisation of version, schema, constraints and inference rules"
  output: "computed by implementing system; not pre-populated"

UPDATE_MODEL:
  strategy: "versioned incremental updates"
  events: [product_created, price_changed, inventory_changed, order_placed, payment_updated, shipment_updated, return_processed]
  safeguards: [idempotency, timestamp_ordering, schema_validation, provenance_retention, rollback]

AI_CONSUMPTION:
  representation: "typed entity-relation graph"
  tasks: [semantic_search, product_discovery, inventory_reasoning, order_explanation, demand_analysis]
  controls: [grounded_answers, uncertainty_reporting, access_control, privacy_protection, temporal_validation]
  limitation: "Inference outputs are not substitutes for live stock, current prices or legal compliance checks."

END FLOW ALGEBRA
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ