but the condition is user will have to feed input as 1 or 2 for all intents. but when i input 1 or 2 it always reply first but it should respond based on previous. so please help me to implement this.
level-1
The bot needs to ask if the user wants to do
1) ......... Inquiry
2) -------- Status user input --> 1
level-2
When the user selects inquiry , it needs to ask if the user wants to check
1) ---------opt1
2) ---------opt2 user input --> 1
level-3
Once they select optn1 , it needs to ask , if the user wants to check based on
1) opt No
2) R No
3) I No user input --> 1
level-4
Once they select Opt No , it needs to ask , if the user wants to check based on
1. opl NO
2. opl info user input --> 1
@Sagar_Indian Hi Sagar. Please see this demo example for your use case and customised accordingly.
In domain.yml
intents:
- one
- two
- three
utter_menu:
- text: Select the topic or write your question below.
buttons:
- title: '1'
payload: /one
- title: '2'
payload: /two
- title: '3'
payload: /three
utter_ask_one:
- text: you selected one
utter_ask_two:
- text: you selected two
utter_ask_three:
- text: you selected three
In nlu.yml
version: "2.0"
nlu:
- intent: one
examples: |
- 1
- one
- one please
- 1 please
- intent: two
examples: |
- 2
- two
- two please
- 2 please
- intent: three
examples: |
- 3
- three
- three please
- 3 please
In stories.yml
version: '2.0'
stories:
- story: one menu
steps:
- intent: one
- action: utter_ask_one
- story: two menu
steps:
- intent: two
- action: utter_ask_two
- story: three menu
steps:
- intent: three
- action: utter_ask_three
If you got any issue please let me know. I hope this will solve your issue. The concept will be same for any menu or options selection.
thanks @nik202! just now logged in my system…going to implement…but i have a doubt that…for level-1 i think this will work fine. but when i will go for next level then again i have to give input 1 or 2 only then for next level again 1 or 2 only…and another thing level-2 should be called after level-1 and level-3 must be called after level-2 (in a sequential way), first parent intent then child intent should be called child must not be called before parent, so at that point will it work???
@Sagar_Indian I will suggest first try till you able to get the perfect response from the bot, if the bot is depended on first input then you need to implement form based and slot based approach.
hi @nik202 its working for only first level as i select input 1 or 2 in second or third layer it is showing layer-1 utter_response only.
another thing is suppose first level if i select option-1 and then in level-2 if i go for option2 its showing level-1(option-2) utter_response.
and one more thing i don’t want option based menu i just want to feed input as 1 or 2 based on this utter_response should show.
hi @nik202 here you can see what actually i want to implement.
user - hi
bot - Hey there, Enter an option number to continue.
1. option1 Inquiry
2. option1 Status
user - 1
bot - Enter an option number to continue.
1. in***
2. Out***
user - 1 (if here i input 2 it should reply based on just previous query means 2. Out***) but currently in my implementation as i will give input as 2 i get (level -1 option2---> option1 status)
bot - Enter an option number to continue. (must reply like this) but no i am not able to implement
1. A.. No
2. Reference No
3. I... No
user - 2
bot - Enter Reference No (if here i input 1 or 2 it should reply based on just previous query) but currently in my implementation as i will give input as 1 i get (level -1 option1---> option1 inquiry) or as i will give input as 2 i get (level -1 option2---> option1 status)
so please help me to implement this sequential approach. Thanks!
thanks @krkc ! using custom action already i tried but there also getting wrong reply just because each time input is 1 or 2 only so… is there any way to remember last query so that if i input 1 or 2 it should be picked up by current query.