Incidents
Complete field reference, state lifecycle, role-based access, SLA integration, and automation rules for the Incident Management module.
What is an Incident?
An incident is an unplanned interruption to an IT service or a reduction in the quality of an IT service. The goal of incident management is to restore normal service operation as quickly as possible and minimise the adverse impact on business operations.
In FlowOS, every incident is a record in the incidents table. It has a lifecycle of statuses, an assigned team and engineer, links to related problems and changes, SLA tracking, a full timeline of comments and work notes, and integration with CMDB configuration items.
Customer Feedback (External Incidents)
FlowOS tracks customer-reported feedback as external incidents — standard incidents with asourceType of external. This eliminates a separate case-management module while giving customer feedback all the benefits of the incident workflow: SLA tracking, assignment, escalation, CMDB linking, and audit history.
External-Incident Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| sourceType | 'internal' | 'external' | required | 'internal' | Discriminator. Set to external for all customer feedback. |
| customerName | string | optional | — | Customer full name. |
| customerEmail | string (email) | optional | — | Customer email. Used for close-the-loop notifications. |
| companyName | string | optional | — | Customer company name. |
| feedbackType | enum | optional | general | technical_issue | billing_payment | product_service | compliment | escalation | general |
| feedbackChannel | enum | optional | — | email | portal | qr_code | mobile_app | whatsapp | google_reviews | social_media | phone | survey |
| sentiment | enum | optional | — | positive | neutral | negative | very_negative. Detected by AI or set manually. |
| sentimentScore | number (0–1) | optional | — | Numeric sentiment score. 0 = very negative, 1 = very positive. |
| originalFeedbackText | string | optional | — | Verbatim text of the customer's original message. |
| closedLoopNotified | boolean | optional | false | True once a closure notification has been sent to the customer. |
| customerAcknowledged | boolean | optional | false | True once the customer clicked 'Issue Resolved' on the acknowledgment page. |
| customerAcknowledgedAt | Date | optional | — | Timestamp of customer acknowledgment. |
| reopenReason | string | optional | — | Customer's explanation when they click 'Still Open' on the acknowledgment page. |
Close the Loop Flow
When an external incident is resolved, agents can send a closure notification email to the customer. The email contains a link to /feedback/ack/[token] where the customer confirms resolution or reopens with a reason. The incident detail page has a Close the Loop tab that shows notification status, acknowledgment status, and a reply-to-customer box.
Feedback Collection Channels
- •
/settings/feedback-channels— Channel Hub: overview of all channels with incident counts - •
/settings/feedback-channels/qr— QR codes for physical locations - •
/settings/feedback-channels/widget— Embeddable web widget (JavaScript snippet) - •
/settings/feedback-channels/whatsapp— WhatsApp Business API integration - •
/settings/feedback-channels/google-reviews— Google Reviews auto-sync - •
/feedback/[qrToken]— Public feedback form (no auth required) - •
/mobile/feedback— In-app mobile feedback form - •
/settings/feedback-routing— Auto-routing rules (condition → team/priority) - •
/settings/feedback-team-mapping— Default team per feedback type - •
/settings/feedback-categories— Custom category taxonomy - •
/settings/feedback-alerts— Negative feedback alert rules - •
/analytics/feedback— Feedback analytics dashboard - •
/onboarding/feedback— 5-step guided setup wizard
Field Reference
The following table lists every field on an incident record, its data type, whether it is required, who can set it, and what it does.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string (inc_...) | required | auto | Unique identifier. Assigned by the system. Format: inc_ + ULID. |
| number | string | required | auto | Human-readable number (INC-NNNN). Auto-incremented per workspace. |
| title | string (max 255) | required | Short description of the incident. Shown in list views, notifications, and linked records. | |
| description | text | optional | Full description of the symptom, what has been tried, and impact. Supports Markdown. | |
| severity | enum | required | P3 | P1 (Critical) · P2 (High) · P3 (Medium) · P4 (Low). Drives SLA policy selection. |
| urgency | enum | optional | medium | low · medium · high. Combined with severity to compute priority. |
| priority | enum (computed) | optional | computed | critical · high · medium · low. Computed from severity × urgency matrix. Read-only. |
| status | enum | required | open | open · investigating · identified · monitoring · resolved · closed. See lifecycle below. |
| category | string | optional | High-level category: hardware · software · network · security · access · other. | |
| subcategory | string | optional | Category-specific subcategory. Configurable per workspace. | |
| source | enum | optional | api | How the incident was created: portal · email · monitoring · api · workflow · phone. |
| reportedBy | string (usr_...) | optional | actor | User who reported the incident. Defaults to the creating user. |
| assignedTeam | string (team slug) | optional | Team responsible for resolution. Must be a valid team slug in the workspace. | |
| assignedTo | string (usr_...) | optional | Individual engineer assigned to this incident. | |
| impactedServices | string[] | optional | [] | List of business service names or IDs affected by this incident. |
| cmdbItems | string[] (ci_...) | optional | [] | CMDB configuration items that are the subject or cause of this incident. |
| relatedProblems | string[] (prb_...) | optional | [] | Linked problem records. Use when this incident is a symptom of a broader problem. |
| relatedChanges | string[] (chg_...) | optional | [] | Change requests potentially related as a root cause. |
| duplicateOf | string (inc_...) | optional | If this is a duplicate, the ID of the primary incident. | |
| tags | string[] | optional | [] | Free-form tags for search and filtering. Max 20 tags, each max 50 chars. |
| environment | enum | optional | production | Which environment is affected: development · staging · production. |
| rootCause | text | optional | Root cause analysis text. Typically filled in on resolution. | |
| resolution | text | optional | Steps taken to resolve the incident. Required when setting status to resolved. | |
| workaround | text | optional | Temporary workaround if a permanent fix is not yet available. | |
| sla | object | optional | computed | Read-only. { policyId, firstResponseDue, resolutionDue, firstResponseMet, resolutionMet, breached }. |
| firstResponseAt | timestamp | optional | When a team member first added a public comment. Auto-set. | |
| resolvedAt | timestamp | optional | When status was last set to resolved. Auto-set. | |
| closedAt | timestamp | optional | When status was set to closed. Auto-set. | |
| reopenedAt | timestamp | optional | When a resolved/closed incident was last reopened. Auto-set. | |
| reopenCount | integer | optional | 0 | How many times this incident has been reopened. |
| visibility | enum | optional | internal | internal · public. Public incidents appear in the self-service portal. |
| customFields | object (jsonb) | optional | {} | Workspace-defined custom fields. Schema configured under Settings → Custom Fields. |
| createdAt | timestamp | optional | auto | When the record was created. |
| updatedAt | timestamp | optional | auto | When the record was last modified. |
| createdBy | string (usr_...) | optional | actor | User or API token that created the record. |
Priority Matrix
Priority is automatically computed from the combination of severity and urgency. It is used for visual display and sorting in list views. SLA policies are driven by severity independently.
| Severity × Urgency | Low | Medium | High |
|---|---|---|---|
| P1 (Critical) | High | Critical | Critical |
| P2 (High) | Medium | High | Critical |
| P3 (Medium) | Low | Medium | High |
| P4 (Low) | Low | Low | Medium |
Status Lifecycle
Newly created. Not yet acknowledged by any team member.
A team member has acknowledged and is actively investigating the root cause.
Root cause has been identified. A fix or workaround is being implemented.
Fix deployed. Service is recovering. Being monitored to confirm stability.
Service restored. Resolution notes required. Triggers resolved event and SLA closure.
Final state. Post-incident review complete. Record is immutable. Cannot be reopened.
422 INVALID_TRANSITION error with the allowed transitions listed.Timeline & Comments
Every incident has an append-only timeline of events and comments. There are three comment types:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| public_comment | type | optional | — | Visible to the reporter and anyone with incident read access. Sets firstResponseAt if this is the first comment from the assignedTeam. |
| work_note | type | optional | — | Internal only. Visible to users with incidents:read. Not shown to end-users in the portal. Used for internal investigation notes. |
| system_event | type | optional | — | Auto-generated by the system on field changes, status transitions, SLA events, and linked record actions. Cannot be deleted. |
POST /api/itsm/incidents/:id/comments
{
"type": "work_note",
"body": "Checked DB slow query log — top query is a full-table scan on audit_events. Adding index now.",
"attachments": ["att_01HZ..."] // optional file attachment IDs
}Role-Based Field Access
Not all fields are writable by all roles. The table below shows field-level write access.
| Field | Viewer | Operator (own) | ITSM Agent | ITSM Manager | Admin |
|---|---|---|---|---|---|
| title | — | ✓ | ✓ | ✓ | ✓ |
| description | — | ✓ | ✓ | ✓ | ✓ |
| severity | — | — | ✓ | ✓ | ✓ |
| urgency | — | — | ✓ | ✓ | ✓ |
| status | — | limited | ✓ | ✓ | ✓ |
| assignedTeam | — | — | — | ✓ | ✓ |
| assignedTo | — | — | limited | ✓ | ✓ |
| cmdbItems | — | — | ✓ | ✓ | ✓ |
| relatedProblems | — | — | ✓ | ✓ | ✓ |
| relatedChanges | — | — | ✓ | ✓ | ✓ |
| rootCause | — | — | ✓ | ✓ | ✓ |
| resolution | — | limited | ✓ | ✓ | ✓ |
| visibility | — | — | — | ✓ | ✓ |
| customFields | — | limited | ✓ | ✓ | ✓ |
◐ limited means the field is writable only when the user is the assignee or within their assigned team.
SLA Integration
When an incident is created, FlowOS automatically finds the matching SLA policy based onseverity and category. The sla object is populated with computed deadlines. SLA timers are paused when status = monitoring and stop on resolved.
"sla": {
"policyId": "slap_enterprise_p1",
"policyName": "Enterprise P1 SLA",
"firstResponseDue": "2026-06-01T09:45:00Z", // 15 min from creation
"resolutionDue": "2026-06-01T10:30:00Z", // 1 hr from creation
"firstResponseMet": true,
"firstResponseAt": "2026-06-01T09:38:00Z",
"resolutionMet": false,
"breached": false,
"remainingMs": 1234567,
"pausedMs": 0
}Built-in Automations
These automations run automatically on every workspace without configuration:
- •Auto-assign — If an assignment rule matches the incident's category + team, it auto-assigns to the matching team.
- •SLA timer start — Starts immediately on record creation.
- •First response capture — Sets
firstResponseAton the first public comment from the assigned team. - •Reopen counter — Increments
reopenCounteach time a resolved incident is set back to open. - •Duplicate detection — If two incidents share the same title and same P1 severity within 5 minutes, FlowOS surfaces a duplicate warning.
- •Audit events — Every field change, comment, and status transition writes an immutable audit event.
- •P1 on-call escalation — When an incident with
priority=criticalorpriority=p1is created, the current on-call engineer (fromoncall_schedules) is automatically assigned and receives an in-app + email alert. If the engineer does not acknowledge (move status toin_progressor beyond) within 15 minutes, the team manager is notified.
Events Emitted
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| incident.created | event | optional | — | Fired when a new incident record is created. |
| incident.updated | event | optional | — | Fired on any field change. Includes before/after diff. |
| incident.status_changed | event | optional | — | Fired specifically when status transitions. Includes old and new status. |
| incident.assigned | event | optional | — | Fired when assignedTo or assignedTeam changes. |
| incident.escalated | event | optional | — | Fired when severity is raised (e.g. P3 → P1). |
| incident.resolved | event | optional | — | Fired when status transitions to resolved. |
| incident.closed | event | optional | — | Fired when status transitions to closed. |
| incident.reopened | event | optional | — | Fired when a resolved or closed incident is reopened. |
| incident.sla_warning | event | optional | — | Fired when 75% of the SLA resolution window has elapsed. |
| incident.sla_breached | event | optional | — | Fired when the SLA resolution deadline passes without resolution. |
| incident.comment_added | event | optional | — | Fired on each new comment or work note. |
API Quick Reference
/api/v1/itsm/incidentsList incidents — filter by status, severity, team, date range
/api/v1/itsm/incidentsCreate a new incident
/api/v1/itsm/incidents/:idGet single incident with full detail
/api/v1/itsm/incidents/:idUpdate incident fields
/api/v1/itsm/incidents/:id/resolveResolve — sets status=resolved, records resolvedAt
/api/v1/itsm/incidents/:id/closeClose — sets status=closed, records closedAt
/api/v1/itsm/incidents/:id/escalateEscalate severity or reassign team
/api/v1/itsm/incidents/:id/commentsAdd a comment or work note
/api/v1/itsm/incidents/:id/commentsList all timeline entries (comments + system events)
/api/v1/itsm/incidents/:id/linkLink to a problem, change, or CMDB item
/api/v1/itsm/incidents/:id/slaGet current SLA state and remaining time
Example: Create a P1 incident
POST /api/v1/itsm/incidents
Authorization: Bearer $TOKEN
X-Workspace: acme
{
"title": "Checkout service returning 503 — all regions",
"description": "All checkout requests failing with 503 since 09:28 UTC. Error rate 100%.",
"severity": "P1",
"urgency": "high",
"category": "software",
"source": "monitoring",
"impactedServices": ["checkout", "payments"],
"cmdbItems": ["ci_checkout_service", "ci_payment_gateway"],
"assignedTeam": "platform",
"tags": ["checkout", "503", "production"]
}