---
title: "Use Case 3: Handoff to operator"
description: "Escalation from the scenario via operator_panel__connect: success, limit, error, subject_alias, subjects, skill groups, alias after close, and timers."
---

# Use Case 3: Handoff to operator from the scenario

**Level:** basic · **Modules:** Scenario Builder, Settings → Operator Panel · **Action:** `operator_panel__connect_to_operator_with_msg`

## Required permissions and access

| What you need | Where in the menu | Why |
|---------------|-------------------|-----|
| **Scenario Builder** | Menu → Scenario Builder | Connect node in the scenario |
| **Settings → Operator Panel → Subjects** | Settings → Operator Panel → Subjects | Subject with alias for `subject_alias` |
| **Settings → Operator Panel → Skill groups** | Settings → Operator Panel → Skill groups | Subject skill group for `auto_connect_operator` |

If the **Subjects** section is missing from the menu — check your account permissions or contact ConnectiveOne support.

## Business context

After the menu (or FAQ), the customer taps “Talk to an operator.” If no operators are free — the customer gets **your** waiting message (edge `limit`), not silence. After the chat is closed or times out, the scenario can continue via an **alias** (preparation for CSAT in [Use Case 7b](/en/learn/implementer/training/basic/use-case-07b-csat-nps.md)).

## Expected result

- Edge **`success`** → connect completed (check in Runs).
- Edge **`limit`** → customer gets **your** waiting message.
- Edge **`error`** → clear error message (not silence).
- `subject_alias` matches the subject in Settings; the subject is linked to a **skill group** with operators.
- `chat_closed_alias` is set (entrypoint stub) and you understand inactivity / operator-wait timers.

## Flow architecture

```text
MessageKeyboard ("Operator") → Action (operator_panel__connect_to_operator_with_msg)
   ├─ success → MessageKeyboard “Operator connected”
   ├─ limit   → MessageKeyboard “Everyone is busy. Please wait…”
   └─ error   → “Could not connect. Try later”

After chat close (by operator) → chat_closed_alias → (e.g. “Thank you” section / stub for UC-7b)
```

## Link to other settings

| What | Why |
|------|-----|
| **Subject** (`subject_alias`) | Route the dialog to the correct OP queue / folder |
| **Subject skill group** | Where `auto_connect_operator` takes a free operator from |
| **Operator in skill group** | Otherwise `limit` or `success` without a live operator |
| **Alias after close / timeout** | Continue the scenario after chat lifecycle events |

→ [Configure subjects](/en/settings/how-to/configure-subjects.md) · [Configure skill groups](/en/settings/how-to/configure-skill-groups.md)

## Step-by-step implementation

### Step 0. Subject, skill group, and operator (if not yet)

Settings → Operator Panel → **Subjects** → create a subject for training:

| Field | Example |
|-------|---------|
| Name | Training Support |
| **alias** | `training_support` |
| **Skill group** | Training Support SG *(link an existing one or create a new one)* |

Settings → Operator Panel → **Skill groups** — make sure the subject’s group has **at least one test operator** (for E2E).

Write down the subject alias — it goes into `subject_alias` on the connect node.

---

### Step 1. MessageKeyboard — escalation button

| Parameter | Value | Why |
|-----------|-------|-----|
| Text | “Need an operator?” | |
| Button | “Talk to an operator” · payload `operator` | Start connect |
| Output Variable | *(optional)* | Button edge is enough |

**Edges:** button `operator` → Action connect.

---

### Step 2. Action — `operator_panel__connect_to_operator_with_msg`

**What the action does:** creates a chat room in Operator Panel, assigns the subject, tries to connect an operator, returns an event by result.

| node_params | Level | Value (example) | Why |
|-------------|-------|-----------------|-----|
| `subject_alias` | **must** | `training_support` | Route to subject / queue |
| `auto_connect_operator` | **must** | `true` | Free operator from the subject skill group; otherwise **limit** |
| `chat_closed_alias` | **should** | `training_chat_closed` | After operator closes → entrypoint (UC-7b: CSAT) |
| `custom_timeout_time` | **should** | `30` | Dialog inactivity timeout (min); fires `chat_closed_by_timeout_alias` |
| `connection_timeout_time` | **should** | `120` | Seconds waiting for an operator → `connection_timeout_alias` |
| `customTextToOperator` | nice | “Customer from the training bot” | Context for the operator in OP |
| `add_button` | nice | `false` | In training we don’t complicate the chat UI |

