Example of Rasa using Facebook Messenger welcome screen

I’ve hooked a Rasa chatbot up with Facebook Messenger and have a lot of the function working (e.g. buttons, quick responses, displaying graphics). Now I want to implement an FM Welcome Screen (https://developers.facebook.com/docs/messenger-platform/discovery/welcome-screen) . I can get an idea of what the payload needs to look like (below), but I need to know how to get a dispatcher by default without a specific custom action.

message6 = {
         "greeting":[
          {
            "locale":"default",
            "text":"Hello!"
          }, {
            "locale":"en_US",
            "text":"Movie Molly Movie Database"
        }
     ]                  
  }

dispatcher.utter_custom_json(message6)

What do you mean by this? You can create a method in your actions.py file outside of the specific action class that you use to format the output of your message if you need to reuse it among custom actions. If you’re trying to do it in a regular non-custom utterance, the format is the same, but translated into yaml format as shown here: Domain

Thanks for the response. I ended up getting the function I wanted by directly updating the facebook page associated with the facebook app. In that facebook page: Settings → Messaging → Starting a Messenger Conversation lets you specify the text that you want to show when your FM session starts initially. image

1 Like