Bots

A Hybrid Chatbot is more than just a chatbot. In addition to bot-to-customer conversations via pre-chat form, post-chat survey, conversational forms, response to repeating customer queries, the Bot also controls a chat conversation based on different internal or external events. 

You may use Rasa, Google DialogFlow, or can integrate any bot of your choice using Chatbot API.

Hybrid Chat contains rasa.ai out-of-box but it can be integrated with Google DialogFlow, IBM Watson, Microsoft LUIS, or any bot implementing Chatbot API. The chatbot may serve the customer directly as a primary interface or assists the human agent by giving suggestions on every customer query. To learn how Hybrid Chat integrates with a bot, see: 

Control Conversation by Bot 

Use caseDescription

Channel wise Bot Response

The bot may be trained to give a channel-specific response. Hybrid Chat Bot-connector passes the channel name in the input_channel parameter while calling the RASA bot API to get a response.

Channel-wise bot response is applicable only to RASA bot

Pre-chat form data collection

A conversation form on any chat channel may be developed using the bot training. Hybrid Chat allows structured/unstructured communication between the customer and the bot. The bot may use this data for any back-office function and hand-off the conversation to a human agent if needed.

Post-chat Feedback Collection

A new environment variable with the name POST_SURVEY_INTENT  has been introduced in the chat server configurations. If this is configured i.e., an intent is mentioned here, e.g., /agent_left :

  • When an agent clicks on the end-conversation, a LeaveConversation  event will be raised, resulting in the agent leaving that chat, and the chat will be routed to the chatbot for post_chat survey.
  • Once the survey is over, the chatbot will have to call End Conversation  API to end the chat successfully. If due to any reason, Bot doesn't call endConversation , the chat will never end.

Messages exchange between the customer and the bot after transferring the chat to the bot are stored and maintained as part of the conversation/chat session history.

Reporting Impact

  1. Upon LeaveConversation , chat record leg will be updated i.e. ended_by: agent and end_time: <event_time>.
  2. Chat Server will send a TRANSFER reporting event when POST_SURVEY_INTENT  is triggered.
  3. Upon chat end, Chat Server will send an event to the reporting queue when Bot calls endConversation, it will be normal endConversation message and Reporting Connector will update the TRANSFER record leg.
End ConversationThe Bot can send a custom-action via SugggestAction REST API with action_name "END_CONVERSATION" to end the conversation in response to any customer message or any external event. 

Request Hand-off

The integrated Bot can request to hand-off a chat to an agent. Once the chat session is started and the Bot receives a session started event. For example, the Rasa REST Input is called with the sender ConversationID and message.  

The Bot may later use this ConversationID to request hand-off, send engaging customer messages, or end the conversation using SuggestionAction API. The Bot may directly call the Chat Server REST API to hand-off.  


In Queue Messaging

When the Bot has initiated hand-off request via SugggestAction REST API with action_name "HANDOFF", the Bot may continue to send any messages to keep the customer engaged with any messages while the customer is waiting for a human-agent availability. This is especially useful in emergency support services where the customer/health-seeker requires attention.

  1. When the agent joins the Bot will receive an intent /agent_joined.
  2. The Bot may then stop sending such engagement messages. 



The bot can end the chat on survey completion by calling the suggestAction API of the chat server with Action Name = "END CONVERSATION". Details below:

URLhttps://{FQDN}/chat/api/message/suggest-action
MethodPOST
JSON

{
    "conversationId""r2sMA-HuwV",
    "type""Action",
    "action_name""END_CONVERSATION",
    "from": {
        "id""bot",
        "name""EF Bot",
        "type""BOT"
    },
    "timestamp"""
}