Tasks

Fields and outcomes

Collect typed values on a task and route the workflow by the outcome the person chooses.

Outcomes

A User Task lists its outcomes, for example Approved and Rejected. Each outcome is a button on the task and an outgoing edge on the canvas with the same label. When the task is completed, the run resumes on the matching edge and {{outcome}} and {{outcome_notes}} are set.

Fields

fields define what the person fills in. Five types are supported:

TypeStored asNotes
textstringplaceholder, default
numbernumber
dateISO date
booleantrue / false
choicestringoptions (at least one)

Each field has a key (defaults to the label in snake_case), a label and required. Keys must be unique in the task. After completion the values are available as {{task_data.<key>}} (also {{task.data.<key>}}).

User Task config
{
  "task_title": "Approve invoice {{invoice_number}}",
  "task_description": "{{vendor.name}} · {{=FORMAT_NUMBER(amount, 2)}} {{currency}}",
  "outcomes": ["Approved", "Rejected"],
  "fields": [
    { "key": "amount", "label": "Approved amount", "type": "number", "required": true, "default": "{{amount}}" },
    { "key": "cost_centre", "label": "Cost centre", "type": "choice", "options": ["OPS", "FIN", "IT"], "required": true },
    { "key": "comment", "label": "Comment", "type": "text" }
  ]
}

Several assignees

When a task is assigned to several people, completion_rule decides when it is done:

RuleCompletes when
first_responsethe first person responds (their outcome wins)
all_completeeveryone has responded (the most common outcome wins)
consensusat least min_responses people agree
unanimouseveryone chooses the same outcome
customcustom_rule_expression evaluates true

Every response is kept ({{task.responses}}, {{task.outcome_counts}}), and the rule is applied the same way whether people respond in the app, through the API or through an agent.