# Choose Test or Live for a deployment

import { Steps } from "@astrojs/starlight/components"

A deployment runs in **Test** or **Live**. Test lets you try external triggers for a limited window without using the
live quota. Live keeps those triggers on and counts as one live flow deployment. You choose the mode in **Deploy your
flow**, and you can change it later from the deployment’s **Test** or **Live** pill.

## When to use

- You are deploying a flow and need triggers only while you test, not all the time.
- A deployment should keep listening for webhooks, email, schedules, or chat after you leave the designer.
- You want to see how many live flow deployments the organization is using, including when that quota is already full.

Before you begin, you need permission to deploy the flow to the target environment. Switching mode on an existing
deployment needs permission to edit that deployment.

## Guide

### Choose a mode while you deploy

**Deploy your flow** asks for an environment, a version, and a mode. **Mode** stays unavailable until you select an
environment. New deployments start in **Test**.

**Test** means gated external triggers (webhook, email, schedule, and chat) work while a test session is on, then stop.
Manual runs always work. A Test deployment does not count toward the Live quota.

**Live** means triggers always work. One Live deployment counts as 1 toward the organization’s Live quota. If that
quota is already full, the menu says **Live quota is full.** You can still select **Live** and deploy. The new
deployment still counts.

<ol>
<li>

**Open Deploy flow.** On **Flows**, open the flow card menu (⋯) and choose **Deploy flow…**.

</li>
<li>

**Select an environment.** In **Deploy your flow**, choose **Environment**. **Version** and **Mode** become available
after that.

</li>
<li>

**Choose the version and mode.** Select **Version**, then open **Mode** and choose **Test** or **Live**. Confirm with
**Deploy**. When you deploy to a new environment, re-assign the credentials used in the flow.

</li>
</ol>
### Switch an existing deployment

The same **Test** / **Live** choice is on the deployment pill in **Flows** and in the designer. Open it and pick the
other mode. Moving to **Live** uses one quota slot. Moving back to **Test** releases that slot. Triggers follow the
rules of the mode you land on.

<ol>
<li>

**Open Deployment mode.** On the deployment, choose the **Test** or **Live** pill.

</li>
<li>

**Pick the other mode.** Choose **Test** or **Live**. The pill shows the new mode when the change is saved.

</li>
</ol>
### Enable or disable Test triggers

In **Test**, the designer header shows **Enable triggers** or **Disable triggers** when the flow has at least one
gated trigger (webhook, email, schedule, or chat). **Enable triggers** starts an 8-hour listening session. **Disable
triggers** ends it. Manual Run still works either way.

**Live** has no Enable/Disable control. Triggers stay on. The latest version stays editable when you have edit
permission; a named version stays read-only.

Hover **Enable triggers** or **Disable triggers** to read what the next change will do.

<ol>
<li>

**Read the current state.** In the designer header on a **Test** deployment with a gated trigger, look at **Enable
triggers** or **Disable triggers**.

</li>
<li>

**Change it.** Choose the control. A short confirmation states whether triggers are on or off, and until when they stay
on.

</li>
</ol>
### See whether a trigger step is listening

Webhook, email, schedule, and chat steps show **ON** or **OFF** while you are in the designer for that deployment.
**ON** means external triggers are on. **OFF** means they are off. Manual Run is separate: in **Test** it still works
when the pill says **OFF**.

### Read the live flow deployments quota

Organization admins see **Live flow deployments** under **Resources** on the organization **Quotas** page. The info
control describes it as the number of flow deployments that can be live in a month. The count can go past the limit.
Passing the limit does not stop a new **Live** deployment.

**Quota notifications** on that page lists extra addresses that are emailed when a quota crosses a warning level and
when it reaches its limit. Organization admins are included on that email as well.

## Example

A builder deploys **Enrich phishing URL** to **Staging** in **Test**, chooses **Enable triggers**, and sends one
webhook. Triggers stay on until the time shown in the confirmation, then stop. Manual Run still works after that. After
the flow is signed off, they open **Deploy flow…**, choose **Prod** and the named version, and set **Mode** to
**Live**. The deployment counts as one live flow deployment, and its trigger steps stay **ON**.

## Keep in mind

- **Test** does not count toward the Live quota. **Live** does, including when the quota is already full.
- In **Test**, **Disable triggers** turns gated external triggers off. In **Live**, triggers stay on.
- The latest version is editable when you have permission. Named versions are read-only.
- The mode pill is disabled while a deployment is being created, and until an environment is selected in **Deploy your
  flow**.

## Related

- [Manage versions and deployments](../manage-version-and-deployments/)
- [Operate](../)
