# Ussing mapping policy within a form

**URL:** <https://forum.rasa.com/t/ussing-mapping-policy-within-a-form/19621>\
**Category:** Rasa Open Source\
**Created:** [October 11, 2019, 7:35am UTC](https://forum.rasa.com/t/ussing-mapping-policy-within-a-form/19621 "2019-10-11T07:35:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lena](https://avatars.discourse-cdn.com/v4/letter/l/c68b51/32.png) [@lena](https://forum.rasa.com/u/lena)\
**Post date:** [October 11, 2019, 7:35am UTC](https://forum.rasa.com/t/ussing-mapping-policy-within-a-form/19621/1 "2019-10-11T07:35:15Z")

</div>

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:

> policies:
> 
> - 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

---

<div class="post-metadata">

**Author:** ![Gehova](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@Gehova](https://forum.rasa.com/u/Gehova)\
**Post date:** [October 11, 2019, 1:22pm UTC](https://forum.rasa.com/t/ussing-mapping-policy-within-a-form/19621/2 "2019-10-11T13:22:15Z")

</div>

I’m not sure if this will work. In the triggered action use the event [FollowupAction](https://rasa.com/docs/rasa/api/events/#force-a-followup-action) 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.

---

<div class="post-metadata">

**Author:** ![akelad](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/akelad/32/69_2.png) [@akelad](https://forum.rasa.com/u/akelad)\
**Post date:** [October 14, 2019, 9:26am UTC](https://forum.rasa.com/t/ussing-mapping-policy-within-a-form/19621/3 "2019-10-14T09:26:00Z")

</div>

@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

---

<div class="post-metadata">

**Author:** ![lena](https://avatars.discourse-cdn.com/v4/letter/l/c68b51/32.png) [@lena](https://forum.rasa.com/u/lena)\
**Post date:** [October 15, 2019, 7:29am UTC](https://forum.rasa.com/t/ussing-mapping-policy-within-a-form/19621/4 "2019-10-15T07:29:23Z")

</div>

@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!
