Livechat agent routing

Hi Rocket.Chat community,

I’m a newcomer in the world of Rocket.Chat as we have just started thinking about using Rocket.Chat as chat engine of our already existing application which takes care of client relations (clients feedback, phone calls, emails, polls etc.)

Now, we’d like to add the functionality of chat so that clients can start to chat with an agent. To do that, we want to use Rocket.Chat’s Livechat and its API.

My question is: Is it possible to externalize the assigning logic of incoming Livechat conversation to an agent? By externalizing I mean to let the process of finding an existing agent who would answer client’s request be done by another server/application than Rocket.Chat server.

To do that, it would be necessary to notify the other server about incoming Livechat request which would in return define the agent whom the communication would be assigned. Is that possible by using already existing APIs?

I found the topic Chat transfer between chatbot and a live agent, vice versa or from one agent to another which deals with transferring the conversation but I’d like to determine the agent even before the communication starts.

Thank you in advance for your help.

Jan Bayer

Super cool and high demand ideas @jan.bayer!

Scriptable routing / router plugin for Livechat.

It is a simple problem for a stand alone server with minimal queues (sometimes 1). But quite difficult when dealing with large number of queues, skillsets, and distributed/federated servers.

The scripting mechanism and/or the “interface” will have to be super rich to anticipate all conditions.

Thank you very much for such a prompt response @sing.li .

Does it mean that current version of Rocket.Chat do not offer such plugin? Would you have some idea where to start digging and where to find current implementation of routing?

I am very keen on starting using and developing Rocket.Chat applications and I hope we find some way.

Thank you for your time :slight_smile:

Let’s see if @renato.becker or @diego.sampaio can help us with the lines of code on Github where the routing is taking place. Or if there is actually any API that facilitates it.

Those would be the levels at which you have access to routing at this time.

Hi @sing.li and @jan.bayer!

Yeah, it’s possible to get the agent from another server/application. We have 3 routing methods, currently, and one of them is called by External Service, so please take a look at the following link:

https://rocket.chat/docs/administrator-guides/livechat/livechat-queues/#external-service

If you have any question about this feature, please just let me know.

Regards,

Renato Becker.

Hi @renato.becker.

Thank you for this information, that’s exactly what I was looking for and I missed it when going trhought the GUI.

I’ll have a look and come back if I have other questions.

Jan

Hello,

I have a similar problem. I have a chatbot build with Rasa NLU. It works fine within channels in Rocket chat.
However, I need to use my chatbot to handle chats from my website which are from anonymous users.
Can you please help me with some ideas because I am worried that this may not be possible.

Thank you.

Hello i have some problem when integrating Rocket.chat with hubot-natural bot, i want to set my bot agent as default agent for every guest visiting live chat, so i set Livechat Routing Method as “external service”, i made my own External Queue Service URL and set mybot details as the return from my endpoint as mention in documentation, and everything is going well.
the problem is when i using “external service” routing method i can’t transver bot agent to human agent when customer want to talk to human (it’s always return false, “there is no one online right now”), but if i using other routing method everything is going well, i can transfer chat to other human agent as i wish.

thank you for your help …

Hi @rumbhe and all,
I am trying to do the same, and I am far behind :frowning:
I integrated my bot and I have it work and answering internally in a channel or direct message.

I am failing to get all the communications from livechat coming from the web client to be directed to the bot as you did it.
Would you mind to help me find some examples to make my bot answering the livechat request/messages?
I really appreciate it

Thanks

Hi @kmark3,
I did have a rasa bot as well and having the same stage as you describe in your post, I can make it work with channels or direct message from a user but I fail trying to get the bot getting the livechat messages from the web :frowning:
Did you manage to fix it?
would you mind to share how to configure it?

Thaks

Hi!

You guys can rely on the Livechat webhooks feature:
https://rocket.chat/docs/administrator-guides/livechat/#integrations

So, what you need to do is set up your bot user as a regular livechat agent, then set up an endpoint URL and select what event will call your endpoint, let’s say you want to receive all visitor messages, you just need to select this option as you can see below:

32