Call different rasa stories from one story

I have many intents in my data.

After answering users query i want to display “Do you want to know anything else?”

If user says “Yes” then i want to call different intent.And if users says “no” then i want to end the conversation.

The tricky part is i dont want to specify intent which will be used after user says “yes”.

The system should automatically pick other intents story.

How to achieve that

Hi @aniket!

What if pressing “Yes” and shows a group of buttons with the most relevant options? Maybe I can serve you :slightly_smiling_face:

Hi Matias,

Showing the group of buttons with most relevant options is not what i am looking for.

Do you know how to get the “yes” and “no” option in forms? and after “yes” “no” i can display some text from custom action and pass the context back to dialogue management module?

Do you have something implemented?

You could do it by adding an additional action in your final story, for example:

Stories:

* info_atm{"entidad": "recorrido"}
  - utter_atm_info_recorrido
  - utter_yes_no

Domains:

  utter_yes_no:
    - text: "Do you want to know anything else?"
      buttons:
      - title: "Yes"
        payload: "Yes, please"
      - title: "No"
        payload: "No, thanks"
(...)
actions:
      - utter_yes_no

Remember that you must prepare your bot to be able to interpret phrases with affirmative and negative intentions.

I do have intents ready for my affimative and negative response. I dont know how to handle the below scenario.

Do you want to know anything else?

After user enters “yes”.

bot should say: “Okay tell me?”

and now again user can entry any query.Now the query entered by user needs to be classified again.I have intents ready for those all queries.But how do i continue the flow?

Mmmm… :thinking:

You could do the following:

Stories:

* info_atm{"entidad": "recorrido"}
      - utter_atm_info_recorrido
      - utter_yes_no

* affirmative
      - utter_affirmative

Domains:

utter_atm_info_recorrido:
      - text: "(...)"
utter_yes_no:
    - text: "Do you want to know anything else?"
      buttons:
      - title: "Yes"
        payload: "Yes, please"
      - title: "No"
        payload: "No, thanks"
utter_affirmative:
      - "Okay tell me?"
(...)
actions:
      - utter_yes_no
      - utter_atm_info_recorrido
      - utter_affirmative

Again, remember that you must prepare your bot to be able to interpret phrases with affirmative and negative intentions.