Categories
<All Topics
Print

Botpress – Transferring visitor to department or human service on Rocket.Chat

This article is a continuation of how to set up a service IVR with Rocket.Chat and Botpress, so we recommend that you have read these other articles before proceeding:

docker-compose.yml for Botpress

Creating a simple IVR Chatbot with Botpress

Chatbot – Integrating Botpress with Rocket.Chat

Creating a custom action in Botpress

Botpress allows the creation of customized actions to perform automation and integrations with other systems through API Rest.

To continue with our example of transferring our URA, let's now create a transfer action in Rocket.

Access your Bot in Botpress Studio:

1 – Click on “Code Editor” ( ):

2 – Click on the “+” to add a new Action

Name it rocketchat-Transfer.js and click Submit:

Delete all content from the editor and paste the content available at the link below:

https://raw.githubusercontent.com/LigeroSmart/botpress-rocketchat-actions/main/rocketchat-Transfer.js

It will look like this:

Adjust the rocketWebhook constant (on line 5 in the image above) according to your environment. It should point to your Rocket.Chat server.

Click the save button in the lower left corner of the screen.

Adding transfer to Flow

Now access the Botpress Studio flow editor again:

So let's set up the transfer.

Click the transfer node for support and then click the “+” button to add the transfer action:

Then select “Execute code” and choose the newly created action “Channel Rocket.Chat – Transfer visitor to department”.

Put the department name in the Rocket.Chat Omnichannel (which you must have created previously =D).

If desired, customize the transfer text as well.

Click on "Add Action":

Do the same with other departments.

If necessary, retrain your BOT to complete:

(If it is set to "Ready", it is not necessary to perform this step)

Testing the transfer on Livechat

Open a new livechat:

Check the current department on Omnichannel:

Now request the transfer to another department:

Check it out now on Rocket.Chat:

With that, we conclude this series of articles about the configuration of a simple IVR for assistance in Rocket.Chat, using Botpress and the integration developed by LigeroSmart.

How is it on Whatsapp and Telegram

The system behaves the same on different channels.

Below, the same flow managed by Rocket.Chat + Whatsapp + Botpress:

Chat arrives the same way for the Rocket attendant.Chat:

And also in the telegram, the service flow is homogeneous, regardless of the input channel:

Rocket.Chat result:

Previous Chatbot – Integrating Botpress with Rocket.Chat
Next LigeroSmart REST API v1.0

Leave a Reply

Your email address will not be published. Required fields are marked *

summary