> ## 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.

# Environments

> Define and prioritize the environments (production, staging, development) affected by incidents to ensure proper response urgency and resource allocation.

## Overview

**Environments** allow you to characterize incidents by the environment that they are impacting. For example, incidents impacting PROD should take priority over incidents only impacting DEV.

<Frame>
  <img src="https://mintcdn.com/rootly/OVd58onR8faXRZwf/images/configuration/env-1.webp?fit=max&auto=format&n=OVd58onR8faXRZwf&q=85&s=6eaff2438ad72d8f518156bd616816a0" alt="Document image" width="895" height="323" data-path="images/configuration/env-1.webp" />
</Frame>

## Field Type

**Environments** can be customized to be either a **select** or **multi-select** field type. This means you can configure it to allow only one environment value to be selected per incident or allow multiple environment values to be selected per incident.

<Frame>
  <img src="https://mintcdn.com/rootly/OVd58onR8faXRZwf/images/configuration/env-2.webp?fit=max&auto=format&n=OVd58onR8faXRZwf&q=85&s=01d1c508d78bfd4536c7b4eb102ed628" alt="Document image" width="905" height="822" data-path="images/configuration/env-2.webp" />
</Frame>

## Attributes

**Environments** can be configured with the following attributes. Each environment attribute can be referenced via Liquid syntax.

<Note>
  Since the environment field can be either a **select** or **multi-select** field type, the Liquid syntax to reference each field type will differ.

  Select will follow a single-value syntax

  `{{incident.raw_environments | get: '<attribute>'}}`

  Multi-select will follow an array syntax. Where i references the specific environment object in the list of environments.

  `{{incident.raw_environments[index] | get: '<attribute>'}}`
</Note>

### ID

This is the unique identifier of the environment. This field **cannot be customized**. Rootly will automatically assign the *ID* upon creation. It is typically used in Liquid references and API calls.

The following Liquid syntax will allow you to list out the environment *ID*(s) that are selected for an incident:

`{{ incident.environment_ids }}`

**OR**

* `{{ incident.raw_environments | get: 'id'}}` for select field type
* `{{ incident.raw_environments[index] | get: 'id'}}` for multi-select field type

### Name

This is the value that is displayed on the UI for the environment. This field is customizable.

The following Liquid syntax will allow you to list out the environment *name*(s) that are selected for an incident:

`{{ incident.environments }}`

**OR**

* `{{ incident.raw_environments | get: 'name'}}` for select field type
* `{{ incident.raw_environments[index] | get: 'name' }}` for multi-select field type

### Slug

This is the string that is used to reference the environment in Liquid references. This field is automatically generated by lower-casing and hyphenating the environment *name*.

The following Liquid syntax will allow you to list out the environment *slug*(s) that are selected for an incident:

`{{ incident.environment_slugs }}`

**OR**

* `{{ incident.raw_environments | get: 'slug'}}` for select field type
* `{{ incident.raw_environments[index] | get: 'slug' }}` for multi-select field type

### Description

This value is displayed on the UI to describe each environment. This field is customizable.

The following Liquid syntax will allow you to list out the environment *description*(s) that are selected for an incident:

* `{{ incident.raw_environments | get: 'description'}}` for select field type
* `{{ incident.raw_environments[index] | get: 'description' }}` for multi-select field type

### Color

Each environment can be assigned a color, which will be used for color-coding on metrics graphs.

<Note>
  Rootly uses **color-hex codes**. E.g. #000000 is black, #ffffff is white. Use [this page](https://www.color-hex.com/) to help you find the exact hex code for the color you want.
</Note>

The following Liquid syntax will allow you to list out the environment *color*(s) that are selected for an incident:

* `{{ incident.raw_environments | get: 'color'}}` for the select field type
* `{{ incident.raw_environments[index] | get: 'color' }}` for a multi-select field type

### Slack Channels

Each environment can be linked to one or more Slack channels. By default, Rootly does not notify the linked channel(s) when an environment is selected for an incident. Notification needs to be explicitly called out as Attached Environment Channels in workflow configurations.

Systematically, each Slack channel is stored as an object containing an ID and name.

The following Liquid syntax will allow you to list out the environment *Slack Channel*(s) that are selected for an incident:

* `{{ incident.raw_environments | get: 'slack_channels'}}` for the select field type
* `{{ incident.raw_environments[index] | get: 'slack_channels' }}` for a multi-select field type

### Slack Aliases

Each environment can be linked to one or more Slack user groups (aka aliases). By default, Rootly does not invite users in the linked user group(s) when an environment is selected for an incident. Invitations need to be explicitly called out as Attached Environment Aliases in workflow configurations.

The following Liquid syntax will allow you to list out the environment *Slack Alias*(es) that are selected for an incident:

* `{{ incident.raw_environments | get: 'slack_aliases'}}` for select field type
* `{{ incident.raw_environments[index] | get: 'slack_aliases' }}` for multi-select field type

### Notify Emails

Each environment can be linked to one or more emails. By default, Rootly does not send emails to the linked address(es) when an environment is selected for an incident. Notification needs to be explicitly called out as `{{ incident.raw_environments | map: 'notify_emails' | flatten | join: ',' }}` in workflow configurations.

The following Liquid syntax will allow you to list out the environment *Notify Email*(s) that are selected for an incident:

* `{{ incident.raw_environments | get: 'notify_emails'}}` for select field type
* `{{ incident.raw_environments[index] | get: 'notify_emails' }}` for multi-select field type
