Is there any way to create a menu based chatbot for whatsapp using RASA

Hii @SamS, I need to create a chatbot for whatsapp using menu based approach i.e. User should only interact with the bot using numbers. Ex:


For information regarding product select one of the following options:

  1. XYZ
  2. qwer
  3. some_option

User: 1

BOT: For XYZ product select from following options:

  1. Option1
  2. OPtion2
  3. Option3

User: 2

what is the best possible way to achieve this type of usecase using RASA? Thanks in advance.

Hey @ojas, I think your use case could be covered nicely by using buttons. If you don’t want the user to press buttons and really have them write only numbers, then that could be done too (in that case, you’ll have to create a custom action for this). Let me know if you have more specific questions.

1 Like

@SamS thanks for the reply!

Since i need to create this bot for whatsapp, so buttons can’t be used. I have multiple user stories that i have to implement on whatsapp. Since user interaction can will only be done through numbers i.e. 1,2,… . So how can intent parsing be done and implemented.

I think you’ll want to group all those numerical user messages under 1 intent; possibly extracting the number itself as an entity, and then from within your custom action conditioning on the value of the extracted entity.

1 Like

@SamS you mean something like this:

intent: number_input

Yeah, for example :slightly_smiling_face:

Hello @ojas Can you help me, how did you solve that problem

Hey @NikoAP77 I have been working on same. I am using a different approach to solve this. As of now i have not defined any numbered intent in my nlu.

I have introduced a flask layer between whatsapp and my rasa server.

In my flask, i have basically mapped my actual intents to the numbers. Something like this:

Intent = {‘1’ : {‘option’ : ‘option1’, ‘payload’:‘payload1’}, ‘2’ : {‘option’ : ‘option2’, ‘payload’:‘payload2’}}

So basically my flask layer sends the actual intent( i.e. payload) based on what user inputs as 1 or 2

1 Like

@ojas I am also working on a similar kind of project, Is it working fine for you? Will it work if I start the conversation with the bot instead of passing numeric input?