> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open.cx/llms.txt
> Use this file to discover all available pages before exploring further.

# Agentic Workflows introduction

> Agentic Workflows are a trigger plus steps that run on your sessions. Read this before automating routing, follow-ups, alerts and AI tools.

An Agentic Workflow is a trigger plus a chain of steps that OpenCX runs on your sessions: when something happens (a session is created, a customer goes quiet, an SLA is breached), the steps run in order. Use workflows for the work that should happen the same way every time, without an agent or the AI deciding to do it.

> [!NOTE]
>
> **Agentic Workflows** in the main sidebar of your [OpenCX dashboard](https://platform.open.cx/workflows). Viewing needs the **Workflows** permission (Read); building and activating needs **Workflows** (Write).

> [!TIP]
>
> Ready to build? Go to **[Build a workflow](https://docs.open.cx/workflows/build-a-workflow.md)**.

## How a workflow is put together

| Part | What it does |
| - | - |
| **Trigger** | The event that starts a run. Each workflow has exactly one, for example **Ticket Created**, **Customer Inactive** or **Cron Trigger**. |
| **Steps** | The actions a run performs: reply on a session, tag it, assign a team, call an API, ask the AI a question, post to Slack. |
| **If Block** | A condition that splits the run into a true path and a false path. Only the steps on the path taken run. |
| **Variables** | References like `{{trigger.ticketNumber}}` that pass data from the trigger and earlier steps into later steps. |

Every time the trigger fires, OpenCX starts a **run**. Runs are listed in the workflow's **Runs** tab with each step's input, output and errors. See [Test and monitor workflows](https://docs.open.cx/workflows/test-and-monitor.md).

Some trigger and step names use the word "ticket" (for example **Tag Ticket**). They act on OpenCX sessions.

## What teams use workflows for

> [accordion] Route handed-off sessions to the right team
>
> Trigger: **Ticket Handed Off**. Steps: **Auto Assign to Support Team** picks a team from the session summary, then **Tag Ticket** labels the session. Add an **If Block** on the sentiment to send angry customers to a priority team with **Assign Ticket to Support Team** instead.

> [accordion] Follow up when a customer goes quiet
>
> Trigger: **Customer Inactive** (for example, inactive for 24 hours after an agent reply). Steps: **Reply to ticket** with a check-in message, **Wait** two days, **Get Session By Ticket** to read the current status, then an **If Block** that runs **Close Ticket** only if the session is still open.

> [accordion] Alert your team when an SLA is breached
>
> Trigger: **SLA First Reply Breached**. Steps: **Send Message to a Slack Channel** with the session number and team, then **Apply SLA** or **Change Ticket Assignee** to escalate.

> [accordion] Give the AI a multi-step tool
>
> Trigger: **AI Trigger**. The AI calls the workflow mid-session when the customer's request matches **The Goal of the Workflow**. Steps: **Make HTTP request** to your order system, an **If Block** on the response, then **Merge Custom Data** to save the result on the session.

> [accordion] Give agents one-click tasks on a session
>
> Trigger: **Manual Ticket Trigger**. Agents run it from the **Run Workflow** card on a session, optionally filling a short form first. Steps: **Create Zendesk Ticket from Session**, then **Append note** with the **Ticket URL** it returns.

The full list of triggers and steps, and which need a specific integration or channel, is in [Triggers and steps](https://docs.open.cx/workflows/triggers-and-steps.md).

## Workflows, AI Actions and Autopilot

| Feature | Who decides it runs | Best for |
| - | - | - |
| [AI Actions](https://docs.open.cx/actions/introduction.md) | The AI, mid-session | One HTTP call to your systems, such as an order lookup. |
| Workflow with **AI Trigger** | The AI, mid-session | A tool with several steps, branches or built-in OpenCX steps. The AI sees the workflow name and **The Goal of the Workflow**, and collects the data in **Payload Shape** from the session. |
| Workflow with any other trigger | The event itself | Work that must always happen: routing, tagging, follow-ups, alerts, syncing to other tools. |
| [Autopilot](https://platform.open.cx/settings/autopilot) | Your Autopilot settings | Whether the AI answers a session on its own. |

Workflows work alongside Autopilot rather than replacing it. Steps such as **Set Conversation Mode** (switch a session between Autopilot and Assist mode), **Assign Ticket to AI**, **Unassign AI** and **Respond with AI** change how the AI handles a single session. The **AI Response Requested** trigger only fires when the AI would actually reply, so it never fires on handed-off sessions or where Autopilot is off.

AI phone agents use the workflows linked to them in the phone agent editor, not the **Channels** filter on the **AI Trigger**.

## Workflow life cycle

| Stage | What it means | Runs on real events? |
| - | - | - |
| **Draft** | Your unsaved edits. The editor autosaves them to your own draft; teammates don't see them. | No |
| **Saved version** | **Save** checks the workflow and stores it as a new numbered version (v1, v2, …). New versions start inactive. | No |
| **Active version** | **Activate** turns one saved version on and turns off any other active version of the same workflow. | Yes |
| **Deactivated** | **Deactivate** stops the active version. Its runs and history stay. | No |

The workflow list shows each workflow as **Active** or **Draft**, grouped by trigger. Editing an active workflow never changes what's running: your edits go to your draft, and the active version keeps running until you save a new version and activate it. **Version history** keeps every saved version, so you can switch back to an older one by activating it. See [Build a workflow](https://docs.open.cx/workflows/build-a-workflow.md#version-history-and-restoring-a-version).

## Who can use workflows

Permissions are set per role in [Settings → Roles](https://platform.open.cx/settings/roles). See the [permissions reference](https://docs.open.cx/security/permissions-reference.md).

| Task | Permission |
| - | - |
| Open **Agentic Workflows** and see workflows, versions and runs | **Workflows** (Read) |
| Create, edit, save, activate, deactivate, duplicate and delete workflows; cancel or resume runs | **Workflows** (Write) |
| Test a workflow, or run a session workflow from the inbox, without editing | **Run workflows** (Write) |
| Run a session workflow from the **Run Workflow** card on sessions assigned to you | **Assigned sessions** (Write) |

***

## Related Documentation

> [card] [Build a workflow](https://docs.open.cx/workflows/build-a-workflow.md)
>
> Canvas, conditions, variables, versions.

> [card] [Triggers and steps](https://docs.open.cx/workflows/triggers-and-steps.md)
>
> Every trigger and step, with requirements.

> [card] [Test and monitor](https://docs.open.cx/workflows/test-and-monitor.md)
>
> Test runs, the Runs tab, failures.

> [card] [AI Actions](https://docs.open.cx/actions/introduction.md)
>
> Single API calls the AI makes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.