---
title: "Ticket events"
description: "Optional: placeholder section for tickets_created and an overview of TFR/TTC events."
level: optional
track: ticket-events
prerequisites:
  - ../advanced/use-case-10-tickets-categorizer.md
  - ../optional/use-case-sla-alias-entry.md
---

# Ticket events

> **Optional track** — a minimal introduction to `tickets_created` events and TFR/TTC escalation. Event configuration is in **Settings**; the scenario is a placeholder template.

## Required permissions and access

| Module / setting | Why you need it |
|------------------|-----------------|
| **Scenario Builder** | Placeholder section with an alias |
| **Settings → Tickets / Events** | `tickets_created` events, escalation |
| **Use Case 10** | Ticket create to trigger the event |
| **Runs** | Verify alias entry |

## Business context

After a ticket is created or when SLA changes, the platform can:

- send a **notification** (channel, email — per instance configuration);
- start a **scenario section** by alias;
- escalate TFR/TTC.

The integrator prepares the **scenario template**; event rules are configured in **Settings → Tickets / Events** (when you have access).

## Expected result

- Placeholder section with an alias (e.g. `training_ticket_created`)
- Understanding the chain: create ticket → event → alias / notification
- Self-check: alias in Runs; link to Settings documented
- Minimum: **not** a full webhook configuration in training

## Event types (overview)

| Event | When it fires | Typical scenario response |
|-------|---------------|---------------------------|
| **`tickets_created`** | After ticket create | Confirmation to the customer / internal note |
| **TFR escalation** | First reply overdue | Reminder ([SLA alias](/en/learn/implementer/training/optional/use-case-sla-alias-entry.md)) |
| **TTC escalation** | Time to close overdue | Escalation, connect |

→ [Configure tickets](/en/settings/how-to/configure-tickets.md)

## Architecture

```text
[Use Case 10 flow]
   action_tickets_create (success) → ticket_id in Runs

[Settings → Events]
   tickets_created → alias: training_ticket_created
                  → (optional) notification channel

[Scenario]
   [Alias: training_ticket_created]
      → MessageKeyboard "Thank you! Ticket №{{ticket_id}} is being processed."
      → End
```

## Step-by-step implementation

### Step 1. Placeholder section in the scenario

1. New section `sec_ticket_created`.
2. Alias entry: `training_ticket_created`.
3. MessageKeyboard:

| Parameter | Value (example) |
|-----------|-----------------|
| Text | “Your request is registered. Number: {{ticket_id}}. We will notify you about status changes.” |

**Note:** the `ticket_id` variable is available if the event passes ticket context — on the training instance, check the actual constants in Runs after the trigger. If `ticket_id` is empty in this section — use static placeholder text.

**Edges:** End.

---

### Step 2. Self-check alias in Runs

| Step | Action |
|------|--------|
| 1 | Runs → start via alias `training_ticket_created` |
| 2 | Confirm: section runs, no duplicate aliases |
| 3 | Audit: unconnected edges = 0 |

---

### Step 3. Chain with Use Case 10

1. Complete [Use Case 10](/en/learn/implementer/training/advanced/use-case-10-tickets-categorizer.md) — create a ticket.
2. In Runs, record `ticket_id` after success.
3. Describe in [results-template.md](/en/learn/implementer/training/results-template.md):

```text
Create success (Runs) → [Settings Event tickets_created] → alias training_ticket_created → MessageKeyboard
```

If the event in Settings is **not** configured — self-check is limited to steps 1–2 (scenario ready; event binding is done in Settings when you have access).

---

### Step 4. Settings → Events (overview)

If the section is available in the menu:

1. **Settings → Tickets / Events** (name may differ on the instance).
2. Event **tickets_created** → target: alias `training_ticket_created` and/or notification.
3. For TFR/TTC — see [SLA alias](/en/learn/implementer/training/optional/use-case-sla-alias-entry.md).

**Out of training scope:** step-by-step SLA calendar setup, email DNS, Telegram channel webhook at the infrastructure level.

---

### Step 5. Notification vs scenario alias

| Mechanism | Who configures | Integrator self-check |
|-----------|----------------|------------------------|
| **Alias → section** | Alias in scenario + Events in Settings | Runs via alias |
| **Notification channel** | Settings / Instance | Check access to settings |
| **Confirm only in create flow** | Use Case 10 success edge | Already covered by the core track |

## Troubleshooting

| Symptom | What to check |
|---------|----------------|
| Event does not call the section | Event active; correct bot; scenario published |
| `ticket_id` empty in alias section | Event context; fallback text without a number |
| Duplicate messages | Create success edge + event — do not duplicate the same text without need |
| tickets_created does not work | Alias spelling; Settings vs Runs |

→ [When it is not the scenario](/en/learn/implementer/training/reference/when-not-scenario.md)

## Self-check

- [ ] Alias `training_ticket_created` exists; Runs via alias OK
- [ ] Chain create → event → alias described (even if Settings is not configured)
- [ ] You understand the difference between TFR/TTC escalation (1 sentence each)
- [ ] Use Case 10: `ticket_id` in Runs after create
- [ ] Result template: optional track “Ticket events” marked

## Independent task

Combine the `training_ticket_created` placeholder with a short FAQ edge: “Request status” button → MessageKeyboard “Check number {{ticket_id}} with support”.

## Reference links

- [Use Case 10 — tickets](/en/learn/implementer/training/advanced/use-case-10-tickets-categorizer.md)
- [SLA alias](/en/learn/implementer/training/optional/use-case-sla-alias-entry.md)
- [Configure tickets](/en/settings/how-to/configure-tickets.md)
- [Actions reference — tickets](/en/actionjail/reference/actions-reference.md)
- [Test a scenario](/en/scenariobuilder/how-to/test-scenario.md)
