ITSM

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.

Navigate to ITSM → Customer Incidents to see only external incidents, or ITSM → Internal Incidents for internal-only view. Both are URL-filtered views of the same incident list.

External-Incident Fields

FieldTypeRequiredDefaultDescription
sourceType'internal' | 'external'required'internal'Discriminator. Set to external for all customer feedback.
customerNamestringoptionalCustomer full name.
customerEmailstring (email)optionalCustomer email. Used for close-the-loop notifications.
companyNamestringoptionalCustomer company name.
feedbackTypeenumoptionalgeneraltechnical_issue | billing_payment | product_service | compliment | escalation | general
feedbackChannelenumoptionalemail | portal | qr_code | mobile_app | whatsapp | google_reviews | social_media | phone | survey
sentimentenumoptionalpositive | neutral | negative | very_negative. Detected by AI or set manually.
sentimentScorenumber (0–1)optionalNumeric sentiment score. 0 = very negative, 1 = very positive.
originalFeedbackTextstringoptionalVerbatim text of the customer's original message.
closedLoopNotifiedbooleanoptionalfalseTrue once a closure notification has been sent to the customer.
customerAcknowledgedbooleanoptionalfalseTrue once the customer clicked 'Issue Resolved' on the acknowledgment page.
customerAcknowledgedAtDateoptionalTimestamp of customer acknowledgment.
reopenReasonstringoptionalCustomer'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.

FieldTypeRequiredDefaultDescription
idstring (inc_...)requiredautoUnique identifier. Assigned by the system. Format: inc_ + ULID.
numberstringrequiredautoHuman-readable number (INC-NNNN). Auto-incremented per workspace.
titlestring (max 255)requiredShort description of the incident. Shown in list views, notifications, and linked records.
descriptiontextoptionalFull description of the symptom, what has been tried, and impact. Supports Markdown.
severityenumrequiredP3P1 (Critical) · P2 (High) · P3 (Medium) · P4 (Low). Drives SLA policy selection.
urgencyenumoptionalmediumlow · medium · high. Combined with severity to compute priority.
priorityenum (computed)optionalcomputedcritical · high · medium · low. Computed from severity × urgency matrix. Read-only.
statusenumrequiredopenopen · investigating · identified · monitoring · resolved · closed. See lifecycle below.
categorystringoptionalHigh-level category: hardware · software · network · security · access · other.
subcategorystringoptionalCategory-specific subcategory. Configurable per workspace.
sourceenumoptionalapiHow the incident was created: portal · email · monitoring · api · workflow · phone.
reportedBystring (usr_...)optionalactorUser who reported the incident. Defaults to the creating user.
assignedTeamstring (team slug)optionalTeam responsible for resolution. Must be a valid team slug in the workspace.
assignedTostring (usr_...)optionalIndividual engineer assigned to this incident.
impactedServicesstring[]optional[]List of business service names or IDs affected by this incident.
cmdbItemsstring[] (ci_...)optional[]CMDB configuration items that are the subject or cause of this incident.
relatedProblemsstring[] (prb_...)optional[]Linked problem records. Use when this incident is a symptom of a broader problem.
relatedChangesstring[] (chg_...)optional[]Change requests potentially related as a root cause.
duplicateOfstring (inc_...)optionalIf this is a duplicate, the ID of the primary incident.
tagsstring[]optional[]Free-form tags for search and filtering. Max 20 tags, each max 50 chars.
environmentenumoptionalproductionWhich environment is affected: development · staging · production.
rootCausetextoptionalRoot cause analysis text. Typically filled in on resolution.
resolutiontextoptionalSteps taken to resolve the incident. Required when setting status to resolved.
workaroundtextoptionalTemporary workaround if a permanent fix is not yet available.
slaobjectoptionalcomputedRead-only. { policyId, firstResponseDue, resolutionDue, firstResponseMet, resolutionMet, breached }.
firstResponseAttimestampoptionalWhen a team member first added a public comment. Auto-set.
resolvedAttimestampoptionalWhen status was last set to resolved. Auto-set.
closedAttimestampoptionalWhen status was set to closed. Auto-set.
reopenedAttimestampoptionalWhen a resolved/closed incident was last reopened. Auto-set.
reopenCountintegeroptional0How many times this incident has been reopened.
visibilityenumoptionalinternalinternal · public. Public incidents appear in the self-service portal.
customFieldsobject (jsonb)optional{}Workspace-defined custom fields. Schema configured under Settings → Custom Fields.
createdAttimestampoptionalautoWhen the record was created.
updatedAttimestampoptionalautoWhen the record was last modified.
createdBystring (usr_...)optionalactorUser 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 × UrgencyLowMediumHigh
P1 (Critical)HighCriticalCritical
P2 (High)MediumHighCritical
P3 (Medium)LowMediumHigh
P4 (Low)LowLowMedium

