> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rootly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Action Item Variables

> Reference guide for action item variables available in Liquid templates for Rootly Genius workflows, integration formatting, and action item automation.

You can use action item variables with genius workflows:

## Variables

<Note>
  Use the [Liquid Markup explorer](https://rootly.com/account/help/liquid-explorer) to navigate through all action item variables.
</Note>

Rootly uses the [Liquid](https://shopify.github.io/liquid/) template language. The available variables are:

```ruby Ruby theme={null}
{{ action_item.id }} # returns string (uuid)
{{ action_item.summary }} # returns string
{{ action_item.description }} # returns string
{{ action_item.status }} # returns string
{{ action_item.priority }} # returns integer
{{ action_item.due_date }} # returns datetime
{{ action_item.url }} # returns string
{{ action_item.short_url }} # returns string
{{ action_item.created_at }} # returns datetime
{{ action_item.updated_at }} # returns datetime
{{ action_item.creator }} # returns object eg. {"id":49, "name":"John Doe", "email":"john@acme.com"}
{{ action_item.assigned_to }} # returns object eg. {"id":49, "name":"John Doe", "email":"john@acme.com"}

# Integrations

{{ action_item.jira_issue_id }} # returns string
{{ action_item.jira_issue_key }} # returns string
{{ action_item.jira_issue_url }} # returns string
{{ action_item.asana_task_id }} # returns string
{{ action_item.asana_task_url }} # returns string
{{ action_item.motion_task_id }} # returns string
{{ action_item.motion_task_url }} # returns string
# DEPRECATED {{ action_item.clubhouse_task_id }} # returns string (use shortcut_task_id)
# DEPRECATED {{ action_item.clubhouse_task_url }} # returns string (use shortcut_task_url)
{{ action_item.shortcut_story_id }} # returns string
{{ action_item.shortcut_story_url }} # returns string
{{ action_item.shortcut_task_id }} # returns string
{{ action_item.shortcut_task_url }} # returns string
{{ action_item.trello_card_id }} # returns string
{{ action_item.trello_card_url }} # returns string
{{ action_item.trello_check_item_id }} # returns string
{{ action_item.trello_check_item_url }} # returns string
{{ action_item.linear_issue_id }} # returns string
{{ action_item.linear_issue_key }} # returns string
{{ action_item.linear_issue_url }} # returns string
{{ action_item.zendesk_ticket_id }} # returns string
{{ action_item.zendesk_ticket_url }} # returns string
{{ action_item.service_now_case_id }} # returns string
{{ action_item.service_now_case_url }} # returns string
{{ action_item.airtable_base_key }} # returns string
{{ action_item.airtable_table_name }} # returns string
{{ action_item.airtable_record_id }} # returns string
{{ action_item.airtable_record_url }} # returns string
{{ action_item.freshservice_ticket_id }} # returns string
{{ action_item.freshservice_ticket_url }} # returns string
{{ action_item.freshservice_task_id }} # returns string
{{ action_item.freshservice_task_url }} # returns string

# Custom fields

{{ action_item.custom_fields }} # returns array of selection objects
{{ action_item.custom_fields_by_slug }} # returns hash of slug => value(s)
```

## Custom Fields

Action items can carry [custom field](/incidents/action-items/action-item-custom-fields) values. Two variables expose them:

### The custom\_fields\_by\_slug Variable

The simplest way to access a value. Keys are the field's slug (lower-cased and hyphenated); single-value fields return a string, while multiple select and tags fields return an array.

```ruby Ruby theme={null}
# Single-value field (text, number, date, select, etc.)
{{ action_item.custom_fields_by_slug.business-unit-owner }}
# => "Payments"

# Multi-value field (multiple select, tags)
{{ action_item.custom_fields_by_slug.impacted-regions | join: ', ' }}
# => "us-east-1, eu-west-2"
```

Values are returned in display form: user/team/service/catalog-backed selections return names, checkboxes return `Yes`/`No`, and date fields return formatted dates.

### The custom\_fields Variable

The structured form — an array of selection objects, each containing the `form_field` definition (name, slug, ID) and its selected values. Useful when you need field metadata alongside values, or a lookup key that survives renames.

Liquid's `find` and `where` filters only match on a top-level property — they can't follow a nested path like `form_field.id` (that lookup silently returns nothing). Loop over the array and compare inside the loop instead:

```ruby Ruby theme={null}
# Look up a selection by field ID — stable across renames, since slugs regenerate
{% assign target = "your-field-uuid" %}
{% for f in action_item.custom_fields %}
  {% if f.form_field.id == target %}{{ f.form_field.name }}{% endif %}
{% endfor %}
```

Reading the value depends on the field type. For free-text values (text, textarea, number, date, etc.), `selected_options` is a single object whose `value` holds the entry. For option-backed fields (select, multiple select), `selected_options` is an array of option objects, each with `id` and `value`. Testing `selected_options.value` distinguishes the two shapes:

```ruby Ruby theme={null}
{% for f in action_item.custom_fields %}
  {% if f.form_field.id == target %}
    {% if f.selected_options.value %}
      {{ f.selected_options.value }}
    {% else %}
      {% for o in f.selected_options %}{{ o.value }}{% unless forloop.last %}, {% endunless %}{% endfor %}
    {% endif %}
  {% endif %}
{% endfor %}
```

Fields backed by Rootly records (users, teams, services, catalogs, environments, causes, incident types) do **not** expose their values through `selected_options` — read those through `custom_fields_by_slug`, which returns the record names. For day-to-day templating, prefer `custom_fields_by_slug`, which normalizes all of this for you — reach for `custom_fields` only when you need to key off `form_field.id` or inspect the full selection object.

<Note>
  Custom field slugs are regenerated when a field is renamed. If your templates reference fields by slug, renaming the field will break those references.
</Note>

## Examples

```ruby Ruby theme={null}
action-item-{{ action_item.created_at | date: "%Y%m%d" }}
# Will result in: action-item-20210412
```
