← All resources

Resource

task_definition

A reusable task definition template with custom outcome options

GraphQL reference →

Configuration

nameString!Required

Definition name

descriptionStringOptional

Optional description

options[TaskDefinitionOption!]!Required

Outcome options; must be empty for JOURNEY templates

View TaskDefinitionOptionInput fields →

kindTaskTemplateKind!Optional

SIMPLE (the default) or JOURNEY

Allowed values

SIMPLE — Completed by choosing one of the template's outcome options

JOURNEY — Completed by running the template's journey; the journey's declared outputs complete the task

journeyHandleStringOptional

Handle of a published journey; required for JOURNEY templates, not allowed for SIMPLE ones

journeyInputMappingJSONOptional

For JOURNEY templates: an object from journey input key to a workflow expression template string. Every key must be one of the journey's inputs, and every required input must be mapped.

Input types

Fields for the structured values used in this resource’s configuration.

TaskDefinitionOptionInput

Input for a task definition option

labelString!Required

Display label

valueString!Required

Machine-readable value

Read-only values

Show values
idTaskDefinitionID!Read only

Unique identifier

computed by the platform

createdAtString!Read only

Creation timestamp (ISO8601)

computed by the platform

updatedAtString!Read only

Last update timestamp (ISO8601)

computed by the platform

Lifecycle

The CLI can create this resource. The platform assigns its id.

When replacement is needed, the existing resource is removed before its replacement is created.