Suppose I have a story that ends with the user confirming or denying something.
## some story
* some_root_intent
- some_action1
- some_action2
- utter_ask_is_that_what_you_wanted
> some_checkpoint
## User affirmed
> some_checkpoint
* affirm
- utter_glad_to_hear
- action_restart
## User denied
> some_checkpoint
* deny
- some_other_action
- action_restart
The issue I’m having with this is that these substories make the conversation lock up and the next user message is forcefully processed as either affirming or denying. I want to make the “yes/no” part of the conversation optional and ignorable, and the bot goes back to its “ready for any story” state (which I guess would be action_restart
) including restarting this very story itself.
One idea that I had in mind was to make a sort of “recursive” substory, that is,
## some story
> checkpoint_root_intent_triggered
* some_root_intent
- some_action1
- some_action2
- utter_ask_is_that_what_you_wanted
> some_checkpoint
## deny
> some_checkpoint
* some_root_intent
> checkpoint_root_intent_triggered
Obviously this is a very hacky method that’s just WAITING to trigger some weird behaviour. That, along with the fact that it becomes impractical because you’d have to write these recursive substories for every other “story root” intent as well.
As such, what is the best way to incorporate an “optional” (sub)story into my bot?