Status Lifecycle

Open

Newly created. Not yet acknowledged by any team member.

Investigating · Resolved
Investigating

A team member has acknowledged and is actively investigating the root cause.

Identified · Resolved
Identified

Root cause has been identified. A fix or workaround is being implemented.

Monitoring · Resolved
Monitoring

Fix deployed. Service is recovering. Being monitored to confirm stability.

Resolved · Investigating
Resolved

Service restored. Resolution notes required. Triggers resolved event and SLA closure.

Closed · Open (reopen)
Closed

Final state. Post-incident review complete. Record is immutable. Cannot be reopened.

Valid transitions are enforced by the API. Attempting an invalid transition (e.g. Open → Closed) returns a 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:

FieldTypeRequiredDefaultDescription
public_commenttypeoptionalVisible to the reporter and anyone with incident read access. Sets firstResponseAt if this is the first comment from the assignedTeam.
work_notetypeoptionalInternal only. Visible to users with incidents:read. Not shown to end-users in the portal. Used for internal investigation notes.
system_eventtypeoptionalAuto-generated by the system on field changes, status transitions, SLA events, and linked record actions. Cannot be deleted.
bash
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.

FieldViewerOperator (own)ITSM AgentITSM ManagerAdmin
title
description
severity
urgency
statuslimited
assignedTeam
assignedTolimited
cmdbItems
relatedProblems
relatedChanges
rootCause
resolutionlimited
visibility
customFieldslimited

◐ 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.

json
"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 firstResponseAt on the first public comment from the assigned team.
  • Reopen counter — Increments reopenCount each 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=critical or priority=p1 is created, the current on-call engineer (from oncall_schedules) is automatically assigned and receives an in-app + email alert. If the engineer does not acknowledge (move status to in_progress or beyond) within 15 minutes, the team manager is notified.

Events Emitted

FieldTypeRequiredDefaultDescription
incident.createdeventoptionalFired when a new incident record is created.
incident.updatedeventoptionalFired on any field change. Includes before/after diff.
incident.status_changedeventoptionalFired specifically when status transitions. Includes old and new status.
incident.assignedeventoptionalFired when assignedTo or assignedTeam changes.
incident.escalatedeventoptionalFired when severity is raised (e.g. P3 → P1).
incident.resolvedeventoptionalFired when status transitions to resolved.
incident.closedeventoptionalFired when status transitions to closed.
incident.reopenedeventoptionalFired when a resolved or closed incident is reopened.
incident.sla_warningeventoptionalFired when 75% of the SLA resolution window has elapsed.
incident.sla_breachedeventoptionalFired when the SLA resolution deadline passes without resolution.
incident.comment_addedeventoptionalFired on each new comment or work note.

API Quick Reference

GET
/api/v1/itsm/incidents

List incidents — filter by status, severity, team, date range

POST
/api/v1/itsm/incidents

Create a new incident

GET
/api/v1/itsm/incidents/:id

Get single incident with full detail

PATCH
/api/v1/itsm/incidents/:id

Update incident fields

POST
/api/v1/itsm/incidents/:id/resolve

Resolve — sets status=resolved, records resolvedAt

POST
/api/v1/itsm/incidents/:id/close

Close — sets status=closed, records closedAt

POST
/api/v1/itsm/incidents/:id/escalate

Escalate severity or reassign team

POST
/api/v1/itsm/incidents/:id/comments

Add a comment or work note

GET
/api/v1/itsm/incidents/:id/comments

List all timeline entries (comments + system events)

POST
/api/v1/itsm/incidents/:id/link

Link to a problem, change, or CMDB item

GET
/api/v1/itsm/incidents/:id/sla

Get current SLA state and remaining time

Example: Create a P1 incident

bash
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"]
}