# Set Extension Presence Status

Use the **Set Extension Presence Status** component to change an extension's current presence from inside a call flow. This page explains what the component does, how to configure it, and which components it can feed into.

## What it does

This component sets the presence status of an extension while a call flow is running. You can point it at a fixed extension, or use an expression to resolve the target extension at run time, and then choose the presence value to apply.

Presence status is the label that says whether a user is reachable (for example **Available**, **Away**, **Do Not Disturb**, **Lunch Break**, or **Business Trip**). Because each extension can route or block its own calls based on that label, changing presence from a call flow lets you automate it. For example, you can flip a receptionist's extension to **Away** when a menu option is chosen, or set a user to **Do Not Disturb** after hours.

:::note
Presence is normally set by the user in the Cloud Voice App or on their phone. This component overrides it programmatically, so the value you apply stays in effect until something (a user, another flow, or a schedule) changes it again. It is not limited to the current call.
:::

## Configure the component

Set Extension Presence Status is one of the operations provided by the **Internal Data Ops** component. "Internal Data Ops" is the component that reads from and writes to your phone system's own database.

1. Add an **Internal Data Ops** component to your call flow, then click it to open its settings.

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

2. Open the **Component Type** drop-down list and choose **Set Extension Presence Status**.

   ![Set Extension Presence Status selected in the Component Type list](/images/pbx/set-extension-presence-status-cfd.png)

3. Choose how to identify the extension whose presence you want to change:

   ![Options for choosing the target extension](/images/pbx/developer-select-ext-cfd.png)

   - **Extension**: Pick a specific extension from the drop-down list.
   - Expression: Click the ![Expression icon](/images/pbx/fx.png) icon to build an expression that resolves the extension dynamically.

     ![Expression editor for the target extension](/images/pbx/get-extension-presence-status-expression.png)

     For instance, entering `$Session.ani` targets whichever extension matches the caller's number. ANI (Automatic Number Identification) is the caller's own number, also shown as Caller ID.

     :::tip
     Use a specific **Extension** whenever the target is known ahead of time: it is simpler and cannot resolve to the wrong value. Reach for an expression only when the extension must be decided during the call.
     :::

     :::caution
     An expression must resolve to a valid internal extension. `$Session.ani` only matches when the caller is dialing from one of your own extensions. If an outside caller triggers this flow, their external number will not match any extension and the presence change will not apply.
     :::

     :::note
     For details on the available variables and functions, see [Variables and Functions in Cloud Voice Expression](/pbx/call-flow-designer-guide/constants-and-variables-in-cloud-voice-cfd-expression/).
     :::

4. In the **Presence** drop-down list, select the status to apply.

   ![Presence status drop-down list](/images/pbx/developer-select-presence.png)

   :::caution
   Presence drives how that extension handles its own incoming calls. Setting a status such as **Do Not Disturb** can send the extension's future calls straight to voicemail until the presence is changed back. Confirm the value is what you want before you save.
   :::

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

## Supported connections

Set Extension Presence Status can pass the call to **one** downstream component. Any of the following are valid targets.

| Component | Description |
|-----------|-------------|
| [Prompt](/pbx/call-flow-designer-guide/prompt/) | Plays an audio prompt or a text-to-speech message to the caller. |
| [Business Hours](/pbx/call-flow-designer-guide/business-hours/) | Routes calls to different destinations depending on the time of day. |
| [Menu](/pbx/call-flow-designer-guide/menu/) | Offers callers a set of options and routes the call based on the DTMF (Dual-Tone Multi-Frequency, the tone a phone keypad sends) digit pressed. |
| [User Input](/pbx/call-flow-designer-guide/user-input/) | Collects DTMF digits from the caller, typically paired with a Condition component to evaluate the input and route accordingly. |
| [Language](/pbx/call-flow-designer-guide/language/) | Switches the system prompt language for the components that follow in the flow. |
| [Record](/pbx/call-flow-designer-guide/record/) | Starts recording once the caller connects to another party, with optional prompts announcing the recording. It can also disable recording for calls that would otherwise be recorded. |
| [Dial by Number](/pbx/call-flow-designer-guide/dial-by-number/) | Lets 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 entering the first three letters of that user's 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/) | Routes the call based on logical expressions. |
| [Loop](/pbx/call-flow-designer-guide/loop/) | Repeats a group of components a set number of times or until a condition is satisfied. |
| [Internal Data Ops](/pbx/call-flow-designer-guide/get-extension-presence-status/) | Queries and updates data held in the PBX-native (Private Branch Exchange, your phone system) database. See the related operations: [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/) | Sends email for real-time notifications, alerts, or delivery of user-specific information. |
| [Database Access](/pbx/call-flow-designer-guide/database-access/) | Runs SQL (Structured Query Language) operations against a database to read or update data during the call flow. |
| [HTTP Request](/pbx/call-flow-designer-guide/http-request/) | Sends HTTP (HyperText Transfer Protocol) requests to external web servers to exchange data with third-party services. |
