Use Case 10: Ticket from bot + categorizer
Before you start: read Categorizer pattern. Complete this in the training bot after the basic level (Use Case 1–9).
Required permissions and access
| Module / setting | Why you need it |
|---|---|
| Scenario Builder | Build the flow with categorizer and ticket create |
| Fast Line Pro | Categorizer agent (type “Chatbot”) |
| Settings → Tickets | Ticket subjects and subject_alias |
| Settings → Bots | Channel for testing (preview or Telegram) |
| Runs / Chat preview | Self-check: ticket_id, success/error edges |
If Settings → Tickets is missing from the menu — check your account permissions or contact whoever manages access in your organization / ConnectiveOne support.
Business context
The customer describes a problem in free text in the bot. The system should automatically determine the request type, collect required fields, and create a ticket in ConnectiveOne. The ticket number must be available in Runs for further verification.
Expected result
- Collection form: subject, description, priority
- Categorizer → category variable →
subject_aliasvia Router /switch action_tickets_create→ edgessuccessanderror- The customer receives a confirmation with the ticket number
ticket_idis saved in Runs/constants after success
Architecture
MessageKeyboard ("Submit a complaint") → WaitForInput (subject, description, priority)
→ action_fastline_pro (categorizer) → Router by category
→ action_tickets_create
├─ success → "Ticket created: {{ticket_id}}"
└─ error → "Could not create" + retry or end
Step-by-step implementation
Step 0. Ticket subjects in Settings
Link to other settings:
subject_aliasand ticket custom fields must match subjects in Settings → Ticket settings. Details: configure tickets.
Create (or reuse) subjects with aliases for training:
| Alias (example) | Purpose |
|---|---|
training_payment |
Payment issues |
training_delivery |
Delivery issues |
training_damage |
Damaged product |
training_order |
Incorrect order |
Write down the aliases — you need them in the Router in step 5.
Step 1. Fast Line Pro — categorizer
- Fast Line Pro → create an agent of type Chatbot (for example, “Training Ticket Categorizer”).
- In the prompt, paste the text from categorizer-training.txt — section Use Case 10 (tickets).
- Check in Agent testing: input “payment did not arrive” → output
payment.
What the categorizer does: turns a free-form description into one category (payment, delivery, damage, order, other).
| Fast Line Pro parameter | Value |
|---|---|
| Type | Chatbot (not Agent) |
| Prompt | categorizer-training.txt |
| Output in scenario | variable ticket_category |
Step 2. MessageKeyboard — entry into the flow
| Parameter | Value |
|---|---|
| Text | “Would you like to submit a request?” |
| Button | “Submit a complaint” · payload ticket_start |
| Keyboard type | inline |
Edges: button → first WaitForInput node (subject).
Step 3. WaitForInput — collect fields
Use three nodes in sequence (or one with multiple fields if your instance supports it):
| Node | messageText | outputVariable |
|---|---|---|
| 1 | “Briefly describe the request subject” | ticket_title |
| 2 | “Detailed problem description” | ticket_description |
| 3 | “Priority: low / normal / high” | ticket_priority |
Validation: none for training (or limit priority to a list if needed).
Edges: last WaitForInput → Action categorizer.
Step 4. Action — action_fastline_pro (categorizer)
| node_params | Value | Why |
|---|---|---|
agent_name |
Training Ticket Categorizer |
Name from Fast Line Pro |
user_input |
{{ticket_description}} |
Text to classify |
save_response |
ticket_category |
Category for the Router |
Edges (required):
| Edge | Where |
|---|---|
| Main output | Router (alias mapping) |
| fallback | MessageKeyboard: “Could not determine the type. Try rephrasing the description.” |
Step 5. Router — map category to subject_alias
Node: Router (action_router), mode first_match + default branch.
| Rule | subject_alias |
|---|---|
ticket_category equals payment |
training_payment |
equals delivery |
training_delivery |
equals damage |
training_damage |
equals order |
training_order |
| Default | training_order (or a separate “other” subject) |
After the Router — Set subject_alias (if needed) or go straight to action_tickets_create.
Alternative: Action switch with the same conditions.
Step 6. Action — action_tickets_create
| node_params | Value | Why |
|---|---|---|
subject_alias |
{{subject_alias}} |
Ticket subject from Settings |
ticket_description |
{{ticket_description}} |
Description (v2 API, if available) |
additional_fields |
title, priority per subject docs | Subject custom fields |
On newer instances you may have
action_tickets_create_v2— check Node Inspector; the contract is similar.
Edges (required):
| Edge | Where | Why |
|---|---|---|
success |
MessageKeyboard: “Ticket created. Number: {{ticket_id}}” | The customer sees the result |
error |
MessageKeyboard: “Could not create the ticket. Check the data or try later.” | Without an error edge — silence |
Troubleshooting in the scenario
| Symptom | What to check |
|---|---|
Edge error after create |
subject_alias exists in Settings; subject custom fields; v1 vs v2 action |
No ticket_id in Runs |
Success edge is connected; action saves id in constants |
| Categorizer returns “extra” text | Prompt — only one category word; test Fast Line Pro separately |
| “Sticky” chat_room_id | Create parameters: do not reuse an old room without logic; compare a new Run vs the same dialog |
Details: Edge-driven flow · When it is not the scenario
Self-check (Runs)
Before moving to Use Case 11, make sure:
Record the result in results-template.md.
Independent task
Add a rule: if the categorizer returned payment, automatically set ticket_priority = high before create (via Set or a separate Router branch).
Reference links
Next step: Use Case 11: Broadcast