Call a previous menu list by clicking on button in rasa chatbot

I have four menu can find in image

after that user can select any one option and get link for particular selected option. I need to add 1 button with text Go to Back Menu and then again that menu should be called as in image. Please help

@ashwinijdhav1991 how did you implement these buttons? You should be able to implement “Back to main menu” the same way :slight_smile:

exactly. i tried even i tried to print buttons value it shows me undefined

Can you provide the relevant part of the domain file? E.g. the places where you successfully implemented this menu and where you tried to implement the main menu

Please find attachment file.

domain.yml (1.2 KB) actions.py (5.4 KB) nlu.md (1.1 KB) stories.md (1.1 KB)

Are you sure that your user interface supports buttons? This domain file looks like you haven’t implemented the buttons in the screenshot yet.

i have made an array of services and call services in for loop and showing 4 values on button on utter_message in FindServices

Ok great, then you should be able to add the 5th button in the same way as the other 4!

However it doesn’t look like your buttons currently have payloads, which means that clicking them won’t do anything.

thank you for reply. let me explain my flow by screenshot

  1. Image 1 Onload bot shows 4 buttons

  2. Image 2 As user click on any of 1 from these 4 buttons bot will give answer using text message or any link

  3. image 3 in this i want back button(Go To back Menu) so again i want to call that message and 4 button again same as in image 1 so again user can choose any one button from 4 option. in image 3 i am getting undefined on button

code for after dispatcher.utter_message(“https://dmcgov.in/form/”)

Thank you.

In the fist example, you have a template and buttons, in the second you only have buttons (in the dispatcher.utter_message). You need to either provide a text or template in addition to the buttons, i believe. If you don’t want any text, you could probably pass `dispatcher.utter_message(text="", buttons-buttons), but I am not sure how your frontend will display the empty message.

Thank you for your reply. Issue has been solved. I saw UI then I come to know it contains only single dictionary of JSON so according that I put “go to back menu” button in my answered button only.buttons = [{‘title’:‘Go To Back Menu’}] and dispatcher.utter_message(message, buttons = buttons). Now i am getting my back button.

@ashwinijdhav1991 can you share the code please

Hello @rajeshpolaki,

Please read above explanation I have explained how I used that code for “go to back menu” . If still you have any doubt please don’t hesitate to ask help.

Thank you.

@ashwinijdhav1991 thank you do u have any specimen code with screen shot so that it is better understanding with illustrative examples

Hello @rajeshpolaki ,

Please follow these steps:

Step 1: In nlu file add intent

Srep 2: In domain.py

intents:

  • back

entities:

  • back

slots: back: type: text

actions:

  • action_back

Step 3: In actions.py

class FindBack(Action):

def name(self) -> Text:

	return "action_back"

def run(self,
		dispatcher: CollectingDispatcher,
		tracker: Tracker,
		domain: Dict[Text,Any]) -> List[Dict[Text, Any]]:
		back = tracker.get_slot('back')
		if back == "Go To Back Menu":
			return [FollowupAction(name='[Add-your-action]')]

@ashwinijdhav1991 Thank you so much

HTTPS , but requested an insecure XMLHttpRequest endpoint ‘http://:5005/conversations/default/respond’. This request has been blocked; the content must be served over HTTPS .

how to enable ssl in rasa server using os ubuntu

Hello @rajeshpolaki ,

Please follow this documentation Configuring HTTPS servers.

over here I am getting the same options I want the previous one how to get that?

Hello @Ayantika1 ,

I have explained and provide code please read above conversation. You’ll get your solution.

Thanks.