Information Model Levels
Klok information models describe business information with the precision needed to exchange and use it across systems. They are operational information models for integration: field names, data types, required fields, allowed values and business meanings are explicit. Shared models describe the business rather than copying one system's internal structure; system models describe the representations used at the edges.
The models themselves are distinct from their model levels (A/public, B/common, C/domain, X/system) and the design rules for information models. Those rules govern broker use, naming, schema evolution and model structure. Simple-type fields at the root (the first level) are what Klok ODL services list and filter on; choose root fields deliberately to support searching and indexing (see Using Datamodels In The ODL).
The Four Model Levels
Every datamodel belongs to one of four classes (decided 2026-09-29). All four may be sent over the broker. The class says how widely a model is shared, where it lives in Git, whether it needs an XSD and how strict its stability is: the wider the scope, the stricter. The reasoning is in the governing principles, in Datamodel classes. How to create a model is in Creating A Datamodel.
| Class | Name | Scope | Git location | Schema | Stability |
|---|---|---|---|---|---|
| A | Public | Other tenants and outside parties | <tenant>/datamodel/public/<model> |
XSD in its own repository | Strictest: at least 12 months of deprecation, every reader notified |
| B | Common | Across the tenant's domains | <tenant>/datamodel/common/<model> |
XSD in its own repository | Changes coordinated across domains; at least 3 months of deprecation |
| C | Domain | One business domain | <tenant>/datamodel/domain/<domain>/<model> |
XSD in its own repository | Changes decided within the domain |
| X | System | One external system | <tenant>/datamodel/system/<system>/<model>, or plain Java in the integration |
No XSD required | Follows the external system |
Class X
Class X mirrors the format of one external system: a vendor's API, a CSV file, an IDoc, a database table or
target-specific XML. It changes when that system changes. Because the system's own documentation is the truth about the
format, a class X model does not need an XSD. It may be simple Java classes in the integration's own source, explained
there, or it may have a repository of its own under datamodel/system/<system>/ with an XSD, and then it gets the same
generated classes and documentation as the other classes.
Class X may be sent over the broker. A reader of a class X topic depends on the external system and has to follow its changes, which fits a flow that is about that system.
Use Class X:
- As input to an onramp and output from an offramp.
- On the broker, between routes that work with that one system.
- In tests for system adapter behavior.
- In system-specific documentation.
Avoid Class X:
- As the shared language between several systems or domains.
- In reusable domain contracts and integration solution interfaces.
- As a shortcut around modeling data that others will read.
Class C
Class C is owned by a domain. It can change faster than common or public models, and the domain decides its changes on its own. It still needs clear ownership and versioning. Use it when a model belongs to one domain and should not be treated as a tenant-wide language. When several domains need it, it probably belongs in class B.
Class B
Class B is the tenant's stable shared language. It is appropriate when several domains or solutions need the same contract. Class B changes are coordinated across the domains that read the model.
Class A
Class A is public or externally published. It needs the strictest compatibility discipline: a breaking change is a new major version, the old one runs longest, and every reader, including parties outside the tenant, is notified.
What Every Class Gets
Classes A, B and C, and class X when it has a repository with an XSD, get generated Java, Python and TypeScript classes
that are compatible on the wire over the broker, and documentation pages on docs.klok.dev generated from the XSD. The
documentation mirrors the Git structure: the model's documentation project is <tenant>/documentation/datamodel/<same path>, and the portal groups it by that path, such as klok / datamodel / public.
Design Rules: Transform At The Edge
Transform at the edge when data is shared beyond the system it came from:
- Onramp: Class X -> Class B or Class C.
- Processing: Class B/C -> Class B/C.
- Offramp: Class B or Class C -> Class X.
A class X model may be on the broker, but data that other systems or domains will read should travel as class B or C, so that replacing one system changes only its own onramp and offramp.