Core concepts

The Ontology has a small vocabulary, and every other page in these docs builds on it. This page defines each term once, shows how the pieces relate at the type level and the instance level, and points to the page that covers each one in depth. Read it once end to end and the rest of the documentation will read as detail

TypesDefinitions held in the Ontology registry as immutable revisions
InstancesObjects, links and log entries held in the object store
ChangeActions for data, proposals for definitions
ControlRoles, row and column policies, and access labels on every read

In the platform today

Built
  • Object types, properties, link types, action types and functions run in the platform service with tests, with interfaces, shared properties and value types, defined in ontology.yaml, functions.py and functions.ts as described in Object types; objects are synced from backing tables and changed by actions
  • Change sets on the Model changes screen are the built form of branches and proposals
On request
  • Roles, masking, numbered revisions and the function runtime's isolates; each page has its own note

The model at a glance

Every concept in the Ontology exists at two levels. A type is a definition: it says what shape something has, where its data comes from and who may change it. An instance is a concrete thing that conforms to a type. Types are authored by ontology builders, reviewed in proposals and stored in the Ontology registry. Instances are produced by the sync service from your data, or created by actions, and stored in the object store

Keeping the two levels apart is what lets the platform evolve a definition without rewriting history. When you add a property to Raw milk silo, the registry records a new revision of the type. Existing objects keep their versions; the sync service backfills the new column, and readers that pinned the old revision keep working until they upgrade

Type level · ontology registry Instance level · object store Object typeSilo · key siloId · 4 objects Link typepickup-silo · Pickup → Silo, many to one Action typeplace-hold · 2 parameters · 2 rules Functionweekend_cover · Python · 2.3.1 Interfacecold-storage-asset · 3 implementers ObjectsSIL-2, version 4182, updatedAt 16:00 LinksPU-2226 unloaded to SIL-2 Action log entriesalog_01J9Z7K3… · edits, caller, reason Function executionsinputs, output, version, duration Interface viewsno data of their own
Definitions on the left are versioned in the registry; instances on the right are versioned in the object store. An interface has no instances of its own, only views over the objects of the types that implement it
ConceptType levelInstance levelChanged by
ObjectObject typeObject, one per primary keySource data through sync, or actions
PropertyProperty with a base type or value typeA value on an object versionSource data, actions, or computed at read time
LinkLink type with two sidesA pair of primary keys, or a join objectForeign keys in data, join tables, actions
ActionAction typeAn applied action, recorded in the action logPeople, apps, automations, approved agent proposals
FunctionFunctionA published version and its executionsDevelopers, through releases
InterfaceInterfaceNone; a view over implementersOntology builders, through proposals

Objects and object types

An object type defines one kind of thing the operation tracks: a Raw milk silo, a Production batch, a Reefer delivery, a Scoop shop. An object is one instance of it, identified by a primary key that comes from the source system, such as SIL-2 for the second raw milk silo or B-0841 for a batch of tubs on Line 2. The key must be unique and stable for the life of the object, because links, edits and the action log all refer to it

Each object type is backed by one or more backing datasets: open tables with one row per object, produced by a pipeline. A type can also be action-only, with no backing data at all, when its objects are created entirely by actions. Incident reports and approval records are often modelled this way

Every object carries a monotonic _version and an _updatedAt timestamp. The version increases with every change from either the source or an action, and _edited lists the properties whose current value came from an action. On request, actions use the version for optimistic concurrency, so an edit computed against version 4182 fails if the object has moved on, and each object also carries its resource name in _msrn. This is what the API returns for one object

{
  "_key": "SIL-2",
  "_type": "silo",
  "_title": "Silo 2",
  "_version": 4182,
  "_updatedAt": "2026-10-29T19:00:00.000Z",
  "_edited": [],
  "siloId": "SIL-2",
  "name": "Silo 2",
  "capacity": 40000.0,
  "volume": 18600.0,
  "temp": 3.4,
  "hoursSinceReceipt": 64.0,
  "status": "Holding",
  "limitAt": "2026-10-30T03:00:00Z"
}

Properties and value types