**Related aliases (as needed):** `chat_closed_by_timeout_alias`, `connection_timeout_alias`, `chat_closed_by_client_alias` — details in the [action reference](/en/actionjail/reference/actions/operator_panel__connect_to_operator_with_msg.md).

**Entrypoint stub:** create a section with entry point `training_chat_closed` and a simple MessageKeyboard “Thank you for contacting us” — in [Use Case 7b](/en/learn/implementer/training/basic/use-case-07b-csat-nps.md) you will replace it with CSAT.

**Edges (minimum required: success + limit + error):**

| Edge | When | Where | Why |
|------|------|-------|-----|
| **`success`** | Chat created, customer connected | MessageKeyboard “You are connected to an operator” | Customer knows the dialog is in OP |
| **`limit`** | No free operators | MessageKeyboard “All operators are busy…” | **Your** queue text |
| **`error`** | Chat creation error | “Could not connect…” | Failsafe ([Use Case 9](/en/learn/implementer/training/basic/use-case-09-scenario-audit.md)) |
| `banned` *(if present)* | Customer is banned | Blocking message | Rare in training, but better to connect the edge |

---

### Step 3. MessageKeyboard after `limit`

| Parameter | Example |
|-----------|---------|
| Text | “All operators are busy right now. We’ll reply soon — please wait in this chat.” |

Without this node the customer often sees **silence** after `limit`.

---

### Step 4. Test in Runs

1. **Runs / preview:** tap “Operator” → check which edge fired (`success`, `limit`, or `error`).
2. Confirm that after edge **`limit`** the customer sees your message (not silence).
3. If always `error` — check `subject_alias`, subject, and skill group in Settings.
4. In trace / constants check that `chat_closed_alias` is recorded (if set).

**Optional (E2E):** if the instance has a test operator and channel — verify the dialog landed in the subject with the matching alias. This is not a required completion criterion for Use Case 3.

**Queue message:** the text is written by the **integrator** in the node after `limit`. For training, a static clear message is enough.

## Acceptance criteria (self-check Runs)

- [ ] Edges **success**, **limit**, **error** are connected on the canvas.
- [ ] After `limit` the customer sees your message (not silence).
- [ ] `subject_alias` = subject alias in Settings → Operator Panel → Subjects.
- [ ] Subject is linked to a skill group; the group has an operator (for E2E).
- [ ] `chat_closed_alias` is set and an entrypoint section with that alias exists.
- [ ] You understand the purpose of `custom_timeout_time` and `connection_timeout_time`.
- [ ] In Runs you can see which edge fired after tapping “Operator.”
- [ ] (Optional E2E) Dialog appears in Operator Line in the correct subject.
- [ ] *(Optional)* The same connect flow rebuilt via Instance Agent and verified in Runs ([rule](/en/learn/implementer/training/prerequisites.md#instance-agent-rule)).

## Common mistakes

| Symptom | Cause | What to do |
|---------|-------|------------|
| Always `error` | Wrong `subject_alias` or subject missing | Create the subject, match the alias |
| Silence after connect | No MessageKeyboard after `limit` | Add waiting text |
| Dialog not in the right subject | Alias mismatch | Match Settings and `node_params` |
| `success`, but operator doesn’t see it | No operators in the subject skill group | Add an operator to the subject skill group |
| After close the scenario does not continue | No `chat_closed_alias` or entrypoint | Set alias + section with entry |
| Inactivity close “does nothing” | `chat_closed_by_timeout_alias` not set | See the full connect action reference |

## Related documentation

- [Connect action parameters](/en/actionjail/reference/actions/operator_panel__connect_to_operator_with_msg.md)
- [Connect to operator node](/en/scenariobuilder/explanation/connect-to-operator-node.md)
- [Configure subjects](/en/settings/how-to/configure-subjects.md)
- [Configure skill groups](/en/settings/how-to/configure-skill-groups.md)
- [FAQ — connect from scenario](/en/learn/implementer/training/reference/faq.md)
- Next: [Use Case 4 — Mock CRM](/en/learn/implementer/training/basic/use-case-04-api-integration.md)
