@nik202 can we add access database to read data by using rasa buttons. Like when I select a button that button should go to action file function in which I have coded for reading data. is that possible or does rasa button makes use of intents only?
@syednoormujassum Yes, you can trigger custom action using Button payload.
Just a demo snippet code do customise:
domain.yml
intents:
- product
utter_product:
- text: Are you looking product ?
buttons:
- title: Yes 👍
payload: /product
- title: No 👎
payload: /menu_deny
stories:
- story: product display
steps:
- intent: product
- action: action_product_database
Hope this will help.
@nik202 the buttons are sometimes not popping in both rasa and rasa x the code is fine the intents everything is working, just that the buttons are not popping for user to select sometimes
@syednoormujassum share code for button please which you wrote?
-
text: Do you want to know more?
-
buttons:
-
payload: /whocan_apply form
title: Who can apply
-
payload: /deadline form
title: Deadline
-
payload: /how_to_apply form
title: How to apply
-
payload: /deny
title: Finish
-
-
@syednoormujassum these all are intents right? whocan_apply form, deadline form, how_to_apply form and deny just checking
- text: Do you want to know more?
buttons:
- title: Who can apply
payload: /whocan_apply_form
- title: Deadline
payload: /deadline_form
- title: How to apply
payload: /how_to_apply_form
- title: Finish
payload: /deny
you don’t need to use same in payload I guess and if this is intent you need to mention under intents in domain and same with your story.
Try this syntax and let me know are you able to get some success?
yes they are intents and are defined in domain file tried with the syntax and yet its still the same. @nik202
@syednoormujassum then you must have other corresponding issues with code. @syednoormujassum were you able to see buttons? @syednoormujassum share stories