Tenant, Workspace & Domain
How FlowOS organises data across 1,151 tables — the three-layer hierarchy, collection naming, and the full cross-table relationship map.
Tenant
A tenant is the root isolation boundary in FlowOS. Every single database collection (table) is namespaced under a tenant ID. No data can ever cross tenant boundaries — queries, indexes, and API tokens are all scoped at the tenant level first.
In a SaaS deployment each customer organisation is one tenant. In a self-hosted enterprise deployment you typically have one tenant for the whole company, with multiple workspaces inside it.
tenantId field is present on every record in every sub-table across the platform. It is required, readonly, and set automatically at record creation. You cannot move a record between tenants.Workspace
A workspace is a configuration and data silo within a tenant. Workspaces have their own users, roles, workflows, apps, ITSM records, and settings. Most enterprise customers create one workspace per business unit or environment tier (e.g. prod, staging).
Like tenantId, the workspaceId field is stamped on every record in every table, is required and readonly, and all queries are automatically filtered by it based on the API token context.
X-Workspace: <slug> on every API request. Omitting it returns a 400. Each API token is bound to a specific workspace — it cannot read across workspaces even within the same tenant.Domain
A domain is a logical grouping that controls which module owns a table and which workspaces it is seeded into. Domains do not add an extra column to records — they are a metadata classification used during installation.
The domains table itself describes a tree of named environments (e.g. global → it → prod) used in domain-separation and scoped-app deployments.
| Field | Type | References | Description |
|---|---|---|---|
| name | string | — | Human name, e.g. "IT Production". |
| slug | string | — | URL-safe identifier. Unique. |
| description | string | — | Optional description. |
| parentId | reference | domains | Parent domain — enables a tree. Null for root. |
| path | string | — | Materialised path (global/it/prod). Read-only, auto-computed. |
| isActive | boolean | — | Whether this domain is currently active. |
| createdAt | date | — | Auto-set. |
| updatedAt | date | — | Auto-set. |
Domain Catalogue
Every system table belongs to exactly one domain:
| Domain | Tables | What it owns |
|---|---|---|
| itsm | 935 | All ITSM entity families (incident, problem, change, request, catalog) and their sub-tables |
| platform | 140 | Users, roles, workspaces, auth, workflows, apps, audit, webhooks, system config |
| data | 16 | DB Studio tables, data sources, import sets, transform maps, schema snapshots |
| observability | 15 | Health checks, monitoring, alerts, event correlations, synthetic tests |
| auth | 12 | Sessions, MFA, API keys, SSO/SCIM providers, ABAC policies |
| analytics | 10 | KPIs, performance samples, dashboards, report schedules |
| collaboration | 8 | Comments, conversations, knowledge base articles, messages |
| deployment | 7 | Deployment records, gates, windows, env promotions, rollback plans |
| integration | 5 | Connectors, webhooks, event bus, field map templates |
| cmdb | 1 | CMDB configuration items (activated per module install) |
| hr | 1 | Employee records (activated when HR module installed) |
| csm | 1 | Customer accounts (activated when CSM module installed) |
Collection Naming
All MongoDB collections start with root_ — enforced at application boot bycollection-guard.ts, which intercepts every Mongoose write and throws if the collection name does not start with root_. Within that constraint, three naming patterns are used:
| Pattern | Format | Used for |
|---|---|---|
| Tenant-scoped | root_<tenantId>_<tableName> | Core tables like users, roles — getCoreModel() in non-strict/legacy mode. |
| Workspace-scoped | root_<tenantId>_<workspaceId>_<tableName> | All 1,151 tables including sys_counters and sys_notifications — getWorkspaceModel() and getCoreModel() in strict mode. |
For example, the incidents table for tenant t_acme workspace ws_prod isroot_t_acme_ws_prod_incidents, and the counter table for the same workspace isroot_t_acme_ws_prod_sys_counters. Every table — including sys_* tables — follows the same pattern.
The 1,151 Tables
FlowOS ships 1,151 pre-defined table schemas across all domains. The bulk (935) belong to the ITSM domain and follow a repeating entity-family pattern. The rest are standalone platform, observability, auth, and integration tables.
| Family / Prefix | Count | Pattern |
|---|---|---|
| itsm_incident_ | 107 | Full extended sub-table set for incident management |
| itsm_change_ | 108 | Full extended sub-table set for change management |
| itsm_problem_ | 106 | Full extended sub-table set for problem management |
| itsm_request_ | 106 | Full extended sub-table set for service requests |
| itsm_catalog_ | 98 | Full extended sub-table set for service catalog |
| incident_ | 45 | Lighter standalone incident sub-tables (no itsm_ prefix) |
| change_ | 52 | Lighter standalone change sub-tables |
| problem_ | 44 | Lighter standalone problem sub-tables |
| request_ | 42 | Lighter standalone request sub-tables |
| catalog_ | 47 | Lighter standalone catalog sub-tables |
| release_ | 45 | Release management family |
| service_ | 38 | Service management family |
| Standalone tables | 313 | Platform, CMDB, auth, analytics, observability, deployment, etc. |
Universal Base Schema
Every one of the 935 ITSM sub-tables shares an identical set of ~70 base fields. Only the status choices and a single entity-specific parent reference differ between them. This design means you can query, filter, sort, and relate any ITSM sub-table using the same field names.
Identity fields
| Field | Type | References | Description |
|---|---|---|---|
| name | string | — | Primary display name. Required. |
| displayName | string | — | Alternate display label. |
| code | string | — | Short machine-friendly code. |
| number | string | — | Human-readable auto-number (e.g. INC-0042). |
| externalId | string | — | ID in an upstream system (for import/sync). |
| sourceSystem | string | — | Name of the upstream system that created this record. |
Descriptive fields
| Field | Type | References | Description |
|---|---|---|---|
| shortDescription | string | — | One-line summary. |
| description | string | — | Full description. Markdown. |
| category | string | — | Category label. |
| subcategory | string | — | Subcategory label. |
| tags | list | — | Free-form tag array. |
| labels | list | — | Structured labels array. |
| summary | string | — | Auto-generated or manual summary. |
Classification fields
| Field | Type | References | Description |
|---|---|---|---|
| status | list | — | Lifecycle state. Choices vary by table type — see Status Variants below. |
| priority | list | — | critical | high | medium | low | planning |
| impact | list | — | high | medium | low |
| urgency | list | — | high | medium | low |
| risk | list | — | very_high | high | medium | low | very_low |
| approvalStatus | list | — | not_required | requested | approved | rejected | expired |
| recordSource | list | — | manual | workflow | api | import | system |
| environment | list | — | prod | staging | test | dev |
Content / payload fields
| Field | Type | References | Description |
|---|---|---|---|
| details | json | — | Arbitrary structured detail object. |
| configuration | json | — | Configuration blob. |
| conditions | json | — | Condition definition array. |
| actions | json | — | Action definition array. |
| script | string | — | Script body (JS/Python/etc). |
| metadata | json | — | Freeform metadata object. |
| payload | json | — | Raw event/trigger payload. |
| correlationId | string | — | Correlation token linking related records across systems. |
| batchId | string | — | Batch import/process identifier. |
Versioning & flag fields
| Field | Type | References | Description |
|---|---|---|---|
| version | string | — | Semantic version string. |
| revision | number | — | Integer revision counter. |
| isDefault | boolean | — | Whether this is the default record for its type. |
| isActive | boolean | — | Whether this record is currently active. |
| isAutomated | boolean | — | Whether this record was created or runs automatically. |
| isLocked | boolean | — | Whether this record is locked against edits. |
Date / lifecycle fields
| Field | Type | References | Description |
|---|---|---|---|
| openedAt | date | — | When the record was opened/created as a process item. |
| plannedStartAt | date | — | Planned start time. |
| plannedEndAt | date | — | Planned end time. |
| startedAt | date | — | Actual start time. |
| pausedAt | date | — | When execution was paused. |
| resumedAt | date | — | When execution was resumed. |
| dueAt | date | — | Deadline. |
| resolvedAt | date | — | When the record was resolved. |
| closedAt | date | — | When the record was closed. |
| effectiveFrom | date | — | Policy / rule effective start. |
| effectiveTo | date | — | Policy / rule expiry. |
| recordedAt | date | — | When the underlying event was observed. |
| createdAt | date | — | DB insert time. Readonly, auto-set. |
| updatedAt | date | — | Last modification time. Readonly, auto-set. |
Metric & financial fields
| Field | Type | References | Description |
|---|---|---|---|
| durationMinutes | number | — | Duration of the process or event in minutes. |
| effortHours | number | — | Human effort logged in hours. |
| elapsedHours | number | — | Wall-clock elapsed hours. |
| slaTargetMinutes | number | — | SLA resolution target in minutes. |
| olaTargetMinutes | number | — | OLA target in minutes. |
| metricName | string | — | Name of the tracked metric. |
| metricValue | number | — | Current metric value. |
| score | number | — | Quality / compliance score. |
| threshold | number | — | Threshold value for alerts/breaches. |
| weight | number | — | Weight used in scoring or priority calculations. |
| costAmount | number | — | Cost in local currency. |
| budgetAmount | number | — | Budget allocation. |
| actualAmount | number | — | Actual spend. |
| currency | string | — | ISO 4217 currency code. |
Workspace context (on every record)
| Field | Type | References | Description |
|---|---|---|---|
| tenantId | string | — | Tenant ID. Required, readonly, auto-set. |
| workspaceId | string | — | Workspace ID. Required, readonly, auto-set. |
Status Variants
The status field choices are the only thing that meaningfully differs between most sub-tables. There are three patterns:
Cross-Table Relationships
Every ITSM sub-table carries a full set of foreign key reference fields that allow any sub-table record to be linked to any other platform entity. These references are optional — set only the ones relevant to the specific sub-table type. The full set present on every sub-table:
Self and sibling references
| Field | Type | References | Description |
|---|---|---|---|
| parentId | reference | (same table) | Parent record within the same table. Enables tree/hierarchy. |
| relatedRecordId | reference | (same table) | Single related record in the same table. |
| relatedRecordIds | reference | (same table) ×N | Multiple related records in the same table. |
| incidentParentId | reference | itsm_incident_* | Parent incident family record (on incident sub-tables). |
| problemParentId | reference | itsm_problem_* | Parent problem family record (on problem sub-tables). |
| changeParentId | reference | itsm_change_* | Parent change family record (on change sub-tables). |
| requestParentId | reference | itsm_request_* | Parent request family record (on request sub-tables). |
| catalogParentId | reference | itsm_catalog_* | Parent catalog family record (on catalog sub-tables). |
Core ITSM process references
| Field | Type | References | Description |
|---|---|---|---|
| incidentId | reference | incidents | Links to an incident record. |
| problemId | reference | problems | Links to a problem record. |
| changeRequestId | reference | change_requests | Links to a change request. |
| requestId | reference | requests | Links to a service request. |
| requestItemId | reference | request_items | Links to a specific request item. |
| catalogItemId | reference | catalog_items | Links to a catalog item definition. |
| workflowId | reference | workflows | Workflow that created or manages this record. |
| approvalId | reference | approvals | Active approval record. |
| taskId | reference | tasks | Associated task record. |
Service & infrastructure references
| Field | Type | References | Description |
|---|---|---|---|
| serviceId | reference | service_offerings | Service offering this record relates to. |
| serviceSpecId | reference | service_specs | Service specification. |
| serviceBlueprintId | reference | service_blueprints | Service blueprint. |
| ciId | reference | cmdb_cis | Configuration item (CMDB). |
| businessServiceId | reference | cmdb_business_services | Business service from CMDB. |
| assetId | reference | assets | Physical or software asset. |
| releaseId | reference | releases | Release this record belongs to. |
| eventId | reference | events | Triggering or related event. |
| alertId | reference | alerts | Alert that triggered this record. |
Vendor & financial references
| Field | Type | References | Description |
|---|---|---|---|
| vendorId | reference | vendors | Vendor involved. |
| contractId | reference | vendor_contracts | Vendor contract. |
| projectId | reference | projects | Project this record belongs to. |
| milestoneId | reference | milestones | Project milestone. |
User references
| Field | Type | References | Description |
|---|---|---|---|
| ownerId | reference | users | Record owner. |
| assignedTo | reference | users | Person this is assigned to. |
| requestedBy | reference | users | Person who requested this. |
| approvedBy | reference | users | Person who approved. |
| reviewedBy | reference | users | Person who reviewed. |
| escalatedTo | reference | users | Person it was escalated to. |
| authorId | reference | users | Author / creator. |
| ownedBy | reference | users | Business owner. |
| createdBy | reference | users | User who created this record. Auto-set. |
| updatedBy | reference | users | User who last updated. Auto-set. |
Organisational references
| Field | Type | References | Description |
|---|---|---|---|
| groupId | reference | groups | Assignment group. |
| departmentId | reference | departments | Department. |
| locationId | reference | locations | Physical location. |
| companyId | reference | companies | Company. |
| businessUnitId | reference | business_units | Business unit. |
ITSM Entity Families
The 935 ITSM tables are organised into seven entity families. The five core ITSM process families (incident, problem, change, request, catalog) each have two prefix variants: the itsm_<entity>_prefix (extended, ~107 sub-tables with all 70 base fields) and the shorter <entity>_ prefix (lighter standalone subset). The release_ and service_ families are standalone-only.
Incident family (152 tables)
Tracks every service disruption from detection through resolution. The root table is incidents. All itsm_incident_* sub-tables carry incidentParentId linking back to a parent record within the same sub-table, and incidentId linking to the root incidents table.
Problem family (150 tables)
Root cause investigations and known error tracking. Root table: problems. Sub-tables carry problemParentId and problemId. Incident → Problem relationship is recorded via incidentId on problem sub-tables andproblemId on incident sub-tables — bidirectional cross-references.
Change family (160 tables)
ITIL-aligned change requests with CAB workflow, approval chains, and implementation windows. Root table: the main change record referenced via changeRequestId. Change sub-tables reference incidents via incidentId (the changes that fix incidents) and problems via problemId (permanent fixes for known errors).
Request family (148 tables)
Service request fulfilment. Root table: requests / request_items.requestId and requestItemId are the foreign keys used on sub-tables. Requests reference catalogItemId for the service definition and workflowIdfor the fulfillment automation.
Catalog family (145 tables)
Service catalog definitions — what employees can request. Root entity: catalog items. Referenced by catalogItemId throughout the request family. Catalog sub-tables link to serviceId (service offering) and workflowId (fulfillment workflow).
Release family (45 tables)
Release management — planning, packaging, and deploying changes to production. Root entity: releases. Release sub-tables reference releaseId → releases and cross-link to changeRequestId(changes bundled into a release) and ciId (infrastructure items being released onto).
Service family (38 tables)
Service management — the service portfolio, offerings, blueprints, and operational health. These tables define what services exist and how they are operated, distinct from the catalog (which defines what can be requested). Referenced by serviceId and serviceSpecIdthroughout the ITSM entity families.
Sub-Table Type Catalogue
Each of the 107 sub-table suffixes represents a specific process concern. The same suffix exists across all five entity families (incident, problem, change, request, catalog) with identical base schema and purpose — only the entity parent reference differs.
*_actionsexecution statusAutomated or manual action definitions and their execution records.
*_allocationsprocess statusResource allocation records — who/what is allocated to this entity.
*_approval_chainsexecution statusMulti-step approval chain definitions with ordered approver groups.
*_approval_stepsexecution statusIndividual steps within an approval chain. One record per approver/group.
*_approvalsexecution statusApproval instances — a request for approval on a specific record.
*_assignment_groupsprocess statusGroups eligible to receive assignments for this entity type.
*_assignment_rulesexecution statusAuto-assignment rules — conditions that route new records to groups/users.
*_audit_findingsprocess statusFindings from internal or external audits related to this entity.
*_auditsexecution statusAudit execution records with scope, schedule, and results.
*_baseline_itemsprocess statusIndividual items captured in a configuration or process baseline.
*_baselinesexecution statusPoint-in-time snapshots of configuration or process state.
*_breachesevent statusSLA or OLA breach records — when a target was missed and by how much.
*_budgetsprocess statusBudget allocations and current spend tracking for this entity.
*_chargebacksprocess statusCost chargeback entries attributed to this entity.
*_checklist_itemsprocess statusIndividual checklist line items with completion state.
*_checklistsprocess statusOrdered checklist definitions or instances attached to this entity.
*_communication_channelsprocess statusCommunication channel configurations (email lists, Slack channels, etc).
*_communicationsprocess statusCommunication records — emails, notifications, status updates sent to stakeholders.
*_conditionsexecution statusCondition definitions used in rules, routing, and automation triggers.
*_contract_termsprocess statusIndividual terms and obligations within a contract.
*_contractsprocess statusVendor or service contracts related to this entity.
*_control_testsexecution statusResults of testing security or compliance controls.
*_controlsprocess statusSecurity or compliance control definitions applicable to this entity.
*_correlationsevent statusEvent correlation records — related events grouped by root cause or pattern.
*_cost_entriesprocess statusIndividual cost line items (labour, infrastructure, vendor fees).
*_cost_modelsexecution statusCost model definitions for calculating and allocating costs.
*_dashboard_widgetsexecution statusWidget configurations embedded in entity-specific dashboards.
*_dashboardsexecution statusDashboard definitions scoped to this entity type.
*_definition_versionsexecution statusVersioned snapshots of definition records.
*_definitionsexecution statusGeneric definition records (field definitions, type definitions, etc).
*_dependenciesprocess statusDependency relationships — what this entity depends on or blocks.
*_dependency_mapsexecution statusVisual dependency map definitions for this entity.
*_escalation_stepsevent statusIndividual steps in an escalation policy — who gets notified at each tier.
*_escalationsevent statusActive escalation records — an entity that has been escalated and its current tier.
*_event_linksevent statusLinks between this entity and related platform events.
*_eventsevent statusEvents that occurred in the lifecycle of this entity.
*_exception_approvalsexecution statusApproval records specifically for policy exceptions.
*_exceptionsprocess statusPolicy or SLA exception records — when normal rules are waived.
*_forecastsprocess statusForecast records — predicted future values for metrics or volumes.
*_indexesexecution statusCustom search index definitions for this entity type.
*_insightsprocess statusAI/analytics-generated insights attached to this entity.
*_invoice_linesprocess statusInvoice line items for costs associated with this entity.
*_job_runsevent statusIndividual background job execution records.
*_jobsexecution statusBackground job definitions scheduled against this entity.
*_kpisprocess statusKPI definitions and current measured values.
*_linkagesprocess statusGeneric linkage records between this entity and any other platform entity.
*_mappingsexecution statusField or data mapping definitions (e.g. for integration transforms).
*_matricesexecution statusMatrix configurations — e.g. impact/urgency → priority calculation grids.
*_metric_snapshotsevent statusPoint-in-time metric value snapshots for trending.
*_metricsprocess statusMetric definitions with current values and thresholds.
*_model_versionsexecution statusVersioned snapshots of AI/ML model configurations.
*_modelsexecution statusAI/ML model references used for prediction or classification.
*_notification_rulesexecution statusRules defining when and to whom notifications are sent.
*_notificationsevent statusNotification records — what was sent, to whom, and when.
*_participantsprocess statusParticipation records — users actively engaged with this entity (e.g. war room).
*_plan_itemsprocess statusIndividual items in a plan (implementation, rollback, test plan).
*_plansexecution statusPlan definitions — implementation plans, rollback plans, continuity plans.
*_playbook_stepsexecution statusIndividual steps within a playbook with execution state.
*_playbooksexecution statusPlaybook definitions — ordered step sequences for responding to this entity type.
*_policiesprocess statusPolicy definitions governing how this entity type is handled.
*_policy_versionsexecution statusVersioned snapshots of policy records.
*_postmortemsprocess statusPost-incident/post-change review records with timeline and learnings.
*_purchase_ordersprocess statusPurchase orders raised for resources needed by this entity.
*_queue_membershipsprocess statusRecords of which queues this entity or its items belong to.
*_queuesprocess statusQueue definitions — work queues for routing and prioritising entity items.
*_recordsprocess statusGeneric record references linking to any other table record.
*_registriesprocess statusRegistry entries — named lookups for types, codes, and classifications.
*_remediation_tasksprocess statusTasks created specifically to remediate a finding, risk, or breach.
*_remediationsexecution statusRemediation plans with goals and completion tracking.
*_report_runsevent statusIndividual report execution records with output snapshots.
*_report_schedulesexecution statusScheduled report configurations — when to run and who to deliver to.
*_reportsexecution statusReport definitions — query, layout, and delivery config.
*_review_itemsprocess statusIndividual items on a review checklist (post-incident, PIR, CAB).
*_reviewsprocess statusReview records — post-incident reviews, CAB reviews, audit reviews.
*_risk_assessmentsprocess statusRisk assessments with probability, impact, and mitigation plan.
*_risksprocess statusRisk definitions identified for this entity.
*_routing_rulesexecution statusAuto-routing rules that assign incoming records to queues or groups.
*_rule_versionsexecution statusVersioned snapshots of business rule records.
*_rulesexecution statusBusiness rule definitions — conditions + actions that fire on record events.
*_runbook_stepsexecution statusIndividual steps in a runbook with execution state and output.
*_runbooksexecution statusRunbook definitions — scripted operational procedures.
*_scorecardsprocess statusScorecard records with KPI values and health scores.
*_scriptsexecution statusScript definitions (JS/Python) associated with this entity.
*_service_levelsprocess statusService level definitions — the agreed performance targets.
*_service_targetsprocess statusSpecific measurable targets within a service level (response, resolution times).
*_snapshot_diffsevent statusDiffs between two snapshots showing what changed between them.
*_snapshotsexecution statusFull state snapshots of this entity at a point in time.
*_stakeholdersprocess statusStakeholder records — people with interest in this entity's outcome.
*_subscriptionsprocess statusNotification subscriptions — users/groups watching this entity for updates.
*_task_dependenciesprocess statusDependency links between tasks — blocks/is-blocked-by relationships.
*_task_templatesexecution statusReusable task template definitions for this entity type.
*_tasksprocess statusTask records with assignee, due date, and completion state.
*_template_versionsexecution statusVersioned snapshots of template records.
*_templatesexecution statusTemplate definitions — reusable starting points for new records.
*_thresholdsprocess statusThreshold definitions that trigger alerts or escalations when crossed.
*_timelineevent statusMain timeline — the ordered list of significant events for this entity.
*_timeline_entriesevent statusIndividual timeline entry records (comments, state changes, actions).
*_timelinesevent statusNamed timeline definitions (multiple timelines per entity are supported).
*_type_mappingsexecution statusMappings between internal and external type/category codes.
*_typesexecution statusType registry entries — e.g. incident types, change types.
*_vendor_contactsprocess statusVendor contacts involved with this entity.
*_vendorsprocess statusVendor records associated with this entity.
*_war_room_messagesevent statusChat messages within a war room session for this entity.
*_war_roomsexecution statusWar room session records — collaborative incident bridges.
*_watchersprocess statusWatcher records — people monitoring this entity for any change.
*_workflow_versionsexecution statusVersioned snapshots of workflow definitions linked to this entity.
*_workflowsexecution statusWorkflow definitions associated with this entity (fulfillment, automation, etc).
Cross-Entity ITSM Tables
Beyond the five entity families, the ITSM domain includes standalone tables that operate across all entity types:
| Field | Type | References | Description |
|---|---|---|---|
| itsm_approval_chains | itsm | — | Global approval chain definitions shared across all ITSM modules. |
| itsm_blackout_windows | itsm | — | Change freeze windows — no changes permitted during these periods. |
| itsm_cab_workflows | itsm | — | CAB (Change Advisory Board) workflow definitions. |
| itsm_escalation_history | itsm | — | Global escalation history across all entity types. |
| itsm_escalations | itsm | — | Active escalations across all entity types. |
| itsm_impact_urgency_rules | itsm | — | Rules for auto-calculating priority from impact + urgency. |
| itsm_known_errors | itsm | — | Known error database — problems with documented workarounds. |
| itsm_ola_policies | itsm | — | Operational Level Agreement policies for internal teams. |
| itsm_priority_matrix | itsm | — | Impact × urgency → priority mapping matrix. |
| itsm_sla_breaches | itsm | — | All SLA breach records across every ITSM entity type. |
| itsm_sla_notification_rules | itsm | — | Rules for sending SLA warning/breach notifications. |
| itsm_status_lifecycles | itsm | — | Configurable status transition rules per entity type. |
| itsm_ticket_bookmarks | itsm | — | User bookmarks on any ITSM ticket. |
| itsm_ticket_links | itsm | — | Cross-entity links (e.g. incident linked to change). |
| itsm_ticket_reminders | itsm | — | User-set reminders on any ITSM ticket. |
| itsm_ticket_watchers | itsm | — | Watchers on any ITSM ticket, keyed by entity type + ID. |
| itsm_war_room_messages | itsm | — | War room chat messages shared across the ITSM platform. |
| itsm_war_rooms | itsm | — | Active war room sessions (major incident bridges). |
| itsm_workaround_links | itsm | — | Links between known errors and their workaround articles. |
Platform Domain Tables (140)
These tables back every module and are always present regardless of which ITSM modules are installed.
Identity & access
| Field | Type | References | Description |
|---|---|---|---|
| users | auth | ← workspace_members, role_assignments, group_members | Platform user accounts. Unique per email across the instance. |
| roles | auth | ← role_assignments | RBAC role definitions with permission sets. |
| role_assignments | auth | → users, roles | User → role assignment junction (per workspace). |
| groups | auth | ← group_members | User groups for assignment and notification routing. |
| group_members | auth | → users, groups | User → group membership junction. |
| departments | org | ← users, incidents, changes | Organisational departments. |
| companies | org | ← users | Company records (internal or external). |
| business_units | org | ← users, budget_plans | Business unit records. |
| locations | org | ← users, cmdb_cis | Physical location records. |
| abac_policies | auth | → roles | Attribute-based access control policy definitions. |
| field_acls | auth | → roles | Field-level read/write permissions per role. |
| row_acls | auth | → roles | Row-level security rules per table and role. |
| permission_policies | auth | → roles | Composite permission policy definitions. |
Authentication
| Field | Type | References | Description |
|---|---|---|---|
| api_keys | auth | → users | API key definitions with scopes and expiry. |
| api_key_rotation_policies | auth | → api_keys | Policies governing when API keys must be rotated. |
| auth_sessions | auth | → users | Active user sessions. |
| mfa_config | auth | — | MFA configuration per workspace. |
| mfa_enrollments | auth | → users | User MFA method enrollments. |
| mfa_otps | auth | → users | One-time passwords issued and consumed. |
| sso_providers | auth | — | SSO provider configurations (SAML, OIDC). |
| oauth_providers | auth | — | OAuth 2.0 provider configurations. |
| tokens | auth | → users | Short-lived access tokens. |
| sessions | auth | → users | Persisted session records. |
| directory_sync_configs | auth | — | SCIM/LDAP directory sync configurations. |
| directory_sync_logs | auth | → directory_sync_configs | Directory sync run logs. |
| scim_groups | auth | → groups | SCIM-provisioned groups. |
Workflows
| Field | Type | References | Description |
|---|---|---|---|
| workflows | platform | ← workflow_executions, workflow_versions | Workflow definitions — trigger, nodes, edges. |
| workflow_versions | platform | → workflows | Published version snapshots of a workflow. |
| workflow_executions | platform | → workflows, users | Individual workflow run records. |
| workflow_action_definitions | platform | — | Built-in and custom action type definitions. |
| workflow_templates | platform | → users | Reusable workflow templates. |
| workflow_custom_nodes | platform | → users | User-defined custom workflow nodes. |
| workflow_decision_tables | platform | → workflows | Decision table definitions used in workflow nodes. |
| workflow_connection_aliases | platform | — | Named connection aliases for workflow integrations. |
| workflow_credential_aliases | platform | — | Named credential aliases. |
| workflow_secret_references | platform | — | Secret references used in workflows. |
| workflow_library_items | platform | → users | Shared workflow library items. |
| workflow_trigger_subscriptions | platform | → workflows | Event subscriptions that trigger workflows. |
| workflow_execution_metrics | platform | → workflows | Performance metrics per workflow. |
| workflow_failure_alerts | platform | → workflows, users | Alert configurations for workflow failures. |
| workflow_compliance_evidence | platform | → workflows | Compliance evidence captured during workflow runs. |
| workflow_wait_tokens | platform | → workflow_executions | Pause/wait tokens for long-running workflows. |
| workflow_approvals | platform | → workflows, users | Approval records created by workflow approval nodes. |
| flow_scripts | platform | → users | SDK script definitions. |
| flow_script_versions | platform | → flow_scripts | Versioned snapshots of flow scripts. |
| flow_execution_logs | platform | → flow_scripts | Execution logs for flow scripts. |
| flow_rules | platform | → users | Business rule definitions in the flow engine. |
| flow_guards | platform | → flow_rules | Guard conditions for flow transitions. |
| flow_behaviors | platform | → users | Behavior definitions for flow automation. |
Apps & UI
| Field | Type | References | Description |
|---|---|---|---|
| apps | platform | ← app_versions, app_deployment_logs | App Studio application definitions. |
| app_versions | platform | → apps | Published app version snapshots. |
| app_audit_events | platform | → apps, users | App-specific audit events. |
| app_deployment_logs | platform | → apps, users | App deployment history. |
| app_chat_sessions | platform | → apps, users | AI assistant chat sessions inside App Studio. |
| app_command_history | platform | → apps, users | Command history inside App Studio code editor. |
| custom_domains | platform | → apps | Custom domain configurations for apps. |
| ui_pages | platform | → apps | UI page definitions inside App Studio. |
| ui_page_versions | platform | → ui_pages | Versioned snapshots of UI pages. |
| ui_components | platform | → apps | Reusable UI component definitions. |
| ui_policies | platform | → ui_pages | UI policy rules (show/hide/mandatory based on conditions). |
Audit & security
| Field | Type | References | Description |
|---|---|---|---|
| security_audit_logs | auth | → users | Security-specific audit events (login, permission changes). |
| immutable_audit_entries | platform | → users | Tamper-proof audit log. Write-once, no updates/deletes. |
| field_audit_config | platform | — | Configuration for which fields to audit-log. |
| field_audit_entries | platform | → users | Per-field change history. |
| activity_logs | platform | → users | User activity log across all resources. |
SLA / OLA
| Field | Type | References | Description |
|---|---|---|---|
| sla_policies | itsm | → sla_business_hours_calendars | SLA policy definitions with response and resolution targets. |
| sla_business_hours_calendars | itsm | ← sla_policies | Business hours calendars used for SLA calculations. |
| sla_definitions | itsm | → sla_policies | Detailed SLA definition records. |
| sla_targets | itsm | → sla_policies | Specific measurable SLA targets per entity type. |
| sla_schedules | itsm | → sla_policies | SLA schedule definitions. |
| sla_exceptions | itsm | → sla_policies, users | Approved SLA exceptions. |
| ola_policies | itsm | → groups | Operational Level Agreement policies. |
| ola_definitions | itsm | → ola_policies | OLA definition records. |
| ola_targets | itsm | → ola_policies | OLA measurable targets. |
| underpinning_contracts | itsm | → vendors | Vendor underpinning contracts supporting SLAs. |
| priority_matrix | itsm | — | Impact × urgency → priority mapping table. |
CMDB
| Field | Type | References | Description |
|---|---|---|---|
| cmdb_cis | cmdb | ← cmdb_rel_cis, cmdb_install_base | Configuration items — every tracked IT asset. |
| cmdb_rel_cis | cmdb | → cmdb_cis (×2) | Relationships between CIs (depends_on, runs_on, etc). |
| cmdb_business_services | cmdb | → cmdb_cis | Business service records backed by CIs. |
| cmdb_install_base | cmdb | → cmdb_cis | Installed software/hardware inventory. |
| cmdb_ci_classes | cmdb | — | CI class definitions (server, network_device, etc). |
| cmdb_ci_attributes | cmdb | → cmdb_ci_classes | Class-specific attribute definitions. |
| cmdb_ci_attribute_values | cmdb | → cmdb_cis, cmdb_ci_attributes | Attribute values per CI. |
| cmdb_ci_models | cmdb | — | CI hardware/software models. |
| cmdb_ci_relationship_types | cmdb | — | Relationship type definitions. |
| cmdb_ci_dependencies | cmdb | → cmdb_cis (×2) | CI dependency graph edges. |
| cmdb_ci_service_maps | cmdb | → cmdb_cis, cmdb_business_services | Service impact maps showing CI → service relationships. |
| cmdb_discovery_sources | cmdb | — | Discovery source configurations (agents, scanners). |
| cmdb_discovery_jobs | cmdb | → cmdb_discovery_sources | Discovery job run records. |
| cmdb_discovery_results | cmdb | → cmdb_discovery_jobs | Raw discovery results pending reconciliation. |
| cmdb_reconciliation_rules | cmdb | — | Rules for merging discovery results into CI records. |
| cmdb_data_quality_rules | cmdb | — | Data quality validation rules for CI records. |
| cmdb_data_quality_issues | cmdb | → cmdb_cis | Data quality issues found in CI records. |
| cmdb_audit_snapshots | cmdb | → cmdb_cis | Point-in-time CI configuration snapshots. |
| cmdb_audit_diffs | cmdb | → cmdb_audit_snapshots (×2) | Diffs between two CI audit snapshots. |
Asset management
| Field | Type | References | Description |
|---|---|---|---|
| assets | platform | → cmdb_cis, users | Physical and digital asset inventory. |
| asset_models | platform | ← assets | Asset model definitions (manufacturer, model name). |
| asset_categories | platform | ← assets | Asset category hierarchy. |
| asset_stocks | platform | → asset_models | Stock levels for spare assets. |
| asset_lifecycle_policies | platform | → asset_categories | Lifecycle management policies (replace after N years). |
| asset_lifecycle_events | platform | → assets | Lifecycle events (purchase, deploy, retire). |
| asset_assignments | platform | → assets, users, locations | User/location assignments for assets. |
| asset_maintenance_plans | platform | → assets | Planned maintenance schedules. |
| asset_maintenance_events | platform | → assets, asset_maintenance_plans | Maintenance event records. |
| asset_warranties | platform | → assets, vendors | Warranty records for assets. |
| asset_leases | platform | → assets, vendors | Lease records. |
| asset_disposals | platform | → assets, users | Asset disposal records. |
| software_products | platform | → vendors | Software product catalogue. |
| software_entitlements | platform | → software_products, vendors | Software license entitlements. |
| software_installations | platform | → software_products, cmdb_cis | Installation records on CIs. |
| software_usage_samples | platform | → software_installations | Usage telemetry samples for license optimisation. |
| software_reclamations | platform | → software_installations | License reclamation records for unused software. |
| consumable_items | platform | — | Consumable item definitions (printer cartridges, etc). |
| consumable_stocks | platform | → consumable_items, locations | Consumable stock levels per location. |
Availability & capacity
| Field | Type | References | Description |
|---|---|---|---|
| availability_services | platform | → cmdb_business_services | Service availability tracking definitions. |
| availability_targets | platform | → availability_services | Availability target percentages per service. |
| availability_measurements | platform | → availability_services | Measured availability data points. |
| availability_outages | platform | → availability_services, incidents | Service outage records. |
| capacity_services | platform | → cmdb_cis | Capacity planning service definitions. |
| capacity_plans | platform | → capacity_services, users | Capacity plan documents. |
| capacity_measurements | platform | → capacity_services | Capacity utilisation measurements. |
| continuity_plans | platform | → cmdb_business_services, users | Business continuity plan definitions. |
| continuity_tests | platform | → continuity_plans | DR/continuity test execution records. |
| continuity_findings | platform | → continuity_tests | Findings from continuity tests. |
Vendor management
| Field | Type | References | Description |
|---|---|---|---|
| vendors | platform | ← vendor_contracts, vendor_contacts | Vendor / supplier records. |
| vendor_contacts | platform | → vendors | Vendor contact persons. |
| vendor_contracts | platform | → vendors | Vendor contracts with terms and obligations. |
| contract_service_mappings | platform | → vendor_contracts, service_offerings | Maps vendor contracts to service offerings. |
| contract_obligations | platform | → vendor_contracts | Individual contract obligation line items. |
| purchase_orders | platform | → vendors, users | Purchase orders. |
| purchase_order_lines | platform | → purchase_orders | PO line items. |
| invoices | platform | → vendors, purchase_orders | Vendor invoices. |
| invoice_lines | platform | → invoices | Invoice line items. |
Financial & budgeting
| Field | Type | References | Description |
|---|---|---|---|
| chargeback_models | platform | → business_units | Cost chargeback model definitions. |
| chargeback_entries | platform | → chargeback_models, business_units | Individual chargeback entries. |
| budget_plans | platform | → business_units, users | Budget plan definitions per business unit / period. |
| budget_actuals | platform | → budget_plans | Actual spend records against budget plans. |
| cost_allocation_rules | platform | → business_units | Rules for allocating costs to business units. |
Risk & compliance
| Field | Type | References | Description |
|---|---|---|---|
| risk_registers | platform | → users | Risk register definitions per scope. |
| risk_assessments | platform | → risk_registers, users | Risk assessment records. |
| control_catalog | platform | — | Security / compliance control catalogue. |
| control_tests | platform | → control_catalog, users | Control test results. |
| audit_plans | platform | → users | Audit plan definitions. |
| audit_findings | platform | → audit_plans, users | Audit findings. |
| remediation_plans | platform | → audit_findings, users | Remediation plans for audit findings. |
| remediation_tasks | platform | → remediation_plans, users | Tasks within remediation plans. |
| policy_exceptions | platform | → users | Approved exceptions to policies. |
| security_incidents | platform | → incidents, users | Security incident records. |
| security_incident_tasks | platform | → security_incidents, users | Tasks within security incidents. |
| security_vulnerabilities | platform | → cmdb_cis | Vulnerability records. |
| security_vulnerability_findings | platform | → security_vulnerabilities, cmdb_cis | Vulnerability scan findings. |
| security_patches | platform | — | Security patch definitions. |
| security_patch_deployments | platform | → security_patches, cmdb_cis | Patch deployment records. |
Observability & alerting
| Field | Type | References | Description |
|---|---|---|---|
| alert_sources | observability | — | Alert source configurations (Prometheus, PagerDuty, etc). |
| alerts | observability | → alert_sources, cmdb_cis, incidents | Alert records received from monitoring systems. |
| alert_acknowledgements | observability | → alerts, users | User acknowledgements on alerts. |
| alert_escalations | observability | → alerts, users | Alert escalation records. |
| monitoring_checks | observability | → cmdb_cis | Monitoring check definitions. |
| monitoring_check_results | observability | → monitoring_checks | Check execution results. |
| synthetic_tests | observability | → cmdb_cis | Synthetic/uptime test definitions. |
| synthetic_test_runs | observability | → synthetic_tests | Synthetic test run records. |
| event_rules | observability | — | Event processing rules (de-dup, correlation, suppress). |
| event_correlations | observability | → events, alerts | Correlated event groups. |
| health_checks | observability | — | Platform component health check results. |
| events | platform | → users, cmdb_cis | Platform event records (source for workflow triggers). |
| event_types | platform | — | Event type definitions. |
| event_logs | platform | → events | Raw event log entries. |
| event_subscriptions | platform | → events, workflows | Event subscriptions for webhooks and workflows. |
| error_events | platform | → users | Error event records for debugging. |
On-call & escalation
| Field | Type | References | Description |
|---|---|---|---|
| on_call_schedules | itsm | → groups, users | On-call rotation schedule definitions. |
| on_call_rotations | itsm | → on_call_schedules | Individual rotation configurations within a schedule. |
| on_call_members | itsm | → on_call_rotations, users | Users on a rotation with their shift times. |
| on_call_handoffs | itsm | → on_call_rotations, users (×2) | On-call handoff records between shifts. |
| escalation_policies | itsm | → groups, users | Escalation policy definitions. |
| escalation_policy_steps | itsm | → escalation_policies, users, groups | Steps within an escalation policy. |
| support_queues | itsm | → groups, users | Support queue definitions for ticket routing. |
Knowledge
| Field | Type | References | Description |
|---|---|---|---|
| knowledge_bases | collaboration | → users | Knowledge base definitions. |
| knowledge_articles | collaboration | → knowledge_bases, users | Knowledge article records. |
| knowledge_article_versions | collaboration | → knowledge_articles, users | Article version history. |
| knowledge_article_tags | collaboration | → knowledge_articles | Tags on articles. |
| knowledge_article_views | collaboration | → knowledge_articles, users | Article view telemetry. |
| knowledge_article_feedback | collaboration | → knowledge_articles, users | "Helpful / not helpful" feedback. |
| knowledge_article_attachments | collaboration | → knowledge_articles | File attachments on articles. |
| knowledge_contributions | collaboration | → knowledge_articles, users | Contribution records (suggestions from end users). |
| knowledge_workflows | collaboration | → knowledge_bases, workflows | Review/publish workflow configs for a knowledge base. |
| kb_articles | collaboration | → users | Legacy/internal KB article table. |
| known_error_articles | itsm | → knowledge_articles, problems | Articles documenting known errors. |
| known_error_workarounds | itsm | → known_error_articles | Workaround steps for known errors. |
Projects & programs
| Field | Type | References | Description |
|---|---|---|---|
| projects | platform | → users | Project records. |
| milestones | platform | → projects | Project milestones. |
| project_risks | platform | → projects | Risk records for projects. |
| project_issues | platform | → projects | Issue records for projects. |
| project_dependencies | platform | → projects (×2) | Cross-project dependency links. |
| project_status_reports | platform | → projects, users | Project status report snapshots. |
| project_portfolios | platform | ← projects | Project portfolio groupings. |
| programs | platform | → users | Programme definitions. |
| program_increment_plans | platform | → programs | PI planning records (SAFe methodology). |
| key_results | platform | → objectives, users | OKR key result records. |
| objectives | platform | → users | OKR objective records. |
| kpis | platform | → users | KPI definitions and tracked values. |
Deployment & release
| Field | Type | References | Description |
|---|---|---|---|
| releases | platform | → projects, users; ← deployment_records | Release records. |
| deployment_records | platform | → releases, users | Individual deployment records. |
| deployment_runs | platform | → deployment_records | Deployment run executions. |
| deployment_run_tasks | platform | → deployment_runs, users | Individual tasks within a deployment run. |
| deployment_gates | platform | → deployment_records, users | Approval gates in deployment pipelines. |
| deployment_windows | platform | — | Permitted deployment window definitions. |
| env_promotions | platform | → users | Environment promotion records (dev→staging→prod). |
| rollback_plans | platform | → deployment_records, users | Rollback plan definitions. |
| restore_points | platform | → users | System restore point records. |
| update_sets | platform | → users | Update set records (config bundle migrations). |
Miscellaneous platform tables
| Field | Type | References | Description |
|---|---|---|---|
| attachments | platform | → users | File attachment records for any entity. |
| comments | collaboration | → users | Comment records on any entity. |
| conversations | collaboration | → users | Conversation threads on any entity. |
| messages | collaboration | → conversations, users | Messages within conversations. |
| notifications | platform | → users | In-app notification records. |
| notification_center | platform | → users | Notification center inbox per user. |
| cron_jobs | platform | → users | Scheduled cron job definitions. |
| cron_runs | platform | → cron_jobs | Cron job execution records. |
| import_sets | data | → users | Data import batch records. |
| data_sources | data | → users | Data source connection definitions. |
| data_policies | data | — | Data governance policy definitions. |
| field_map_templates | platform | — | Reusable field mapping templates for integrations. |
| transform_maps | data | — | Data transform mapping definitions. |
| impact_assessments | platform | → users | Cross-studio impact analysis results. |
| approvals | platform | → users | Platform-level approval records (non-ITSM). |
| assignment_rules | platform | → groups, users | Platform-wide auto-assignment rules. |
| business_rules | platform | → users | Platform-wide business rule definitions. |
| tasks | platform | → users | Generic task records (used cross-studio). |
| stakeholders | platform | → users | Generic stakeholder records. |
| comm_plans | platform | → users | Communication plan definitions. |
| webhooks | platform | → users | Outbound webhook subscription definitions. |
| webhook_delivery_logs | platform | → webhooks | Webhook delivery attempt logs. |
| rate_limits | platform | — | API rate limit configurations. |
| locales | platform | — | Supported locale definitions. |
| locale_translations | platform | → locales | Translation strings per locale. |
| locale_policies | platform | → locales | Locale enforcement policies per workspace. |
| multilang_content | platform | → locales | Multi-language content records. |
| metadata | platform | → users | Generic metadata records attached to any entity. |
| sys_dictionaries | platform | — | System data dictionary — all table and field definitions. |
| sys_db_objects | platform | — | Database object registry. |
| sys_notifications | platform | — | System-generated notification templates. |
| sys_counters | platform | — | Auto-increment counter state per table. |
| system_logs | platform | — | Platform system logs. |
| system_properties | platform | — | Key-value system configuration properties. |
| feature_flags | platform | — | Feature flag definitions and enabled state. |
| choices | platform | — | Dropdown choice lists for any field. |
| user_preferences | platform | → users | Per-user UI preferences (list view, theme, etc). |
| config_histories | platform | — | Configuration change history. |
| scoped_apps | platform | → users | Scoped application definitions. |
| search_indexes | platform | — | Search index configurations. |
| staged_imports | data | → import_sets | Staging table for import validation. |
| schema_snapshots | data | — | Table schema version snapshots. |
| migrations | data | → users | Database migration records. |
| db_studio_boards | data | → users | DB Studio board configurations. |
| db_studio_comments | data | → users | Comments on DB Studio objects. |
| db_studio_snapshots | data | → users | DB Studio table snapshots. |
| adrs | platform | → users | Architecture Decision Records. |
| arch_diagrams | platform | → users | Architecture diagram definitions. |
| tech_stack | platform | — | Technology stack registry. |
| perf_samples | analytics | — | Performance sample data points. |
| log_retention_policies | platform | — | Log data retention policies. |
| backup_policies | platform | — | Backup policy definitions. |
| cache_policies | platform | — | Cache policy configurations. |
| dr_drills | platform | → continuity_plans, users | Disaster recovery drill records. |
| trace_entries | observability | → users | Distributed trace entries. |
| major_incidents | itsm | → incidents, users | Major incident records (P1 bridges). |
| major_incident_tasks | itsm | → major_incidents, users | Tasks within major incident bridges. |
| major_incident_stakeholders | itsm | → major_incidents, users | Stakeholders on major incidents. |
| major_incident_communications | itsm | → major_incidents, users | Communications for major incidents. |
| war_room_participants | platform | → users | War room participant records. |
| incidents | itsm | → users, groups, cmdb_cis; ← itsm_incident_* | Root incident records. Central ITSM table. |
| problems | itsm | → users, groups; ← itsm_problem_* | Root problem records. |
| marketplace_plugins | platform | → users | Plugin marketplace listings. |
| plugin_installations | platform | → marketplace_plugins, users | Installed plugin records. |
| plugin_execution_logs | platform | → plugin_installations | Plugin execution logs. |
| owner_validations | platform | → users | Owner validation check records. |
| api_endpoints | platform | → users | Custom API endpoint definitions. |
| api_versions | platform | — | API version definitions. |
| api_throttle_rules | platform | — | API rate throttle rule definitions. |
| employees | hr | → users, departments | Employee records (HR module). |
| csm_accounts | csm | → users | Customer account records (CSM module). |
GET /api/v1/tables/:slug/records. Use the field names documented above in filter[fieldName]=value query parameters. Reference fields support dot-notation for joined lookups: filter[assignedTo.email]=alice@acme.com.Model Factory Pattern
Every Mongoose model in FlowOS is created at query time through one of two factory functions. There are no hardcoded collection names anywhere in the application — the factories build the correct root_-prefixed name and cache the model.
getWorkspaceModel — standard tables
import { getWorkspaceModel } from '../modules/feature-registry/model-factory.js'
// Collection produced: root_<tenantId>_<workspaceId>_incidents
const Incident = getWorkspaceModel<IIncident>(tenantId, workspaceId, 'incidents', incidentSchema)
const doc = await Incident.findOne({ _id: id, tenantId, workspaceId })Use getWorkspaceModel for all new tables and custom tables. It:
- •Builds collection name
root_<tenantId>_<workspaceId>_<tableName>. - •Calls
enforceTenantWorkspaceEnvelope— auto-addstenantIdandworkspaceIdfields + compound index if not in the schema. - •Caches the Mongoose model by collection name — safe to call on every request.
getCoreModel — tenant-scoped legacy tables
import { getCoreModel } from '../modules/feature-registry/model-factory.js'
// Non-strict mode: root_<tenantId>_users
// Strict mode: root_<tenantId>_<workspaceId>_users
const User = getCoreModel<IUser>(tenantId, 'users', userSchema, { workspaceId })Use getCoreModel only for a handful of early tables (users, roles, tenants) that pre-date workspace isolation. All new tables use getWorkspaceModel.
The collection guard
src/config/collection-guard.ts is installed at boot and wraps every Mongoose write method. It throws immediately if a collection name does not start withroot_. This prevents any accidental write to a bare collection name.
// This would throw at runtime — never do this
const BareModel = mongoose.model('Incident', schema, 'incidents')
await BareModel.create({ ... }) // ← Blocked: "Blocked non-compliant MongoDB collection 'incidents'"
// Correct
const Incident = getWorkspaceModel(tenantId, workspaceId, 'incidents', schema)
await Incident.create({ tenantId, workspaceId, ... }) // ← OK: 'root_t_acme_ws_prod_incidents'