Condition based response after user input

I just got around rasa a day ago, it’s really great!:wink: I am trying solve the following kind of use case:

User: Do you like ice cream?

Bot: Yes, I do like ice cream. Do you like ice as well?

(a) User writes with intent (user_likes_ice_cream_too) of: “I like also ice cream” or “Yes, I like ice cream” In those both intent cases, the bot should answer:

Bot: “Let’s order some ice cream”

If this intent was not found the bot should answer:

Bot: “Alright, get something else”

I am hanging at the story/action point where I have to wait for the users input from the bot’s question and matching that result against the intent of “user_likes_ice_cream_too”

- story: ice path 1
  steps:
  - intent: user_asking_bot_ice_cream
  - action: utter_bot_likes_ice_cream
  - action: utter_ask_if_user_likes_ice_cream  
  - action: action_ice_cream

How is it possible to to solve this issue, e.g. waiting for the users reply from a bot question? Or can I write that condition without a custom action?

Any help would be great!!

 if tracker.latest_message['intent'].get('name') == 'user_likes_ice_cream_too':          
      dispatcher.utter_message(
        response="utter_order"
      )      
    else:
      dispatcher.utter_message(
        response="utter_continue"
      )

You can achieve that with a for and a from_intent validation (link). Or in case you can group the answer that lead to “alright, get something else”, you could also create a second story:

- story: ice path 1
  steps:
  - intent: user_asking_bot_ice_cream
  - action: utter_bot_likes_ice_cream
  - action: utter_ask_if_user_likes_ice_cream  
  - intent: likes_ice
  - action: action_ice_cream

- story: ice path 2
  steps:
  - intent: user_asking_bot_ice_cream
  - action: utter_bot_likes_ice_cream
  - action: utter_ask_if_user_likes_ice_cream  
  - intent: doesnt_like_ice
  - action: action_ice_cream

Thanks a lot so far! I don’t know the intent “doesnt_like_ice”, I mean its’ “likes_ice” or anything else Is there a NLU reg exp for anything else like “*” what I could use tin order o work with different stories?

I cannot get it working with form_intent :unamused:

Can you help?