Multi-tenancy configuration
The applications, record fields and table settings that configure multi-tenancy, with their values and defaults.
This page lists what configures multi-tenancy: the applications, the fields of the two tenancy records and the settings on each table. You need the administrator role, and the records are under Access & security → Tenancy in the Administration workspace. Multi-tenancy explains realms, tenants and providers.
Applications
Installing an application filters nothing on its own. Nothing is filtered until a System tenancy configuration is Active and its Script applies to the user.
| Application | Adds |
|---|---|
| Tenancy Core | System tenancy configuration, the Tenancy menu section and the Self service provider. You do not install it yourself. It is installed with either hierarchy application. |
| Tenancy — Realm Hierarchy | System realms and the Realm hierarchy provider. |
| Tenancy — Company Hierarchy | The Company hierarchy provider. |
System tenancy configuration fields
A configuration applies one provider to the users its script selects. Servicely supplies one configuration, “Test base configuration”, which is inactive.

| Field | Type | Required | Behaviour | Purpose |
|---|---|---|---|---|
| Name | Text | No | Must be unique. | Identifies the configuration. |
| Provider | Choice | No | Offers Self service, and Realm hierarchy or Company hierarchy when its application is installed. | The filter to apply. |
| Active | Yes or no | No | Default: Yes. Servicely ignores an inactive configuration. | Turns the configuration on. |
| Order | Number | No | Default: 10. Configurations are read lowest first, and every one that applies adds its provider. | Orders the configurations. |
| Description | Text | No | None. | What the configuration is for. |
| Script | Script | No | Applies the configuration to the current user unless it sets answer to false. An empty script, any other value and an error all apply it. |
Decides which users are filtered. |
System realm fields

| Field | Type | Required | Behaviour | Purpose |
|---|---|---|---|---|
| Name | Text | No | Must be unique. | The realm’s name. |
| Parent | Reference (System Realm) | No | A realm with no parent starts a tree, and you can have several trees. When you change it, Servicely renumbers the realm and the realms below it, then corrects the records of those realms in a queued job. | Places the realm in the tree. |
| Full path | Text | No | Read-only. Set by the system. | The realm’s path from the top of its tree. |
| Active | Yes or no | No | Default: Yes. | Whether the realm is in use. |
| Realm hierarchy require role | List (Role) | No | When it lists roles, only users who hold one of them see this part of the tree. | Limits a part of the tree to a role. |
| Realm selection require role | List (Role) | No | When it lists roles, the header drop-down offers the realm only to users who hold one of them. The realms below it inherit the restriction. | Limits who can switch to the realm. |
| Child SystemRealms | List (System Realm) | No | On the Child realms tab. | The realms directly below this one. |
| Realm hierarchy visibility for Users | List (User) | No | On the Visibility tab. | Users who see this realm although it is outside their own part of the tree. |
| Realm hierarchy visibility for Groups | List (Group) | No | On the Visibility tab. | Groups whose members see this realm in the same way. |
| External key | Text | No | On the Advanced tab. Must be unique. | The realm’s ID in another system. |
| CIDR | CIDR | No | On the Advanced tab. Set by the system, so that a realm’s range contains the ranges of the realms below it. | The address range Servicely filters by. |
| Custom child subnet bitshift | Number | No | On the Advanced tab. Overrides the application property system.realm.default_bitshift, which is 16 by default, for the realms directly below this one. |
The number of bits that number this realm’s child realms. |
Table settings
Realm hierarchy filters a table only when Is realm separated? is Yes on its table definition. The table then gets two fields that Servicely manages, System Realm and System Realm CIDR. Company hierarchy needs no setting: it filters every table that has a Company field.
These table properties tune a filtered table. In a table hierarchy such as Work and Incident, each table can have its own.
| Property | Default | Effect |
|---|---|---|
tenancy.filter_direction |
down |
The direction a user sees along the tree: down, up or both. It applies to both hierarchy providers. |
realm.evaluate |
Empty | A field path, for example Company.SystemRealm. Servicely sets the record’s realm from that field when the field changes, so no trigger is needed. |
tenancy.sync_relations |
Empty | A comma-separated list of relationship names, for example WorkTimeCards,RelatedSLA. When the record’s realm changes, Servicely copies it to those related records. An entry written Table:Field reaches every record of that table whose field refers to this record. |
Scripts that renumber realms or correct records are in RealmUtils in the API reference.