A property is a typed attribute of an object type. Its base type is one of a fixed set: string, integer, long, decimal, double, boolean, date, timestamp, geopoint, geoshape, struct, array, vector, attachment, media, time series and access label. A value type wraps a base type with meaning and a constraint, so temperature-c, Temperature °C, is a double between −60 and 100, and a lot code is a string that matches LOT-[0-9]{4}-[0-9]+. A value type is defined once and reused across properties, action parameters and pipeline outputs

Properties can be required (null fails indexing and fails any action that writes it), action-only (no source column; values come only from actions) or derived (computed at read time from linked objects, never stored). Up to 2,000 properties are allowed per object type by default, and a single value can be up to 5 MB. See Properties and value types

Links and object sets

A link type is a named relationship between two object types. It has two sides, each with its own ID and cardinality, so the same link, pickup-silo, reads as "Unloaded to" from a milk pickup and "Loads received" from a silo. A link is one instance of it. There are three ways to back a link type, and the choice follows from the cardinality and from whether the relationship carries data of its own

BackingCardinalityStored asExample
Foreign keyOne to one, many to oneA property on one side holding the other side's primary keyQA test.equipmentId → Equipment
Join tableMany to manyA dataset of key pairs, one row per linkReefer delivery ↔ Scoop shop
Join objectMany to many with dataAn object type between the two, linked many to one to each sideLot between batch and delivery, with units and where the lot is

An object set is a description of a group of objects of one type: a starting type, filters, link traversals and an ordering. Object sets are lazy. Building one costs nothing; the object query service evaluates it only when you fetch a page, count it or aggregate it. Because an object set is a description rather than a list, it can be saved, shared, passed to a function or used as an action parameter, and it always reflects current data when evaluated

Traversing a link turns a set of one type into a set of another. In the SDK this is follow, and a single query may traverse up to 3 hops. Each hop is applied after the reader's security policies, so a follow can never reach objects the reader could not have loaded directly. See Link types and Object sets

// Batches on hold, and the deliveries carrying their lots
// that have not left
const exposed = mso.objects("batch")
  .where({ qaStatus: "On hold" })
  .follow("lot-batch")             // link type ids
  .follow("lot-delivery")
  .where({ status: { $in: ["Scheduled", "Loading"] } });

const count = await exposed.count();   // evaluated here, not above

Actions and functions

An action type is the only sanctioned way to change objects. It bundles four things

  • Parameters. Typed inputs, including object references and object sets
  • Action conditions. Conditions on the caller, the parameters and the objects that must all hold
  • Rules. The edits to make, such as create, modify or delete objects, and add or remove links
  • Side effects. Notifications, webhooks and writeback to source systems

Instead of rules, an action can delegate the edit computation to a function

Applying an action is one transaction. The action service validates the parameters, evaluates the criteria, computes every edit, checks each touched object's version and commits all of it or none of it. In the same transaction it appends an entry to the action log and enqueues side effects in an outbox, so a committed action always has a log entry and always gets its writeback attempted. By default one action can produce up to 10,000 edits

  1. Resolve. Load the action type at the ontology's current revision and check the caller's permission to apply it
  2. Validate. Check every parameter against its base type, value type and constraints, then evaluate all action conditions and report every failure, not only the first
  3. Compute. Run the rules, or call the edit function, against a snapshot of the touched objects
  4. Commit. Write the edits with optimistic concurrency, append the action log entry and the outbox rows in one transaction
  5. Deliver. Send writeback to the system of record and fire notifications and webhooks from the outbox, with retries

A caller can ask for a validate-only run, which does the first three steps and commits nothing. Apps use it to show the form's errors and a before and after preview. See Action types, Action conditions and Writeback

Functions

A function is versioned logic over the Ontology, written in TypeScript or Python against the same generated client the SDK uses. Functions come in two kinds. A query function reads objects and returns a value, such as weekend_cover(shopId), which returns a shop's demand Friday to Sunday against its stock and the deliveries that land in time, by flavour. An edit function reads objects and returns a list of edits; it never writes on its own, and only an action that names it as its rule applies those edits

Functions run in the function runtime with the caller's permissions, each TypeScript call in its own restricted process, 5 s and 128 MB by default. On request, TypeScript runs in V8 isolates and Python in sandboxed containers, with a 60 s default timeout (raisable to 300 s) and 1 GB of memory. Every function is published under a semantic version and is immutable once published. Callers pin a version range such as ^2.3, so a breaking change ships as a new major version without disturbing existing consumers

