Skip to main content

Commons Reference

The platform ships with a set of built-in classes in the commons namespace. These are always available to all tenants. Your custom classes can inherit from them or extend them.

Inheritance tree

commons.item (ABSTRACT)
├── commons.entity (ABSTRACT)
│ ├── commons.person (BASIC)
│ │ └── commons.employee (ABSTRACT)
│ └── commons.company (BASIC)
│ ├── commons.groupCompany (ABSTRACT)
│ └── commons.counterparty (ABSTRACT)
├── commons.dossier (ABSTRACT)
│ ├── commons.agreement (ABSTRACT)
│ │ ├── commons.employmentAgreement (BASIC)
│ │ └── commons.generalAgreement (BASIC)
│ ├── commons.taxAndFinance (ABSTRACT)
│ │ └── commons.taxDossier (BASIC)
│ └── commons.generalDossier (BASIC)
├── commons.content (ABSTRACT)
│ ├── commons.document (BASIC)
│ ├── commons.memo (BASIC)
│ └── commons.task (BASIC)
├── commons.territory (ABSTRACT)
│ ├── commons.superTerritory (ABSTRACT)
│ ├── commons.country (BASIC)
│ └── commons.region (BASIC)
└── commons.taxPeriod (BASIC)

Why use commons classes

Build on commons classes wherever possible, rather than creating entirely custom class hierarchies. The platform and the web application recognize commons types and treat them accordingly:

  • Specialized UIcommons.document objects are rendered with a document viewer and file management UI. commons.memo objects get a rich-text editor. Using these classes gives you that behaviour for free; a generic custom class does not.
  • Platform modules — certain features are activated automatically based on type. For example, a company verification module can look up and validate commons.company objects against external registries such as the Dutch KvK. This integration only works because the platform knows the object is a company.
  • Interoperability — relations, scripts, and views across the platform use commons types as shared vocabulary. A relation typed to commons.entity accepts both persons and companies without any extra configuration.

When a commons class does not cover all the fields you need, extend it with an EXTENSION class or inherit from it with a custom ABSTRACT or BASIC class — rather than bypassing it entirely.


The name field

Every class inherits the name field (TEXT, required) from commons.item. It is the primary display identifier used throughout the platform: in list views, relation pickers, page titles, and search results.

name is almost always computed via a formula — it is rarely entered manually by users. Define a formula that produces a meaningful human-readable label for each object:

"formulas": [
{ "valueType": "name", "template": "{{firstName}} {{lastName}}" }
]

Common patterns:

Object typeRecommended formula
Person / contact{{firstName}} {{lastName}}
Memo, task, ticket{{title}} or {{subject}}
Agreement, dossierBased on related parties or a descriptive field
Document, invoiceGenerated reference number via identifier()

name is not unique. Multiple objects can have the same name. If you need a unique identifier (e.g. an invoice number), generate it in a separate field using the identifier() formula function and store it there — do not rely on name for uniqueness.

The label of name can be overridden per class in translations. A ticket class might display it as "Ticket reference", a document as "Title". See Translations.


Core classes

commons.item

Type: ABSTRACT | Inherits: — (root)

The root of the entire class hierarchy. Every class eventually inherits from commons.item.

Value types:

FieldTypeRequiredDescription
nameTEXTyesDisplay name of the object. Typically computed by a formula.

commons.entity

Type: ABSTRACT | Inherits: commons.item

Base class for persons and companies — anything that can be a party in a legal or business relationship.

No additional value types beyond commons.item.


commons.person

Type: BASIC | Inherits: commons.entity

Represents a natural person.

Value types:

FieldTypeRequiredDescription
firstNameTEXTnoFirst name
lastNameTEXTyesLast name
emailAddressEMAILnoEmail address
birthdateDATEnoDate of birth (disabled by default)

Formulas:

  • name = {{firstName}} {{lastName}}

Scripts:

  • invite (consumerGateway, MANUAL) — sends a user invitation via email

commons.employee

Type: ABSTRACT | Inherits: commons.person

An abstract class added to a person when they are linked as an employee on an employment agreement.


commons.company

Type: BASIC | Inherits: commons.entity

Represents a legal entity or organization.

No additional value types beyond commons.entity.


commons.groupCompany

Type: ABSTRACT | Inherits: commons.company

An abstract class used to mark a company as the internal group company (the "our side") in agreements. Used as a relation type on commons.generalAgreement.


commons.counterparty

Type: ABSTRACT | Inherits: commons.entity

An abstract class used to mark an entity as the external party in an agreement. Used as a relation type on commons.generalAgreement.


commons.dossier

Type: ABSTRACT | Inherits: commons.item

Base class for all dossier types. A dossier has an active period.

Value types:

FieldTypeRequiredDescription
activeDateDATEnoStart date (labeled "start date")
inactiveDateDATEnoEnd date (labeled "end date")

commons.agreement

Type: ABSTRACT | Inherits: commons.dossier

Base class for agreements and contracts. No additional value types beyond commons.dossier.


