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
In the platform today
- 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.pyandfunctions.tsas 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
- 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
| Concept | Type level | Instance level | Changed by |
|---|---|---|---|
| Object | Object type | Object, one per primary key | Source data through sync, or actions |
| Property | Property with a base type or value type | A value on an object version | Source data, actions, or computed at read time |
| Link | Link type with two sides | A pair of primary keys, or a join object | Foreign keys in data, join tables, actions |
| Action | Action type | An applied action, recorded in the action log | People, apps, automations, approved agent proposals |
| Function | Function | A published version and its executions | Developers, through releases |
| Interface | Interface | None; a view over implementers | Ontology 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
| Backing | Cardinality | Stored as | Example |
|---|---|---|---|
| Foreign key | One to one, many to one | A property on one side holding the other side's primary key | QA test.equipmentId → Equipment |
| Join table | Many to many | A dataset of key pairs, one row per link | Reefer delivery ↔ Scoop shop |
| Join object | Many to many with data | An object type between the two, linked many to one to each side | Lot 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
- Resolve. Load the action type at the ontology's current revision and check the caller's permission to apply it
- 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
- Compute. Run the rules, or call the edit function, against a snapshot of the touched objects
- Commit. Write the edits with optimistic concurrency, append the action log entry and the outbox rows in one transaction
- 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
| Mechanism | Scope | What it does | Example |
|---|---|---|---|
| Roles | Ontology, project, resource | Grant Viewer, Editor, Owner or Administrator rights, or a custom role, to groups | Plant planners are Editors on the production project |
| Row access | Rows of an object type | A policy that filters which objects a user can see | region = user.region on Wholesale customer |
| Field access | Columns of an object type | Hide or mask properties for groups | costPerRun hidden from shop leads and auditors |
| Access labels | Data, wherever it flows | Required labels; a user must hold every access label on data to see it | QUALITY 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
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
| Identifier | Format | Mutable | Used by |
|---|---|---|---|
| ID | Lowercase letters, digits and dashes for types, links and actions, e.g. delivery-stop; camelCase for properties and link sides, e.g. shopId | Never | YAML, REST paths, functions, resource names |
| Client class name | A type's ID in PascalCase, made by the client generator, e.g. DeliveryStop | Never, because it follows the ID | Generated SDKs, functions |
| Display name | Free text in sentence case, plus a plural, e.g. "Scoop shop", "Scoop shops" | Any time | Every screen, the Assistant, search |
| Aliases | Extra search terms, e.g. "store", "parlour" | Any time | Search and the Assistant's entity resolution |
| Resource name | msrn:ontology:<tenant>:object-type/delivery-stop | Never | Policies, audit entries, cross-ontology references |
| Primary key | The source key, e.g. DLV-5521/2 | Never, per object | Object lookups, links, edits |
| Action log ID | ULID with a prefix, e.g. alog_01J9Z7K3… | Never | Audit, reverts, decision lineage |
The REST API addresses objects by object type ID and primary key, and links by link type ID