Rasa: Slot variable in payload of button

Created on 12 Sep 2018  路  11Comments  路  Source: RasaHQ/rasa

Hey,

this here http://rasa.com/docs/core/0.10.4/domains/#variables is not working when you have the varibale inside payload title of button. Is this correct? Would be nice if so...

Core 10.4

Most helpful comment

I can confirm this issue.
I use it with botframework api (button with link)

Rasa version:
rasa-core 0.13.7
rasa-core-sdk 0.13.0
rasa-nlu 0.14.6

domain.yml

utter_request_created:
    - text: "Your request {request_id}"
      buttons:
        - title: "{request_id}"
          value: 'https://path/to/request/{request_id}'
          type: "openUrl"

Result:
Bot says:
Text: Your request 123456
Button title: {request_id}
Button link: broken

Expected result:
Bot says:
Text: Your request 123456
Button title: 123456
Button link: https://path/to/request/123456

Btw, this could be solved with actions.

All 11 comments

what do you mean? Can you post an example of what you're trying to do?

Just giving variable in payload or title of button, both don't work:

 utter_greet:
  - text: "Hey! How are you?"
    buttons:
    - title: "great {name}"
      payload: "{name}great"
    - title: "super sad"
      payload: "super sad"

This would be nice because then you can more easily send payload buttons with variable intent and entities!

I'm not entirely sure i see the use case for this, could you give a more elaborate example of where this would make sense? sending an entity from a slot that's already been filled doesn't really make sense to me

ould you give a more elaborate example of where this would make sense? sending an entity from a slot that's already been filled doesn't really make sense to me

like greeting like above...Doing further stuff from found slot like DB search... Just want to use the slot in payload title. Why does this not work?

Well, because no one has implemented it yet - but I do see the use case. If you are up for it, we'd love to see a PR for that.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been automatically closed due to inactivity. Please create a new issue if you need more help.

I can confirm this issue.
I use it with botframework api (button with link)

Rasa version:
rasa-core 0.13.7
rasa-core-sdk 0.13.0
rasa-nlu 0.14.6

domain.yml

utter_request_created:
    - text: "Your request {request_id}"
      buttons:
        - title: "{request_id}"
          value: 'https://path/to/request/{request_id}'
          type: "openUrl"

Result:
Bot says:
Text: Your request 123456
Button title: {request_id}
Button link: broken

Expected result:
Bot says:
Text: Your request 123456
Button title: 123456
Button link: https://path/to/request/123456

Btw, this could be solved with actions.

Any updates about it?

Did anyone solve this?

Is this resolved? I too am facing the same issue with Botfront UI.

Was this page helpful?
0 / 5 - 0 ratings