Concepts
Entities and perspectives
An entity can be a Contact, a Customer and a Staff member at once: how perspectives work.
OmniCore's model has three parts: fields, perspectives and entities. What makes it different is that an entity can implement any number of perspectives at once, and they share its fields.
Fields
A field is a named, typed value in a global field catalogue: for example creditLimit, a Decimal shown as
Credit Limit. Every perspective that needs a credit limit uses the same field. See Fields and types.
Perspectives
A perspective (the API calls it an interface) is a named, ordered set of fields. Customer might be account
number, first name, last name, email and credit limit.
- Each perspective says which of its fields are required. Requiredness belongs to the perspective, not the field:
emailcan be required byContactand optional forCustomer. - Each perspective has a stable id (a GUID), which can be used anywhere its name is accepted. Views, forms and relationships refer to perspectives by id, so renaming a display name doesn't break them.
- Views, forms, permissions and workflow triggers are all per perspective.
Entities
An entity is a JSON document: metadata, then field values keyed by their system names.
{
"_id": "5f0c1b8e-2a43-4d0a-9d0e-0b6a1b9a7c11",
"_version": 3,
"_created": "2026-11-21T09:14:03.2214Z",
"_modified": "2026-11-21T10:02:41.0071Z",
"_interfaces": ["Contact", "Customer", "Staff"],
"firstName": "Ann",
"lastName": "Smith",
"email": "ann@example.com",
"accountNumber": "C-1001",
"creditLimit": 5000,
"employeeId": "E-042"
}- Metadata keys start with
_. The server sets_id,_version,_createdand_modified; clients can't overwrite them._versioncan be sent back as a concurrency token. _interfaceslists the perspectives the entity implements.- Everything else is a field. Field names can't start with
_.
Shared fields
Because fields are global, an entity that is both a Contact and a Customer has one firstName, which both
perspectives' forms show. Change it through either, and both see the change. There's nothing to synchronise.
Adding and removing perspectives
- Adding a perspective to an entity checks its required fields like any write. In the portal, Add perspective asks only for the required fields the entity doesn't already have.
- Removing a perspective keeps the field values: other perspectives may share them, and adding it back restores the perspective with its data.
- Removing the last perspective deletes the entity. An entity exists only through its perspectives. The delete is checked against relationships like any other.
Validation
Every write is checked against the schema:
- every perspective named in
_interfacesmust exist (names ignore case; ids are accepted too); - every field must exist, be spelled exactly as defined, and hold a value of its type;
- every field that an implemented perspective marks as required must be present and not blank.
All problems are reported together, and nothing is written if any check fails:
{
"title": "Entity failed schema validation",
"status": 400,
"errors": ["Interface 'Customer' requires field 'accountNumber' (Account Number)."]
}Making a field required doesn't re-check entities already stored; they fail validation on their next save.
Concurrency
Every entity has a version, returned as an ETag. Send it back as If-Match (or as _version in the body) and a
write made against an older version is refused, rather than overwriting someone else's change. Without either, writes
are still atomic, but the last writer wins. The portal always sends the version it read.
Related
- Relationships
- Roles and permissions, which work per perspective
- REST API: entities