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.
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 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 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
In the code sample, the Webhook Implementation part is implemented in
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