Functions read with the permissions of whoever called them. A function called by a planner sees exactly the shops, batches and properties that planner can see, and an action that wraps a function checks the caller's right to apply the action, not a separate right to run the function. See Functions overview

Interfaces

An interface is a shape that several object types share: a set of interface properties, optional required links and optional required actions. An object type implements an interface by mapping each interface property to one of its own properties. Interfaces have no data of their own; querying one returns the objects of every implementing type, presented through the interface's properties

The ice cream maker has four kinds of refrigerated thing: raw milk silos, the plant's cold rooms and freezers, shop freezers and reefer trucks. Each is its own object type with its own properties, but all four implement temperature-controlled, which exposes temperature and setpoint; silos, equipment and shops also implement cold-storage-asset, which extends it with assetName, fill and lastReadingAt. A temperature excursion monitor written against temperature-controlled works for all four, and a fifth type joins it by implementing the interface, with no change to the monitor

A shared property is the smaller version of the same idea: one property definition, with one name, description, base type and formatting, reused across many object types. See Interfaces and shared properties

Security

Security in the Ontology is evaluated on every read, by the object query service, for every caller. There is no second path to the data that skips it. Four mechanisms combine

MechanismScopeWhat it doesExample
RolesOntology, project, resourceGrant Viewer, Editor, Owner or Administrator rights, or a custom role, to groupsPlant planners are Editors on the production project
Row accessRows of an object typeA policy that filters which objects a user can seeregion = user.region on Wholesale customer
Field accessColumns of an object typeHide or mask properties for groupscostPerRun hidden from shop leads and auditors
Access labelsData, wherever it flowsRequired labels; a user must hold every access label on data to see itQUALITY on QA test results

Access labels propagate. A dataset derived from a QUALITY table carries the access label, and so does any object type it backs and any derived property computed from those objects. An agent always acts on behalf of a named person and reads with that person's access, never more. See Access model and Access labels

Readers can see different values

Because security applies per row and per property, two people running the same query can get different results. A derived property such as "open deliveries for this shop" counts only the deliveries the reader can see. This is intended, and it is why counts in shared screenshots can differ from your own

Change control

Data and definitions change through different doors. Data changes through actions, applied to main one transaction at a time. Definitions change through branches and proposals in the Ontology registry. A branch is an isolated copy of the ontology's definitions, cut from a revision of main. A proposal is the review of a branch: each changed resource is reviewed on its own, with automated checks, comments and a merge. Merging a proposal produces a new immutable revision of the ontology

Resources marked protected can only change through a merged proposal, which is the default for every live object type. Each resource carries a status: draft, live or retiring. Live resources cannot be deleted, and IDs never change, because apps and generated clients depend on them. See Branches and proposals

Identifiers and names

Every resource has several names, each with a job. Use the right one in the right place and nothing breaks when a display name is reworded

IdentifierFormatMutableUsed by
IDLowercase letters, digits and dashes for types, links and actions, e.g. delivery-stop; camelCase for properties and link sides, e.g. shopIdNeverYAML, REST paths, functions, resource names
Client class nameA type's ID in PascalCase, made by the client generator, e.g. DeliveryStopNever, because it follows the IDGenerated SDKs, functions
Display nameFree text in sentence case, plus a plural, e.g. "Scoop shop", "Scoop shops"Any timeEvery screen, the Assistant, search
AliasesExtra search terms, e.g. "store", "parlour"Any timeSearch and the Assistant's entity resolution
Resource namemsrn:ontology:<tenant>:object-type/delivery-stopNeverPolicies, audit entries, cross-ontology references
Primary keyThe source key, e.g. DLV-5521/2Never, per objectObject lookups, links, edits
Action log IDULID with a prefix, e.g. alog_01J9Z7K3…NeverAudit, reverts, decision lineage

The REST API addresses objects by object type ID and primary key, and links by link type ID

GET /api/v2/types/silo/objects/SIL-2
GET /api/v2/types/silo/objects/SIL-2/links/pickup-silo
POST /api/v2/actions/place-hold:run

Related