Session Ready
Exercise

Asking contextual questions

Sometimes your users need some help! They will have questions and expect the bot to help them.

In this exercise, you'll allow users to ask the coffee bot to explain the steps to them. As in the previous exercise, the answer they get will depend on where they are in the flow.

Instructions
100 XP
  • Add two rules to your policy_rules to handle the intent "ask_explanation" when in the states INIT or CHOOSE_COFFEE.
  • Inside the send_messages() function, call the send_message() function with state and msg as arguments to define the new state. Then, hit 'Submit Answer' to send the messages and see the bot's responses.