10 Agent Integration
When your bot can’t handle a user request, the Agent Integration framework enables a handoff to a human agent, like a customer support rep (CSR) operating through Oracle Service Cloud. The handoff itself is seamless because human agents can see the bot user's chat history and can go from there. They can use this context to trigger the appropriate action on the user's behalf, or they can chat with the bot user first if they need to find out more. This interaction happens entirely on the same channel and within the same user session.
The Agent Integration Framework in Action
The bot asks the user if he needs help. By clicking yes, the bot connects to the Agent system and returns a Waiting for the agent message to the user. The CSR, monitoring an agent console, gets notified of the request and accepts it. The Agent Integration framework provides the user’s chat history. Using this, she can execute a Slash command (/OrderPizza) to execute the associated flow, or she can chat directly with the user. Once she executes the flow using the Slash command, the user-human agent interaction ends. The bot user can end the session with the agent anytime by entering closing words like bye or goodbye.
Integrate the Bot with a Human Agent
-
Configure an agent service.
-
Update the dialog using the
System.AgentInitiation
andSystem.AgentConversation
components. TheSystem.AgentInitiation
component executes the hand off to the agent whileSystem.AgentConversation
conducts the user-agent interaction itself.You can find templates for these components by clicking User Interface in the Add Components dialog. To find out how to route to a user agent subflow, see Configure the Dialog Flow for User Agents.
Configure the Agent Integration
-
Click Settings in the left navbar and then choose Agent Integration.
-
Click Add Integration.
-
Enter a name and optional description. Be sure that this name matches the
agentChannel
property value for both the System.AgentInitiation and System.AgentConversation components. -
Choose the agent system from the Integration Type menu.
-
Define the remaining properties that are specific to the agent system.
-
Switch on the Interaction Enabled toggle.
Configure the Dialog Flow for User Agents
actions
property. The agent integration routing gets triggered when a user enters a distress call that the getAgent
intent has been trained to understand, like help me please! intent:
component: "System.Intent"
properties:
variable: "iResult"
confidenceThreshold: 0.4
transitions:
actions:
OrderPizza: "resolvesize"
CancelPizza: "cancelorder"
getAgent: "agentInitiation"
unresolvedIntent: "unresolved"
You can also route to the user agent state with an unresolvedIntent
action (unresolvedIntent: “agentInitiation”
, for example). To do this:
-
Configure the handshake with the agent system using the System.AgentInitiation.
agentInitiation: component: "System.AgentInitiation" properties: agentChannel: "MyServiceCloudAgent" nlpResultVariable: "iResult" agentActions: "OrderPizza, CancelPizza" waitingMessage: "you joined the chat session" rejectedMessage: "Sorry we are not available now" transitions: actions: accepted: "agentConversation" rejected: "reject"
-
Configure the System.AgentConversation. This snippet includes the supporting states,
endprompt
andreject
.agentConversation: component: "System.AgentConversation" properties: agentChannel: "MyServiceCloudAgent" nlpResultVariable: "iResult" exitKeywords: "bye, adios, take care, goodbye" conclusionMessage: "have a nice day!" transitions: actions: OrderPizza: "resolvesize" CancelPizza: "cancelorder" next: "endPrompt" endPrompt: component: "System.Output" properties: text: "Returning you to your bot." transitions: return: "endPrompt" reject: component: "System.Output" properties: text: "We're busy. Try again later." transitions: return: "done"