Button shows both payload and text

Hello,

When I am sending a response which contains buttons to Whatsapp using rasa, both text and payload are displayed like:

Where would you like to dine?
1. Outside (/outside)
2. Inside (/inside)

I am adding buttons using custom action in the following manner:

    buttons.append({"title": "Outside", "payload": "/outside"})
    buttons.append({"title": "Outside", "payload": "/inside"})
    slot_name = tracker.get_slot('location')
    dispatcher.utter_message(
             template=f"utter_ask_{slot}",
             **tracker.slots,
              buttons=buttons)

Also, when I use domain.yml file to add buttons, payload is still visible.

 utter_ask_location:
    - buttons:
        - payload: /inside
          title: Inside
        - payload: /outside
          title: Outside

Am I missing something here? I just want text without payload visible to the end-user.

Thanks. :slight_smile:

@_adityaK remove / from payload if outside and inside are not intents. Simply put “payload”:“outside”

1 Like

@alkak95, even after removing “/” the payload is visible. It is just “/” is not there now. Infact, if I pass a blank payload like “payload”="", the output comes as “Outside()”