Skip to main content

TaskRecord

A completed or in-progress task representing a form-based work assignment. Tasks originate from food safety schedules or production events. Each task captures who was assigned, when it was completed, and the full form submission data including review status.

taskIdstring

Task identifier.

Example: 4821
titlestring

Task title.

Example: Pre-Production Sanitation Check
formIdstring

Reference to the form definition this task uses.

Example: 301
formNamestring

Display name of the form.

Example: Sanitation Verification Form
sourcestring

Where this task originated: food_safety — scheduled safety check or inspection. production — triggered by a work order event (start, complete, pause).

Possible values: [food_safety, production]

Example: production
taskTypestring

Type of task: submission — operator fills out a form. approval — reviewer approves a submission. follow_up — corrective action required. escalation — escalated for higher-level review.

Possible values: [submission, approval, follow_up, escalation]

Example: submission
statusstring

Task-level status: pending — created, not yet assigned. assigned — assigned to an operator. in_progress — operator has started. completed — operator has finished. skipped — task was skipped.

Possible values: [pending, assigned, in_progress, completed, skipped]

Example: completed
prioritystring

Task priority level.

Possible values: [low, medium, high, urgent]

Example: medium
assigneeIdstring

Operator assigned to this task.

Example: usr-00412
assigneeNamestring

Display name of the assigned operator.

Example: Maria Garcia
workOrderIdstring

Linked work order ID, if this task was triggered by a production event. Null for standalone food safety tasks.

Example: 6073
scheduledDatestring<date>

Date the task was scheduled for (ISO 8601).

Example: 2025-04-10
dueDatestring<date-time>

Task due date and time (ISO 8601).

Example: 2025-04-10T12:00:00Z
createdAtstring<date-time>

When the task was created (ISO 8601).

Example: 2025-04-09T14:00:00Z
submission object

The form submission for a task. Contains the operator's responses, timestamps, and review information. The fieldData array holds the actual form content as key-value pairs matching the form definition fields.

submissionIdstring

Submission identifier.

Example: 9102
statusstring

Submission review status: draft — started but not submitted. submitted — submitted by operator. pending_approval — awaiting reviewer. approved — reviewer approved. rejected — reviewer rejected. change_requested — reviewer requested modifications.

Possible values: [draft, submitted, pending_approval, approved, rejected, change_requested]

Example: approved
submittedAtstring<date-time>

When the operator submitted the form (ISO 8601).

Example: 2025-04-10T09:45:00Z
submittedByIdstring

ID of the operator who submitted.

Example: usr-00412
submittedByNamestring

Name of the operator who submitted.

Example: Maria Garcia
reviewedAtstring<date-time>

When the submission was reviewed (ISO 8601). Null if not yet reviewed.

Example: 2025-04-10T11:20:00Z
reviewedByIdstring

ID of the reviewer. Null if not yet reviewed.

Example: usr-00108
reviewedByNamestring

Name of the reviewer.

Example: James Chen
reviewCommentsstring

Comments left by the reviewer.

fieldData object[]

The form field values captured by the operator. Each entry corresponds to a field in the form definition. The value object structure varies by field type — for example, a temperature field stores value and unit, a checklist stores items with labels and checked states.

  • Array [
  • fieldIdstring

    Form field identifier.

    Example: 501
    fieldLabelstring

    Display label for this field.

    Example: Surface Temperature
    fieldTypestring

    Type of form field (e.g., temperature, checklist, signature, text, number, photo).

    Example: temperature
    value object

    The captured value. Structure depends on fieldType.

    property name*any

    The captured value. Structure depends on fieldType.

  • ]
  • TaskRecord
    {
    "taskId": "4821",
    "title": "Pre-Production Sanitation Check",
    "formId": "301",
    "formName": "Sanitation Verification Form",
    "source": "production",
    "taskType": "submission",
    "status": "completed",
    "priority": "medium",
    "assigneeId": "usr-00412",
    "assigneeName": "Maria Garcia",
    "workOrderId": "6073",
    "scheduledDate": "2025-04-10",
    "dueDate": "2025-04-10T12:00:00Z",
    "createdAt": "2025-04-09T14:00:00Z",
    "submission": {
    "submissionId": "9102",
    "status": "approved",
    "submittedAt": "2025-04-10T09:45:00Z",
    "submittedById": "usr-00412",
    "submittedByName": "Maria Garcia",
    "reviewedAt": "2025-04-10T11:20:00Z",
    "reviewedById": "usr-00108",
    "reviewedByName": "James Chen",
    "reviewComments": "string",
    "fieldData": [
    {
    "fieldId": "501",
    "fieldLabel": "Surface Temperature",
    "fieldType": "temperature",
    "value": {}
    }
    ]
    }
    }