---
title: "Tasks"
icon: "lock"
---

{/* Auto-generated by scripts/generate_core_action_docs.py; do not edit by hand. */}

## `core.cases.create_task`

Create a new task for a case.

<Badge icon="lock" color="blue" size="lg" shape="pill">Enterprise Edition</Badge>

### Inputs

<ParamField path="case_id" type="string" required>

The ID of the case to create a task for.

</ParamField>

<ParamField path="title" type="string" required>

The title of the task.

</ParamField>

<ParamField path="assignee_id" type="string | null">

The ID of the user to assign the task to.

Default: `null`.

</ParamField>

<ParamField path="default_trigger_values" type="object | null">

The default trigger values for the task.

Default: `null`.

</ParamField>

<ParamField path="description" type="string | null">

The description of the task.

Default: `null`.

</ParamField>

<ParamField path="priority" type="string">

The priority of the task (unknown, low, medium, high, critical).

Default: `"unknown"`.

</ParamField>

<ParamField path="status" type="string">

The status of the task (todo, in_progress, blocked, completed).

Default: `"todo"`.

</ParamField>

<ParamField path="workflow_id" type="string | null">

The ID of the workflow associated with this task.

Default: `null`.

</ParamField>

### Examples

**Manage case tasks**

```yaml
- ref: create_task
  action: core.cases.create_task
  args:
    case_id: ${{ TRIGGER.case_id }}
    title: Collect email headers
    description: Pull the original message from the mail gateway.
    priority: high
    status: todo
- ref: get_task
  action: core.cases.get_task
  depends_on:
    - create_task
  args:
    task_id: ${{ ACTIONS.create_task.result.id }}
- ref: list_tasks
  action: core.cases.list_tasks
  args:
    case_id: ${{ TRIGGER.case_id }}
- ref: update_task
  action: core.cases.update_task
  depends_on:
    - create_task
  args:
    task_id: ${{ ACTIONS.create_task.result.id }}
    status: in_progress
- ref: delete_task
  action: core.cases.delete_task
  depends_on:
    - create_task
  args:
    task_id: ${{ ACTIONS.create_task.result.id }}
```

## `core.cases.get_task`

Get a specific case task by ID.

<Badge icon="lock" color="blue" size="lg" shape="pill">Enterprise Edition</Badge>

### Inputs

<ParamField path="task_id" type="string" required>

The ID of the task to retrieve.

</ParamField>

### Examples

**Manage case tasks**

```yaml
- ref: create_task
  action: core.cases.create_task
  args:
    case_id: ${{ TRIGGER.case_id }}
    title: Collect email headers
    description: Pull the original message from the mail gateway.
    priority: high
    status: todo
- ref: get_task
  action: core.cases.get_task
  depends_on:
    - create_task
  args:
    task_id: ${{ ACTIONS.create_task.result.id }}
- ref: list_tasks
  action: core.cases.list_tasks
  args:
    case_id: ${{ TRIGGER.case_id }}
- ref: update_task
  action: core.cases.update_task
  depends_on:
    - create_task
  args:
    task_id: ${{ ACTIONS.create_task.result.id }}
    status: in_progress
- ref: delete_task
  action: core.cases.delete_task
  depends_on:
    - create_task
  args:
    task_id: ${{ ACTIONS.create_task.result.id }}
```

## `core.cases.list_tasks`

List all tasks for a case.

<Badge icon="lock" color="blue" size="lg" shape="pill">Enterprise Edition</Badge>

### Inputs

<ParamField path="case_id" type="string" required>

The ID of the case to list tasks for.

</ParamField>

### Examples

**Manage case tasks**

```yaml
- ref: create_task
  action: core.cases.create_task
  args:
    case_id: ${{ TRIGGER.case_id }}
    title: Collect email headers
    description: Pull the original message from the mail gateway.
    priority: high
    status: todo
- ref: get_task
  action: core.cases.get_task
  depends_on:
    - create_task
  args:
    task_id: ${{ ACTIONS.create_task.result.id }}
- ref: list_tasks
  action: core.cases.list_tasks
  args:
    case_id: ${{ TRIGGER.case_id }}
- ref: update_task
  action: core.cases.update_task
  depends_on:
    - create_task
  args:
    task_id: ${{ ACTIONS.create_task.result.id }}
    status: in_progress
- ref: delete_task
  action: core.cases.delete_task
  depends_on:
    - create_task
  args:
    task_id: ${{ ACTIONS.create_task.result.id }}
```

## `core.cases.update_task`

Update an existing case task.

<Badge icon="lock" color="blue" size="lg" shape="pill">Enterprise Edition</Badge>

### Inputs

<ParamField path="task_id" type="string" required>

The ID of the task to update.

</ParamField>

<ParamField path="assignee_id" type="string | null">

The ID of the user to assign the task to.

Default: `null`.

</ParamField>

<ParamField path="default_trigger_values" type="object | null">

The default trigger values for the task.

Default: `null`.

</ParamField>

<ParamField path="description" type="string | null">

The updated description of the task.

Default: `null`.

</ParamField>

<ParamField path="priority" type="string | null">

The updated priority of the task (unknown, low, medium, high, critical).

Default: `null`.

</ParamField>

<ParamField path="status" type="string | null">

The updated status of the task (todo, in_progress, blocked, completed).

Default: `null`.

</ParamField>

<ParamField path="title" type="string | null">

The updated title of the task.

Default: `null`.

</ParamField>

<ParamField path="workflow_id" type="string | null">

The ID of the workflow associated with this task.

Default: `null`.

</ParamField>

### Examples

**Manage case tasks**

```yaml
- ref: create_task
  action: core.cases.create_task
  args:
    case_id: ${{ TRIGGER.case_id }}
    title: Collect email headers
    description: Pull the original message from the mail gateway.
    priority: high
    status: todo
- ref: get_task
  action: core.cases.get_task
  depends_on:
    - create_task
  args:
    task_id: ${{ ACTIONS.create_task.result.id }}
- ref: list_tasks
  action: core.cases.list_tasks
  args:
    case_id: ${{ TRIGGER.case_id }}
- ref: update_task
  action: core.cases.update_task
  depends_on:
    - create_task
  args:
    task_id: ${{ ACTIONS.create_task.result.id }}
    status: in_progress
- ref: delete_task
  action: core.cases.delete_task
  depends_on:
    - create_task
  args:
    task_id: ${{ ACTIONS.create_task.result.id }}
```

## `core.cases.delete_task`

Delete a case task.

<Badge icon="lock" color="blue" size="lg" shape="pill">Enterprise Edition</Badge>

### Inputs

<ParamField path="task_id" type="string" required>

The ID of the task to delete.

</ParamField>

### Examples

**Manage case tasks**

```yaml
- ref: create_task
  action: core.cases.create_task
  args:
    case_id: ${{ TRIGGER.case_id }}
    title: Collect email headers
    description: Pull the original message from the mail gateway.
    priority: high
    status: todo
- ref: get_task
  action: core.cases.get_task
  depends_on:
    - create_task
  args:
    task_id: ${{ ACTIONS.create_task.result.id }}
- ref: list_tasks
  action: core.cases.list_tasks
  args:
    case_id: ${{ TRIGGER.case_id }}
- ref: update_task
  action: core.cases.update_task
  depends_on:
    - create_task
  args:
    task_id: ${{ ACTIONS.create_task.result.id }}
    status: in_progress
- ref: delete_task
  action: core.cases.delete_task
  depends_on:
    - create_task
  args:
    task_id: ${{ ACTIONS.create_task.result.id }}
```
