Button payload is ending up as response

I’m trying out buttons for the first time, so it’s quite possible I’m doing something wrong.

This is the button code I have:

  - text: "Are you trying to get access to a Shared Drive, Security Group or neither?"
    - title: "Shared Drive"
      payload: '/s10_choice_shared_drive{"s10_verify_problem": "Shared Drive"}'
    - title: "Security Group"
      payload: '/s10_choice_security_group{"s10_verify_problem": "Security Group"}'
    - title: "Neither"
      payload: '/s10_choice_neither{"s10_verify_problem": "Neither"}'

When these buttons are displayed, I click one, but the intent doesn’t fire, and the slot is not filled, the entire payload ends up as the response, in both rasa shell and in my web chat like this:

Rasa shell Here it asked me and I clicked on the Shared Drive button and the whole payload is there as if I typed all that in

Are you trying to get access to a Shared Drive, Security Group or neither? 1: Shared Drive (/s10_choice_shared_drive{"s10_verify_problem": "Shared Drive"})

Web Chat Screenshot (sorry for the horrible css style, like I said this is the first time I’ve implemented them so I haven’t tried changing the style yet haha)


As you can see, the entire payload is displayed as if I typed it all instead of clicked a button.

My action detects “Shared Drive” / “Security Group” with an else for any other response, so the if statement drops out of the other questions in the form.

Am I missing some tiny detail? it looks like it is setup right.

Thanks for any pointers.

Is this a custom chat client? Or how is it that you’re displaying the conversation history (it looks like you’re using a connection to your tracker store to render the chat)?

It seems like you might just need to suppress displaying that message that’s being sent on behalf of the user and instead provide some visual cue that the button was clicked. If you’re connecting directly to the tracker store to get the conversation history, you could probably just filter out any message that starts with /.

Hello @jonathanpwheat,

Normally, when I handle buttons, I display the title of the clicked button as an user’s message in the chat UI. So in this case, if you click “Shared Drive” it will display “Shared Drive” as an user’s message, but I still send the payload to the Rasa server for consistency. Of course you can only do this if you are using your own custom chat UI or you are able to modify it.

It’s hard to identify what’s wrong only from this, do you have any logs of the Rasa server ?

@niveK - I was thinking that as well, I’m using this project for webchat, I just changed the look a bit. I just assumed it would have handled buttons (with slots) - GitHub - scalableminds/chatroom: React-based Chatroom Component for Rasa Stack and haven’t really looked into.

So lets forget about the web chat for a moment. I have the same issue when I use rasa shell

Here is the “button” prompt from the command line. You can see the button “values” in parenthesis:

Then when I choose (chose the Security Group option) it puts the entire payload into the response as it I typed it:

I have my intents matching the payload

- Solution-10:
    use_entities: []
- s10_choice_shared_drive
- s10_choice_security_group
- s10_choice_neither

And the proper utterances for those intents:

  - text: "In order to help you with your shared drive issue, I have to ask you some questions"
  - text: "In order to help you with your security group issue, I have to ask you some questions"
  - text: "Is there another problem?"

I’m guessing since I am not seeing those utterances, the payloads are not grabbing the intents properly.

For fun I removed the slot filling portion for the buttons -

  - text: "Are you trying to get access to a Shared Drive, Security Group or neither?"
    - title: "Shared Drive"
      payload: '/s10_choice_shared_drive'
    - title: "Security Group"
      payload: '/s10_choice_security_group'
    - title: "Neither"
      payload: '/s10_choice_neither'

And it did the same thing. :thinking: