# Get System Capacity

Get System Capacity is one of the Internal Data Ops operations. It queries how much capacity your system has and how much of it is currently in use, both for extensions and for concurrent calls, and stores those numbers in variables. Later components can read the variables to decide how the call should proceed.

## What it does

The component returns four values:

- The maximum number of extensions the system supports, and how many are already in use.
- The maximum number of concurrent calls the system supports, and how many are active right now.

Because the results are held in variables, you can feed them into a following component or test them in a **Condition**: for example, to play a different message when the system is near its call ceiling.

:::note
"Concurrent calls" means the calls happening at the same moment, not the total for the day. When that number reaches the system limit, no further calls can be set up until one ends, so it is a useful figure to branch on.
:::

## Configure the component

1. Drag the **Internal Data Ops** component onto the canvas, then click it to open its settings.

   ![The Internal Data Ops block placed on the call flow canvas](/images/pbx/developer-component-cfd.png)

2. In the **Component Type** drop-down list, choose **Get System Capacity**.

   ![Choosing Get System Capacity from the Component Type list](/images/pbx/get-system-capacity-cfd.png)

3. Click **Confirm** in the bottom-right corner.

:::note
Get System Capacity takes no settings of its own. Selecting it as the component type and confirming is all the setup it needs; the values it collects are then available through the variables below.
:::

## Variables

When you add a Get System Capacity component, it writes the current capacity figures into the variables below. Read them from any expression-aware component, **Condition**, for instance, to act on what the query returned.

:::note
A call flow can hold more than one Get System Capacity component, so each is numbered in the order you add it (Get System Capacity 1, Get System Capacity 2, and so on). Include the matching index in the variable name so you read from the right component.
:::

| Variable | Type | Description | Example |
|----------|------|-------------|---------|
| `$GetSystemCapacity{index}.extensionCapacity` | Integer | The maximum number of extensions the system supports. | `50` |
| `$GetSystemCapacity{index}.extensionUsed` | Integer | The number of extensions currently in use. | `33` |
| `$GetSystemCapacity{index}.ccCapacity` | Integer | The maximum number of concurrent calls the system supports. | `25` |
| `$GetSystemCapacity{index}.ccUsed` | Integer | The number of concurrent calls active right now. | `1` |

:::tip
To branch on how busy the system is, compare the used value against the capacity in a following **Condition** component. For example, the expression `$GetSystemCapacity1.ccUsed >= $GetSystemCapacity1.ccCapacity` becomes true once every concurrent-call slot is taken, so you could route those callers to a **Prompt** that asks them to try again shortly.
:::

## What it can connect to

A Get System Capacity component leads to **exactly one** downstream component. Any of the following can follow it:

:::caution
On its own this component does nothing the caller can hear; it only stores the capacity figures in variables. To change how the call behaves, the next component (or a later **Condition**) must actually read those variables. The query by itself has no effect on the call.
:::

| Component | Purpose |
|-----------|---------|
| [Prompt](/pbx/call-flow-designer-guide/prompt/) | Play an audio file or a text-to-speech message to the caller. |
| [Business Hours](/pbx/call-flow-designer-guide/business-hours/) | Route the call to different destinations depending on the time of day. |
| [Menu](/pbx/call-flow-designer-guide/menu/) | Offer callers a set of options and route them by the DTMF (Dual-Tone Multi-Frequency, the touch-tone a phone keypad sends) key they press. |
| [User Input](/pbx/call-flow-designer-guide/user-input/) | Collect DTMF digits from the caller, usually paired with **Condition** to act on what was entered. |
| [Language](/pbx/call-flow-designer-guide/language/) | Change the system prompt language for the rest of the flow. |
| [Record](/pbx/call-flow-designer-guide/record/) | Start recording once the caller connects to another party, with optional notification prompts, or turn recording off for a call that would otherwise be recorded. |
| [Dial by Number](/pbx/call-flow-designer-guide/dial-by-number/) | Let callers dial a number directly to reach their destination. |
| [Dial by Name](/pbx/call-flow-designer-guide/dial-by-name/) | An end component that lets callers reach a user by typing the first three letters of their name. |
| [Transfer](/pbx/call-flow-designer-guide/transfer/) | An end component that sends the caller to a chosen destination, with optional prompts announcing the transfer. |
| [Hang Up Call](/pbx/call-flow-designer-guide/hang-up-call/) | An end component that disconnects the call. |
| [Condition](/pbx/call-flow-designer-guide/condition/) | Route the call based on logical expressions. |
| [Loop](/pbx/call-flow-designer-guide/loop/) | Repeat a group of components a set number of times or until a condition is met. |
| Internal Data Ops | Read from and write to the Cloud Voice system's own database. See [Get Extension Presence Status](/pbx/call-flow-designer-guide/get-extension-presence-status/), [Set Extension Presence Status](/pbx/call-flow-designer-guide/set-extension-presence-status/), [Get Queue Agent](/pbx/call-flow-designer-guide/get-queue-agent/), [Get Queue Info](/pbx/call-flow-designer-guide/get-queue-info/), [Get Agent Status](/pbx/call-flow-designer-guide/get-agent-status/), [Set Agent Status](/pbx/call-flow-designer-guide/set-agent-status/), [Get System Info](/pbx/call-flow-designer-guide/get-system-info/), [Get System Capacity](/pbx/call-flow-designer-guide/get-system-capacity/), [Get Extension Info](/pbx/call-flow-designer-guide/get-extension-info/), and [Get Company Contact Info](/pbx/call-flow-designer-guide/get-company-contact-info/). |
| [Email Sender](/pbx/call-flow-designer-guide/email-sender/) | Send an email for real-time notifications, alerts, or user-specific information. |
| [Database Access](/pbx/call-flow-designer-guide/database-access/) | Run a SQL (Structured Query Language) operation against an external database during the call flow. |
| [HTTP Request](/pbx/call-flow-designer-guide/http-request/) | Send an HTTP (HyperText Transfer Protocol) request to an external server to exchange data with a third-party service. |