commons.employmentAgreement

Type: BASIC | Inherits: commons.agreement

An employment agreement between a company and an employee.

Value types:

FieldTypeRequired
jobTitleTEXTyes

Formulas:

  • name = {{jobTitle}}

Relations:

RelationTypeRequiredMultiple
Companycommons.companyyesno
Employeecommons.employeeyesno

Scripts:

  • complete (functionGateway, MANUAL) — extracts job title and dates from attached documents using OpenAI

commons.generalAgreement

Type: BASIC | Inherits: commons.agreement

A generic agreement between an internal group company and an external counterparty.

Relations:

RelationTypeRequiredMultiple
Group companycommons.groupCompanyyesno
Counterpartycommons.counterpartyyesno

commons.taxAndFinance

Type: ABSTRACT | Inherits: commons.dossier

Base class for tax and finance dossiers. Adds a required relation to an entity.

Relations:

RelationTypeRequiredMultiple
Entitycommons.entityyesno

commons.taxDossier

Type: BASIC | Inherits: commons.taxAndFinance

A dossier for tax-related cases.

Value types:

FieldTypeRequired
taxTypeTEXTyes

Formulas:

  • name = {{taxType}}

Relations:

RelationTypeRequiredMultiple
Entitycommons.entityyesno
Tax periodcommons.taxPeriodyesno

commons.generalDossier

Type: BASIC | Inherits: commons.dossier

A generic dossier type for cases that do not fit a more specific class.

Relations:

RelationTypeRequiredMultiple
Entitycommons.entityyesno

commons.content

Type: ABSTRACT | Inherits: commons.item

Base class for content items — objects that belong to a dossier. Documents, memos, and tasks all inherit from this class.

Relations:

RelationTypeRequiredMultiple
Dossiercommons.dossieryesno

commons.document

Type: BASIC | Inherits: commons.content

A file attachment. Documents are linked to a dossier via the inherited commons.dossier relation.

Value types:

FieldTypeRequiredDescription
fileFILEyesThe uploaded file
dateDATEnoDate on the document
documentNumberTEXTnoAuto-generated document number
abstractTEXTBLOCKnoAI-generated summary
contentTEXTBLOCKnoExtracted text content (hidden)

Formulas:

  • documentNumber = DOC{{identifier('documentNumber')}}

Scripts:

  • summarize (functionGateway, triggered on file update) — extracts a short summary and document date from the file using OpenAI

commons.memo

Type: BASIC | Inherits: commons.content

A free-text note linked to a dossier.

Value types:

FieldTypeRequiredDescription
titleTEXTyesMemo title
memoTEXTBLOCKyesMemo body

Formulas:

  • name = {{title}}

Relations: (inherited from commons.content)

RelationTypeRequired
Dossiercommons.dossieryes

commons.task

Type: BASIC | Inherits: commons.content

A task or action item linked to a dossier, optionally assigned to a person.

Value types:

FieldTypeRequiredDescription
titleTEXTyesTask title
dueDateDATEnoDue date

Formulas:

  • name = {{title}}

Relations:

RelationTypeRequiredMultipleDescription
Dossiercommons.dossieryesnoInherited from commons.content
Assigneecommons.personnonoPerson responsible for this task

commons.territory

Type: ABSTRACT | Inherits: commons.item

Base class for geographic entities such as countries and regions. No additional value types beyond commons.item.


commons.superTerritory

Type: ABSTRACT | Inherits: commons.territory

An abstract marker class for large geographic groupings (e.g. continents, economic zones) that sit above countries in a hierarchy.

The platform includes a commons.territoryHierarchy EXTENSION class that adds a superTerritory relation to every commons.territory. This extension must be explicitly imported in your index.json to activate the hierarchy:

{
"class": "my-project.index",
"type": "NONE",
"imports": [
"commons.territoryHierarchy"
]
}

Once imported, any territory (country, region, or super territory) can be linked to one or more parent territories:

RelationTypeRequiredMultiple
Super territorycommons.superTerritorynoyes

commons.country

Type: BASIC | Inherits: commons.territory

Represents a country. Comes with built-in default data for a set of common countries.

Value types:

FieldTypeRequiredDescription
countryCodeTEXTnoISO country code (e.g. NL, DE)

Default data: NL, DE, BE, FR, ES, IT, GB, LU, US, CA — loaded via POST /data/{tenantId}/loadDefaultData.


commons.region

Type: BASIC | Inherits: commons.territory

Represents a geographic region within a country or territory. No additional value types beyond commons.territory.


commons.taxPeriod

Type: BASIC | Inherits: commons.item

Represents a tax period. Standalone item not tied to the dossier hierarchy.


Extending commons classes

You can add fields to any commons class using an EXTENSION class:

{
"class": "my-project.person",
"type": "EXTENSION",
"extends": "commons.person",
"valueTypes": [
{ "name": "taxNumber" },
{ "name": "nationality" }
]
}

This adds taxNumber and nationality to every commons.person in the tenant.