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: email can be required by Contact and optional for Customer.
  • 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.

json
{
  "_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, _created and _modified; clients can't overwrite them. _version can be sent back as a concurrency token.
  • _interfaces lists 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.

In the portal, one entity's perspectives are tabs. First Name and Last Name are the same values on every tab.
One record, three perspectives
Thabo is a contact, a customer and a member of staff: one record, with a tab for each perspective, his manager as a lookup and his reports in a sub-grid.

Thabo is a contact, a customer and a member of staff: one record, with a tab for each perspective, his manager as a lookup and his reports in a sub-grid.

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 _interfaces must 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:

json
{
  "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.