Overview

The Problem Solving API manages root cause analysis sheets used during operational excellence investigations. Each sheet uses one of three methodologies (5 Whys, Ishikawa, WWWHWWH) and follows a formal lifecycle: draft, in_progress, completed, reviewed. Sheets can be linked to actions as their root cause for end-to-end traceability.

All procedures are tenant-scoped via organizationId and include audit trail logging.

Create Sheet

Create a new problem-solving sheet on a board.

POST /api/trpc/problemSolving.create

Request:

{
  "json": {
    "boardId": "brd_01HXK5...",
    "title": "OEE drop on Line 3 — March 2026",
    "type": "five_whys",
    "data": {}
  }
}
FieldTypeRequiredDescription
boardIdstringYesBoard to attach the sheet to
titlestringYesDescriptive title of the problem
typestringYesMethodology: five_whys, ishikawa, or wwwhwwh
dataobjectNoAnalysis data payload (can be populated incrementally)

The sheet is created in draft status with createdById set to the authenticated user.

Update Sheet

Partially update an existing problem-solving sheet. Only provided fields are changed.

POST /api/trpc/problemSolving.update
{
  "json": {
    "id": "ps_01HXK5...",
    "title": "Updated title",
    "data": {
      "whys": [
        { "question": "Why did OEE drop?", "answer": "Machine 3 had unplanned downtime" },
        { "question": "Why was there unplanned downtime?", "answer": "Bearing failure" }
      ]
    }
  }
}
FieldTypeRequiredDescription
idstringYesSheet ID
titlestringNoUpdated title
dataobjectNoUpdated analysis data (replaces entire data payload)

Delete Sheet

Delete a problem-solving sheet permanently.

POST /api/trpc/problemSolving.delete
{
  "json": {
    "id": "ps_01HXK5..."
  }
}

Deleting a sheet removes all analysis data permanently. This action cannot be undone.

Get Sheet by ID

Retrieve a single problem-solving sheet with full details.

GET /api/trpc/problemSolving.getById?input={"json":{"id":"ps_01HXK5..."}}

Response:

{
  "result": {
    "data": {
      "json": {
        "id": "ps_01HXK5...",
        "title": "OEE drop on Line 3 — March 2026",
        "type": "five_whys",
        "status": "in_progress",
        "data": { "whys": [...] },
        "boardId": "brd_01HXK5...",
        "actionId": null,
        "createdById": "usr_01HXK5...",
        "reviewedById": null,
        "reviewedAt": null,
        "createdAt": "2026-03-20T09:00:00.000Z",
        "updatedAt": "2026-03-21T14:30:00.000Z"
      }
    }
  }
}

List Sheets

List problem-solving sheets for a board with optional filters and pagination.

GET /api/trpc/problemSolving.list?input={"json":{"boardId":"brd_01HXK5...","type":"five_whys","status":"draft","limit":50,"offset":0}}
ParameterTypeRequiredDescription
boardIdstringYesBoard ID
actionIdstringNoFilter by linked action
typestringNofive_whys, ishikawa, or wwwhwwh
statusstringNodraft, in_progress, completed, or reviewed
limitnumberNoResults per page (1-200, default: 50)
offsetnumberNoPagination offset (default: 0)

Response:

{
  "result": {
    "data": {
      "json": {
        "items": [...],
        "total": 12,
        "hasMore": false
      }
    }
  }
}

Get Sheets by Action

Retrieve all problem-solving sheets linked to a specific action.

GET /api/trpc/problemSolving.getByAction?input={"json":{"actionId":"act_01HXK5..."}}

Update Status

Update only the status of a problem-solving sheet.

POST /api/trpc/problemSolving.updateStatus
{
  "json": {
    "id": "ps_01HXK5...",
    "status": "in_progress"
  }
}
FieldTypeRequiredDescription
idstringYesSheet ID
statusstringYesdraft, in_progress, completed, or reviewed

Submit for Review

Transition a sheet from draft/in_progress to completed status.

POST /api/trpc/problemSolving.submit
{
  "json": {
    "id": "ps_01HXK5..."
  }
}

Only sheets in draft or in_progress status can be submitted. Attempting to submit an already completed or reviewed sheet returns a 400 error.

Review (Sign-off)

Mark a completed sheet as formally reviewed. Records the reviewer and timestamp.

POST /api/trpc/problemSolving.review
{
  "json": {
    "id": "ps_01HXK5...",
    "comment": "Root cause analysis verified. Corrective actions adequate."
  }
}
FieldTypeRequiredDescription
idstringYesSheet ID
commentstringNoReview comment

Only sheets in completed status can be reviewed. The reviewer’s user ID and timestamp are automatically recorded for audit trail compliance.

Link a problem-solving sheet to an action as its root cause, creating a traceability chain from action to analysis.

POST /api/trpc/problemSolving.linkToRootCause
{
  "json": {
    "sheetId": "ps_01HXK5...",
    "actionId": "act_01HXK5..."
  }
}
FieldTypeRequiredDescription
sheetIdstringYesProblem-solving sheet ID
actionIdstringYesAction ID to link to

This sets the action’s rootCauseId to the sheet ID, enabling bidirectional navigation between the action and its root cause analysis.

Use this endpoint to build full traceability chains: KPI breach -> action -> root cause analysis. This is essential for CAPA workflows in regulated environments.