Originally published under CC BY 4.0 in the Open Enterprise Ontology Reference at ontoloji.org/en/guides/operational-ontology-action-types-multi-role-links-and-interfaces.
Passive metadata catalogs and read-only SQL semantic views describe tables (NET_REVENUE, LG_XXX_YY_ORFICHE, VBAK), not operational enterprise decisions. The moment a planner or Model Context Protocol (MCP) agent asks "Can we release this credit-held export order without violating QMS quarantine holds or sealed fiscal ledgers?", a static schema catalog leaves mutations, multi-role joins, and fixed-point calculations completely ungrounded.
This vendor-neutral systems engineering specification formalizes five operational ontology primitives over self-hosted read replicas and official ERP business-object APIs (SAP S/4HANA, Logo Tiger, Netsis, Odoo).
1. The Four-Pillar Operational Decision Model (Data + Logic + Action + Security)
Every governed operational decision rests on four equal pillars enforced identically across human operators and AI agents:
-
Data: Zero-copy read-replica state paired with immutable decision lineage (capturing the exact snapshot evaluated and state transition committed). -
Logic: Deterministic business rules, statutory tax/FX calculators, and ATP netting routines exposed as callable code rather than prompt prose. -
Action: Atomic transactional contracts (ActionTypes) replacing ad-hocINSERT/UPDATEstatements or raw REST endpoints. -
Security: First-class transaction isolation (BEGIN READ ONLY), caller-inherited row/column RBAC (Human Role ∩ Agent Scope), mandatory security markings across derived rollups, andW3C traceparentaudit trails.
2. Declared ActionType Contracts (Draft -> Human Evaluation -> ERP Import)
Exposing raw REST or OData POST endpoints directly as MCP tools validates single-system JSON syntax—not cross-system readiness or human presence. A declared ActionType binds typed object references, deterministic pre-flight invariants, out-of-context human approval nonces, and official ERP business-object adapters (BAPI_SALESDOCUMENT_CHANGE, Logo Objects REST) into one closed catalog:
apiVersion: ontology.open-spec/v1 kind: ActionType metadata: id: release_credit_blocked_sales_order domain: order_to_cash parameters: sales_order: { type: ObjectReference<SalesOrder>, required: true } verified_exposure_calc: { type: FunctionOutputRef<calculate_account_credit_headroom_v2>, required: true } override_ceiling_try: { type: Decimal(18, 2), required: true } audit_reason: { type: String, minLength: 15 } submission_criteria: principal_rbac: anyOfRoles: ["FINANCE_CONTROLLER", "CREDIT_COMMITTEE_LEAD"] requireAgentScope: "ontology:action:stage" pre_flight_validators: - id: check_sealed_ledger_period invariant: "edefter_period_status(sales_order.accounting_date) == 'OPEN'" - id: check_qms_lot_quarantine invariant: "count(sales_order.allocated_lots[qms_status == 'QUARANTINE']) == 0" - id: check_deterministic_exposure_signature invariant: "verify_hmac(verified_exposure_calc.signature)" approval_gate: lifecycle: ["DRAFT_STAGED", "PENDING_HUMAN_EVALUATION", "ERP_IMPORTED", "REJECTED"] nonceTransport: "OUT_OF_CONTEXT_UI_AND_SIGNED_WEBHOOK" Even if an untrusted supplier PDF injects adversarial instructions into the model's context window, a closed ActionType catalog gives the agent zero tool surface to mutate vendor IBANs (CLCARD.IBAN / LFBK) or delete ledger rows.
3. Named, Bidirectional, Repeatable LinkTypes Between Identical Object Pairs
Automated SQL-to-graph crawlers routinely index joins by an unlabeled (SourceTable, TargetTable) tuple—overwriting or collapsing multiple foreign keys between the same two tables.
In production ERPs, distinct business roles between (SalesOrder, Account) coexist on every document:
- Logo Tiger (
ORFICHE/INVOICE): referencesCLIENTREF(bill-to legal debtor) alongsideRECVREF/TESLIMCARIREF(ship-to physical consignee), whileSTLINEcarries parallel links to both the order (ORDFICHEREF/SIPREF) and dispatch note (STFICHEREF/IRSREF). - SAP S/4HANA (
VBPA): binds separateCustomer(KNA1) roles (AGSold-to,WEShip-to,REBill-to,RGPayer) to oneSalesOrder(VBAK).
Each real-world relationship is declared as an independent LinkType with two explicitly named traversal sides—eliminating redundant reverse link definitions and rejecting ambiguous unnamed joins at compile time:
export const OrderBilledToAccountLink = { linkTypeId: 'sales_order_billed_to_account', cardinality: 'MANY_TO_ONE', sourceSide: { objectType: 'SalesOrder', apiName: 'billedToAccount' }, targetSide: { objectType: 'Account', apiName: 'billedOrders' }, }; export const OrderShippedToConsigneeLink = { linkTypeId: 'sales_order_shipped_to_consignee', cardinality: 'MANY_TO_ONE', sourceSide: { objectType: 'SalesOrder', apiName: 'shippedToConsignee' }, targetSide: { objectType: 'Account', apiName: 'consignedOrders' }, }; 4. Polymorphic Interfaces Across Heterogeneous ERPs
Multi-entity industrial holdings often run SAP S/4HANA at headquarters, Logo Tiger at a fabrication plant, Netsis at a chemical subsidiary, and Odoo for European distribution. Abstract Interface contracts (Facility, CommercialOrder, Party) specify shared properties, link-type roles, and supported ActionTypes without duplicating rows into a central ETL warehouse table:
interface CommercialOrder { canonicalOrderId: String @primary documentNumber: String orderDate: Date normalizedNetEur: Decimal(18, 2) fulfillmentState: Enum<OPEN | PARTIAL | HOLD | COMPLETED | CANCELLED> originFacility: Link<Facility> billedToParty: Link<Party> shippedToParty: Link<Party> requiresAction: ActionType<release_credit_blocked_sales_order> } Concrete SapSalesOrder, LogoTigerSalesOrder, NetsisSalesOrder, and OdooSalesOrder object types implement CommercialOrder over live read replicas—so onboarding a new subsidiary requires zero agent prompt rewrites.
5. Deterministic Functions + HMAC-Signed FunctionOutputRef Handoff
Token prediction must never compute base-10 tier discounts, official central-bank FX rates, statutory VAT withholding (KDV tevkifat), or Available-to-Promise (ATP) netting (grossPhysical - qmsQuarantine - hardReserved).
| Step | Runtime Layer | Responsibility |
|---|---|---|
| 1. Intent Extraction | LLM over MCP | Resolves Account, Facility, MaterialItem, and shippedToConsignee parameters |
| 2. Exact Computation | Ontology Function (Decimal) | Computes ATP & tax totals in fixed-point math and emits an HMAC-SHA256 FunctionOutputRef |
| 3. Governed Commit | Declared ActionType | Verifies HMAC signature + pre-flight invariants, awaits out-of-band human nonce, calls ERP API |
Read the complete specification (including sequence diagrams, full TypeScript decimal.js implementation, and bilingual TR/EN glossary references) at ontoloji.org/en/guides/operational-ontology-action-types-multi-role-links-and-interfaces.