Connect To External Channels

One of the key features of Rasa is the ability to learn from real conversations. This to ensure you understand how users actually use your assistant - both during development as well as in production.

This page will show you how to:
  • share your assistant with testers to quickly gain feedback
  • take your assistant to production by connecting Rasa X with channels such as Slack, Twilio, Facebook Messenger, etc., and let you to view all those conversations in one place.

You can view the full list of channels supported (or even how to create a custom integration if you don’t find an existing one that suits your needs) here.

Development Phase: Invite Users to Test

You should get someone else to test your assistant as soon as possible, because real testers could always interact with your bot differently than you imagined. The quickest way to do this is by generating a temporary link that you can share with your testers (where they can talk to your bot).

  1. To share your assistant with someone, click on the ‘share’ icon in the models tab.

../_images/invite-users-to-test.png

  1. In the popup, you can edit what testers will see. In Rasa X EE, you can also select which of your deployed models you want to test. Then you can copy the link testers can use to try out your assistant.

../_images/invite-users-to-test-metadata.png

3. Once you share this link, testers will be able to talk to your assistant, and their conversations will appear in the conversations tab. Each tester will be assigned a unique ID so that you can differentiate their conversations.


../_images/invite-users-to-test-tester-view.png

Note

Conversations that you have with your own assistant via ‘Talk to your bot’ or ‘Share your bot’ will not show up here. However, you can get around this limitation if you chat with your assistant via the ‘Share your bot’ link in private browsing mode.

Production Phase: Channel Integrations

You can connect Rasa to various messaging and voice channels such as Facebook Messenger, Slack, Twilio, your own website, etc. You can view the full list of channels supported (or even how to create a custom integration if you don’t find an existing one that suits your needs) here.

To view conversations that happen on these channels in Rasa X, you need to connect your channel to Rasa by editing the credentials.yml file mounted to the rasa-production and the rasa-worker containers. For detailed instructions on how to do this for your relevant channel, you can head over here. If you have previously connected a channel to Rasa, this step is no different from it.

Note

If you are using our standard server deployment of Rasa X, you will need to change the endpoints you use for your channels from /webhooks/<CHANNEL_NAME>/webhook to /core/webhooks/<CHANNEL_NAME>/webhook.

Once you have done this, your assistant will be connected to the outside world where real users can talk to it. You can then start reviewing all these conversations in the “Conversations” tab of Rasa X.

Testing on Your Local Computer with Ngrok

You can use ngrok to create a connection to your local computer that is publicly available on the internet. You don’t need this when running Rasa on a server because you can set up a domain name to point to that server’s IP address.

Warning

With the free-tier of ngrok, you can run into limits on how many connections you can make per minute. As of writing this, it is set to 40 connections / minute.

Rasa X

By default, Rasa X runs on port 5002. The ngrok command to make that port publicly available is:

ngrok http 5002

ngrok will create a https address for your computer, for example https://xxxxxx.ngrok.io.

Testing Channel Integrations

If you are connecting your assistant to facebook or another service, you will need to set up a second ngrok service pointing at port 5005. To do this, run:

    
ngrok http 5005; rasa run
copied!

Your webhook address will look like the following:

  • https://yyyyyy.ngrok.io/webhooks/facebook/webhook
  • https://yyyyyy.ngrok.io/webhooks/telegram/webhook
  • https://yyyyyy.ngrok.io/webhooks/{channel}/webhook