Transfer Chat to Agent

Hi Team,

I need help on transferring the chat to the agent. I am new in this topic.

So my query is to transfer the chat to the live agent do we need to have an existing chat application.

Or provide a way to create the chat application for the live agent.

I would need help on this as soon as possible.

Hi @renisweta1094 , below are some use cases for which enterprises do look out for user conversations routing to live agents from bot.

  1. Intents not identified by the bot.
  2. Sentiment Analysis information (based on message tone and dialog tone)
  3. End User explicitly says that he would like to talk to a customer support representative.
  4. The troubleshooting (as configured at the bot at dialog) performed by the bot didn’t help resolve the end users issue and needs to be looked into by a support executive.

Agent transfer to live chat application can be achieved on using bot kit. Enterprise developer needs to have any live chat application (If a chat application is not present at the enterprise, can even offer the same - sales team can guide you through this) which can be configured at bot kit.

On the bot builder, the agent transfer has to be enabled at apps and extensions. Then during the execution of any dialog when the agent node is reached, an event will to be sent to botkit at which developer could define his logic on routing it the agents.

Below are some botkit functions which could help developer achieve agent transfer.

  • sdk.startAgentSession → Starting the conversation with the live agent from bot
  • sdk.clearAgentSession → Clearing the agent session and routing the conversation to the bot again from agent
  • sdk.getMessages → Retrieving the chat history between bot and the user
  • sdk.sendUserMessage → Sending user a message from kit
  • sdk.getSavedData → Retrieving temp info from redis
  • sdk.saveData → Saving temp in redis

In the botkit available at GitHub - Koredotcom/BotKit , we have provided LiveChat.js and LiveChatAPI.js which guide the developer on the integration process with a Live Chat app. (We have used for demonstration purposes)

Hope this helps :slight_smile:

1 Like

HI Subrahmanyam ,

We have integrated livechat for our bot. Whenever an agent is connected with the user . We are getting a link to view the user-bot chat history as shown in the below screenshot.

However when we click the link . The below error appears.


Please let me know if any Apikey needs to be configured to view this chat history.


HI Team ,

I am waiting for your updates.


Hi @arulvelug,

We apologize for the delay.
We are able to replicate the issue and have communicated to the engineering team.

We will update you soon.

Yoga Ramya.

Hi @arulvelug,

For the above functionality, the index.html file and associated libraries are needed to implement the Path included in the Chat Link. Which are not available in the bot kit by default and needs to be implemented as per the requirement by the users.

Since we have built the Views to test the use case, we have also pushed the same to Kore public repository. Please download the relevant bot kit code from Koredotcom Github repository. After adding the files to your bot kit code, you should be able to see the chat history with the link. If you see any problem implementing above, let us know.

New included paths:




I have referred this link . However i dont find the new included paths which you mentioned. Could you please share the exact location from where i can have the views files . Please assist


@yogaramya.mendu @ajay.putti : Waiting for your inputs. Please assist


@arulvelug Sorry that we have not yet pushed the changes to Git. Ideally, the views are to be implemented by developers.

We are facing some delay regarding approval to push the solution to Git. Will post you soon.

Hi Ajay ,

Thanks for the update. We are waiting for further updates from you . Please assist.


@arulvelug BotKit changes have been pushed to public repository. Please download the latest botkit and try accessing the chat history URL from LiveChat application in case of agent transfer. Do let us know if you run into any issues.

Changes: Views folder is added to open webapp when the chat history url is accessed from LiveChat appplication

@Subrahmanyam : I have downloaded the latest code and deployed it in my environment. When ever an agent transfer is intitated i am getting the below error. Could you please look into this.


I suspect that the bot isn’t registered as the LiveChat.js hasn’t been referenced at app.js. Please check if LiveChat.js has been referenced at app.js at BotKit/app.js at master · Koredotcom/BotKit · GitHub.
This should have caused the problem.


@arulvelug We have included LiveChat.js reference as well in the app.js file and pushed it to our Botkit public repository so that developers wouldn’t experience the issue again.

@Subrahmanyam : Thanks for the update . It worked :slight_smile: Just for a clarification , if i view the chathistory . The bot response is in JSON . As shown in the below screenshot.

Whether it is designed to be JSON or Plain text can also be done ?


In my opinion, displaying the payload makes sense as the developer has applied channel specific templates at prompts.

i wanna know live agent transfer in the latest version as i guess agent dialog has been excluded and app extension continue with this functionality but what all is required to configure it.

Hi @renisweta1094,

You should be able to integrate the agent transfer functionality by following the below document.

Let us know if you need any further clarification.

Yoga Ramya