How to prompt user to access chat bot in webchat as seen in rasa demo bot?

rasa%20prompt

hey @Rashmi, I think so you can use the tooltip prop of the webchat:

GitHub - botfront/rasa-webchat: A feature-rich chat widget for Rasa and Botfront

Attaching the code which worked for me:

Capture

           WebChat.default.init({
            selector: "#webchat",
            initPayload: "/get_started",
            customData: { "language": "en" }, // arbitrary custom data. Stay minimal as this will be added to the socket
            socketUrl: "http://localhost:5005",
            socketPath: "/socket.io/",
            title: "Moodbot",
            tooltipPayload: "/greet",
            tooltipDelay: 500,
            subtitle: "",
        })

I have triggered my greeting intent from tooltipPayloadprop and it send me the response for the greeting intent.

Thank you ! This worked

@Rashmi Glad that worked :slight_smile: Thanks for trying it out :slight_smile:

1 Like

I tried the same but tooltipPayload prop not working could you please help me out !

Hello, I have a similar question to this topic related to the tooltipPayload. In my current configuration, I have something like this:

WebChat.default.init({
        selector: "#webchat",
        initPayload: "/welcome",
        socketUrl: "http://localhost:5005",
        socketPath: "/socket.io/",
        title: "Testbot",
        tooltipPayload: "/Popup",
        subtitle: "",
    })

The issue is that only the tooltipPayload is sent taken into account by the bot. Ideally, I would like the bot to show the tooltip when the webchat is closed, and once a user opens it the initPayload is sent to the bot.

Is there something Iā€™m missing?