About Transferring Digital Assistant Chats to Live Agents

When using a chat bot, users sometimes ask to talk to a real person. The bot needs to have the ability to transfer users to a live agent when such a request is made. The bot also needs to detect when someone is having difficulty and then ask them if they want to talk to a person.

This Solution shows you how to use a webhook to integrate a chatbot with your live agent system. If your live agent system is Oracle Service Cloud, then you don’t need a webhook because you can use the Agent Integration channel instead of the Webhook Channel. The documentation for Oracle Digital Assistant has complete instructions for integrating with Oracle Service Cloud.

Architecture

When using a webhook, the flow of the conversation between the chatbot user and the agent is almost identical to the Oracle Service Cloud architecture.

The primary difference is that you create a Webhook Channel in your bot instead of an Agent Integration Channel. Nevertheless, you use the bot’s System.AgentInitiation and System.AgentConversation system components exactly as you would when using Oracle Service Cloud.

Description of live-agent-transfer-webhook.png follows
Description of the illustration live-agent-transfer-webhook.png

The webhook should convert messages that come from the live agent system into the Digital Assistant message format. It should also convert messages that come from the Digital Assistant into the format that your live agent system uses. You must write the code that does the conversion. The code sample that accompanies this Solution has two samples that demonstrate how to do this. You can use the implementation in code/src/agentImpl/mockAgent.js as a starting point for your own development. You can use the implementation in code/src/agentImpl/engagementCloud/engagementCloud.js as a reference, or you can use it if your live agent system is Oracle Engagement Cloud.

The following diagram shows the architecture of the webhook code.

Description of webhook-architecture.png follows
Description of the illustration webhook-architecture.png

The code sample that accompanies this Solution has two separate implementations of the Message Transformation part. One is code/src/agentImpl/mockAgent.js, and the other is code/src/agentImpl/engagementCloud/engagementCloud.js.

In the code sample, the Webhook Implementation part is implemented in src/server.js.

Before You Begin

You can review the Oracle Digital Assistant documentation, which shows how to connect a chatbot user with a human agent using Oracle Service Cloud.

A chatbot skill that can connect with Oracle Service Cloud can connect to any other system without change using a webhook that you create.

Here is the documentation: Live Agent Transfer