TaskState
A task requiring human action
Fields
Unique identifier
Task type (manual or approval)
Possible values (3)
MANUALA manual task with custom outcomes
APPROVALAn approval task from a workflow
AGENT_AUTOMATEDA task automatically resolved by an AI agent
Current status
Possible values (7)
CREATEDTask has been created
ALLOCATEDTask allocated to a specific user
WORKINGTask is being worked on
PAUSEDTask is paused
COMPLETEDTask has been completed
CANCELLEDTask has been cancelled
REJECTEDTask has been rejected
Task title
Optional description
Associated task definition (for manual tasks)
Linked resource type (e.g., job, component)
Linked resource ID
Directly assigned user
Assigned team
User who claimed this team task
User who created this task
Priority (higher = more urgent)
Due date (ISO8601)
Selected outcome value
Additional outcome data (JSON)
Workflow execution (for approval tasks)
Workflow node ID (for approval tasks)
Completion timestamp (ISO8601)
Creation timestamp (ISO8601)
Last update timestamp (ISO8601)
TypeID of the record this task is about. Derived from resourceType/resourceId for older tasks; null when unknown.
A personal to-do the person created for themself. Visible to task readers like any task; its owner can always read it.
For a task from a JOURNEY template: the journey's launch inputs the workflow seeded from its data, keyed by input key (a resource input is { id, label }). Null for other tasks.
The task's template: its name, its description (the instructions) and its outcome options. Readable by anyone who can read the task; null when the task has no template or it was deleted.
Name of the assigned team; null when the task has no team or it was deleted.
Name of the workflow whose execution created this task; null for tasks created outside a workflow.
The record this task is about (see subjectId), with its label and status when the caller may read that record. Meant for a single task view, not long lists: it queries the record per task.
Time people logged on this task, newest first, voided entries included. Anyone who can read the task reads all its entries.
Total seconds of finished, non-void time logged on this task; a running timer is not counted until it stops.
The caller's running timer on this task, or null.
Referenced by (4)
Exact type SDL
"""A task requiring human action"""
type TaskState {
"""Unique identifier"""
id: TaskID!
"""Task type (manual or approval)"""
type: TaskType!
"""Current status"""
status: TaskStatus!
"""Task title"""
title: String!
"""Optional description"""
description: String
"""Associated task definition (for manual tasks)"""
taskDefinitionId: TaskDefinitionID
"""Linked resource type (e.g., job, component)"""
resourceType: String
"""Linked resource ID"""
resourceId: String
"""Directly assigned user"""
assignedUserId: UserID
"""Assigned team"""
assignedTeamId: TeamID
"""User who claimed this team task"""
claimedByUserId: UserID
"""User who created this task"""
createdByUserId: UserID!
"""Priority (higher = more urgent)"""
priority: Int!
"""Due date (ISO8601)"""
dueAt: ISO8601
"""Selected outcome value"""
outcome: String
"""Additional outcome data (JSON)"""
outcomeData: String
"""Workflow execution (for approval tasks)"""
workflowExecutionId: WorkflowExecutionID
"""Workflow node ID (for approval tasks)"""
workflowNodeId: String
"""Completion timestamp (ISO8601)"""
completedAt: ISO8601
"""Creation timestamp (ISO8601)"""
createdAt: String!
"""Last update timestamp (ISO8601)"""
updatedAt: String!
"""
TypeID of the record this task is about. Derived from resourceType/resourceId for older tasks; null when unknown.
"""
subjectId: ID
"""
A personal to-do the person created for themself. Visible to task readers like any task; its owner can always read it.
"""
personal: Boolean!
"""
For a task from a JOURNEY template: the journey's launch inputs the workflow seeded from its data, keyed by input key (a resource input is { id, label }). Null for other tasks.
"""
journeySeed: JSON
"""
The task's template: its name, its description (the instructions) and its outcome options. Readable by anyone who can read the task; null when the task has no template or it was deleted.
"""
taskDefinition: TaskDefinitionState
"""
Name of the assigned team; null when the task has no team or it was deleted.
"""
assignedTeamName: String
"""
Name of the workflow whose execution created this task; null for tasks created outside a workflow.
"""
workflowName: String
"""
The record this task is about (see subjectId), with its label and status when the caller may read that record. Meant for a single task view, not long lists: it queries the record per task.
"""
subject: TaskSubject
"""
Time people logged on this task, newest first, voided entries included. Anyone who can read the task reads all its entries.
"""
timeEntries(
"""Number of entries from the newest"""
first: Int
"""Cursor to start after"""
after: String
): TaskTimeEntryConnection!
"""
Total seconds of finished, non-void time logged on this task; a running timer is not counted until it stops.
"""
timeSpentSeconds: Int!
"""The caller's running timer on this task, or null."""
myRunningTimer: TaskTimeEntry
}