You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pages/docs/guides/chat/support-chat.mdx
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ A typical support chat system follows this flow:
62
62
63
63
### Pub/Sub channels and Chat rooms <aid="channels-and-rooms"/>
64
64
65
-
Use both Ably Pub/Sub and the Ably Chat SDK to build a support chat system. The high-level architecture is as follows:
65
+
Ably Chat handles the messaging experience within a ticket, powered by a single chat room, while Ably Pub/Sub coordinates system-wide events like new ticket notifications and agent routing. Use both to build a complete support chat system. The high-level architecture is as follows:
66
66
67
67
- Use a dedicated chat room for each ticket, for example `support-chat:ticket-342`.
68
68
- Use one or more Pub/Sub channels to notify agents of new tickets and chats requiring attention:
@@ -101,6 +101,8 @@ After the chat has started, you can provide a rich chat experience with the Ably
Customers need access only to their own support tickets, not to other customers' chat rooms. A room naming convention that encodes ownership makes this straightforward to enforce.
105
+
104
106
Name each support chat room uniquely by using the user ID as a prefix followed by the ticket ID. For example, `support:user-343:ticket-992`.
105
107
106
108
This approach allows you to grant permission for users to access all their own support tickets, even before they are created, making authentication and access control straightforward. Grant each customer a JWT with access to their own support tickets by using a capability resource specifier such as `support:user-343:*`.
@@ -236,7 +238,7 @@ Presence can also be used to share data about the current user to the support ag
236
238
237
239
## Assigning tickets to agents
238
240
239
-
A key part of a support system is assigning tickets to agents. You can do this on your server either in advance as tickets are created, by tracking agent workload, or by broadcasting all tickets to all agents in a shared queue.
241
+
With the customer-facing widget handling message delivery and presence, the next challenge is connecting those conversations to agents. A key part of a support system is deciding how tickets reach the right agent at the right time. You can either do this on your server as tickets are created by tracking agent workload, or by broadcasting all tickets to all agents in a shared queue.
240
242
241
243
How do agents know about new tickets without being attached to every room?
242
244
@@ -330,6 +332,8 @@ When the agents dashboard receives this message, it removes the ticket from the
330
332
331
333
Instead of using a channel per agent, use a channel per team or department, for example `support:sales` or `support:engineering`. Follow the same pattern as the server-side ticket assignment to decide which channel to use for each ticket, then apply the shared inbox queue pattern for tickets that reach a team or department.
332
334
335
+
This hybrid approach works well for organizations with specialized teams: route tickets to the appropriate department first, then let agents within that team claim them from the shared queue.
336
+
333
337
## Agent dashboard <aid="agent-dashboard"/>
334
338
335
339
The agent dashboard is where support chat demands careful architectural thinking. Agents need to see and respond to multiple tickets, know when new tickets need attention, coordinate with other agents, and access context and AI assistance.
@@ -383,7 +387,7 @@ You need to signal to the integrations when the ticket is no longer handled by A
383
387
384
388
### Example architecture for aiding support agents with AI
385
389
386
-
AI can assist agents in several ways:
390
+
Beyond handling customer conversations directly, AI can work alongside human agents to make them more effective. AI can assist agents in several ways:
387
391
388
392
- Drafting responses for agents.
389
393
- Searching for similar tickets and how they were resolved.
@@ -396,7 +400,7 @@ Implement this client-side in the agent dashboard, where each message from the c
396
400
397
401
## Ticket resolution and archiving <aid="ticket-resolution"/>
398
402
399
-
When a ticket is resolved, update its status in your system, optionally collect customer feedback, and export the chat history for long-term storage.
403
+
Whether resolved by AI or a human agent, every ticket eventually reaches its conclusion. When a ticket is resolved, update its status in your system, optionally collect customer feedback, and export the chat history for long-term storage.
400
404
401
405
**Collecting feedback:** A straightforward approach is to send a feedback request message when the agent marks the ticket resolved. The customer responds with a rating (for example, emojis or stars), which your server captures and associates with the ticket.
402
406
@@ -415,7 +419,7 @@ For more sophisticated export patterns such as continuous ingestion and streamin
415
419
416
420
## Production-ready checklist
417
421
418
-
Before you go live with your support chat, review these key points:
422
+
The patterns in this guide handle the core architecture. Before you go live with your support chat, review these key points to ensure your implementation is production-ready:
419
423
420
424
***Authentication strategy:** Ensure you're using token authentication for all client-side communication with appropriate capabilities for each participant. Make sure capabilities are configured correctly for each type of participant (agents and customers).
421
425
***Scale planning:** Confirm you are on the right Ably package for your expected volume of concurrent tickets.
0 commit comments