service_tickets — Overview¶
The Tickets service connects the Dashboard to Plenty Messenger and n8n for AI-assisted customer support. Agents draft replies in n8n; humans review and send them to Plenty from the UI.
Primary API prefix: /api/v1/tickets
Source: backend/service_tickets
n8n integration¶
| Document | Description |
|---|---|
| n8n workflow guide | Webhook payload, callback API, attachment proxy, configuration, and database fields |
| n8n agent prompts (Deutsch) | Routing agent, six specialized agents, system prompts, tools, and callback format |
Typical flow: Dashboard triggers POST /workflow/generate → n8n runs routing + specialist agent → n8n POSTs generate_complete to the callback URL → WebSocket pushes the draft to the UI → user edits draft → Dashboard sends reply to Plenty.
Live updates use WS /api/v1/tickets/ws (message type ai_draft_update). The UI no longer polls GET /ai-responses while waiting for n8n.