# Allocation Thresholds

> Source: https://parallelworks.com/docs/organization-admin/billing/thresholds

# Allocation Thresholds

This page explains how to set and monitor allocations for your organization's groups. When a group reaches its allocation total, its users will no longer be able to start clusters.

You can also set [custom allocation thresholds](/docs/organization-admin/billing/thresholds#setting-allocation-thresholds) for your organization. This feature can alert users when their group approaches its allocation total as well as freeze or shut down clusters when an allocation total is reached.

:::info Note

The steps included on this page can only be completed by **ACTIVATE platform administrators** and users with the `org:admin` role. For more information, please see [**About Group Roles**](/docs/organization-admin/#about-group-roles).

:::

## Setting Allocations

From the **Organizations** list, select your organization. In the sidebar, under **Managing Groups**, click **Groups**.

In the **Groups** tab, click **Edit Allocations**.

![Screenshot of the user clicking the Edit Cost Allocations button.](/content-images/docs/organization-admin/billing/thresholds/click-edit-allocations.png)

Enter a value in the **Allocation Total** field. This number is measured in U.S. dollars.

Click **Save Allocations**.

![Screenshot of the user clicking Save Allocations.](/content-images/docs/organization-admin/billing/thresholds/click-save-allocations.png)

Once you've set an allocation total, a group's accumulated costs will appear in the **Allocation Used** column.

![Screenshot of the allocation usage appearing in the Allocation Used column.](/content-images/docs/organization-admin/billing/thresholds/allocations-used.png)

## Setting Allocation Thresholds

From the **Organizations** list, select your organization. In the sidebar, under **Billing**, click **Thresholds**.

Click **Add Allocation Threshold**.

![Screenshot of the user clicking the Add Allocation Threshold button.](/content-images/docs/organization-admin/billing/thresholds/click-add-threshold.png)

### Configure Allocation Thresholds

You can configure your allocation threshold with the settings outlined below.

![Screenshot of all allocation threshold settings.](/content-images/docs/organization-admin/billing/thresholds/blank-add-threshold-page.png)

#### Threshold(%)

Use this field to set the allocation threshold as a percentage from `0` to `100`. For example, if a group's allocation total is $5,000, an `85%` threshold will affect users when their total spend reaches $4,250.

#### Name

Use this field to name your threshold. Common names for thresholds include `warning` and `shutdown`.

Please note that this field must be one word, lower-cased, and contain no numbers or special characters.

#### Description

Use this field to enter a description for the alert icon that appears on clusters. When users mouse over the icon, this **Description** appears as a tool tip.

![Screenshot of tooltip on an allocation warning on the Dashboard.](/content-images/docs/organization-admin/billing/thresholds/warning-allocation-home-page.png)

#### Label Color

Use this selection tool to choose the color of the alert icon that appears on clusters. Click on the colored box to expand it into a color dropper.

![Screenshot of color dropper expanding into the color selection tool.](/content-images/docs/organization-admin/billing/thresholds/threshold-color-picker.png)

Click the arrows  to cycle the color fields between RGB, HSL, and Hex values.

#### Use Realtime Data

Use this toggle button to enable real-time cost tracking for your threshold.

By default, this option is set to `No`. If you don't enable real-time cost tracking, the cost tracking will be calculated using the true cost data from CSPs.

#### Actions

Use this dropdown menu to select the action for your threshold. Options include:

- **Notify**: Users receive an alert via email.
- **Freeze**: Users will not be able to start new clusters.
- **Shutdown**: All clusters will be shut down.

You can select more than one action at a time for your threshold alert, especially if you want users to receive a notification for `freeze` or `shutdown`. For more info, please see [**Alert Content Template**](/docs/organization-admin/billing/thresholds#alert-content-template) below.

#### Alert Subject

Use this field to enter a subject for your alert email.

#### Send To Group

Use this toggle button to send the alert email to all users in a group whenever it reaches its allocation threshold.

By default, this option is set to `Yes`.

#### Extra Recipients

Use this field to enter email addresses for additional users who will receive the threshold alert email.

#### Alert Content Template

Use this field to enter the text of the threshold alert email.

Each action has a default email template that populates this field. You can change the text or replace it completely.

If you write your own alert template, you can use the variables below in the body of your message. The variables will automatically be filled in with the correct information.

- `{allocation}`: a group's total budget allocation
- `{allocation_used}`: a group's current total spend
- `{allocation_used_percent}`: the percentage of allocation a group has used
- `{estimated_allocation_used}`: a group's current estimated (real-time) total spend
- `{estimated_allocation_used_percent}`: the estimated (real-time) percentage of allocation a group has used
- `{group}`: a group's name
- `{name}`: the threshold's label you entered in the [**Name**](/docs/organization-admin/billing/thresholds#name) field
- `{organization}`: your organization's name
- `{threshold}`: the value you entered in the [**Threshold(%)**](/docs/organization-admin/billing/thresholds#threshold) field

:::info About Alerts

If you want users to be notified about a threshold for the `freeze` or `shutdown` actions, you have to add the `notify` action too.

:::

### Save Allocation Thresholds

After you've customized the settings above, click **Save Allocation Threshold**.

![Screenshot of the new allocation appearing in the user's organization settings.](/content-images/docs/organization-admin/billing/thresholds/click-save-allocation-threshold.png)

Your new allocation threshold will appear in your organization's settings.

![Screenshot of the user clicking the edit icon for an allocation threshold.](/content-images/docs/organization-admin/billing/thresholds/click-edit-allocation-threshold-icon.png)

## Editing Allocation Thresholds

In your organization's settings, click the edit icon  to change an allocation threshold.

![Screenshot of the user clicking the delete icon for an allocation threshold.](/content-images/docs/organization-admin/billing/thresholds/click-delete-allocation-threshold-icon.png)

Next, you'll see the threshold's configuration page, where you can edit any of the settings in [**Threshold Configuration**](#configure-allocation-thresholds) above.

Click **Save Allocation Threshold** when you're done making changes.
