Ussing mapping policy within a form

Hi,I have a question regarding mapping policy and using forms. In my case I have a form which get filled with 3 slots. And I have an intent called “Are_you_a_bot” which has trigger {action_give_bot_answer}.
What happens if I am in the middle of a form and then the user asks “are you a bot?”. In my case the mapped action jumps in, but it does not return to the form after it. I cannot make a story which handles the whole path because intents, which have trigger, cannot be used in stories.
What is the best way to handle it?

The policies used for the training are:


  • name: KerasPolicy
    priority: 1\
  • name: MemoizationPolicy
    priority: 2\
  • name: TwoStageFallbackPolicy
    priority: 3
    nlu_threshold: 0.3
    fallback_nlu_action_name: “action_default_ask_affirmation”
    deny_suggestion_intent_name: “out_of_scope”
  • name: MappingPolicy
    priority: 5\
  • name: FormPolicy
    priority: 4

I’m not sure if this will work. In the triggered action use the event FollowupAction and call your form again, like:

return [FollowupAction("form_name")]

You’ll probably need to add an if-else with the value of requested_slot, if it is not none, call the form.

@lena does your action return a UserUtteranceReverted() event as well? The bot actually is still in the form after it’s executed, but it doesn’t re-ask the question at this point. You could definitely try out what @Gehova is suggesting as well

@akelad Thank you for your suggestions. Even when my action returns UserUtteranceReverted(), the form doesn’t ask for the next slot, it ends up with action_listen.

@Gehova: Thank you for your suggestions as well. This returns me back to the form!