# Handle Small talk in the middle of a flow

**URL:** <https://forum.rasa.com/t/handle-small-talk-in-the-middle-of-a-flow/9875>\
**Category:** Rasa Open Source\
**Created:** [May 16, 2019, 12:37pm UTC](https://forum.rasa.com/t/handle-small-talk-in-the-middle-of-a-flow/9875 "2019-05-16T12:37:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![yaput](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/yaput/32/6710_2.png) [@yaput](https://forum.rasa.com/u/yaput)\
**Post date:** [May 16, 2019, 12:37pm UTC](https://forum.rasa.com/t/handle-small-talk-in-the-middle-of-a-flow/9875/1 "2019-05-16T12:37:44Z")

</div>

Hi, is it possible to handle small talk in the middle of a story without a form?

bot: Do you want coffee?(quick replies: yes, no) user: yes(or type “yes please”) bot: (replied with front end form to be filled by user) user: how are you today? (or other small talk intents)

Expected response:

- responded based on the small talk intent Reality(for me):
- submit the form without any data(keep going into the flow)

Keep wandering if this is possible just like dialogflow that can handle intent switching everytime. The NLU keep predicting the correct intent, but RASA Core does not do the same.

Thanks

---

<div class="post-metadata">

**Author:** ![yaput](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/yaput/32/6710_2.png) [@yaput](https://forum.rasa.com/u/yaput)\
**Post date:** [May 16, 2019, 12:48pm UTC](https://forum.rasa.com/t/handle-small-talk-in-the-middle-of-a-flow/9875/2 "2019-05-16T12:48:39Z")

</div>

same like [this thread](http://forum.rasa.com/t/pause-story-and-continue-where-you-left-off/9858)

---

<div class="post-metadata">

**Author:** ![Remy](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/remy/32/2030_2.png) [@Remy](https://forum.rasa.com/u/Remy)\
**Post date:** [May 16, 2019, 2:42pm UTC](https://forum.rasa.com/t/handle-small-talk-in-the-middle-of-a-flow/9875/3 "2019-05-16T14:42:03Z")

</div>

There’s a new policy for exactly this: MappingPolicy.

You can map certain intents to certain utters, e.g.

```
* how_are_you
- utter_Im_fine

```

You can map these two together by activating MappingPolicy in you policy ensemble and placing a trigger in your domain file.

That should look like this:

```
intents:
- how_are_you: {triggers:utter_im_fine}

```

This makes it so the bot answers that intent in any flow, and then returns to the flow uninterrupted.

check it out on the rasa docs.

---

<div class="post-metadata">

**Author:** ![yaput](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/yaput/32/6710_2.png) [@yaput](https://forum.rasa.com/u/yaput)\
**Post date:** [May 19, 2019, 11:11am UTC](https://forum.rasa.com/t/handle-small-talk-in-the-middle-of-a-flow/9875/4 "2019-05-19T11:11:28Z")

</div>

Thank you so much, will look further into this.

---

<div class="post-metadata">

**Author:** ![yaput](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/yaput/32/6710_2.png) [@yaput](https://forum.rasa.com/u/yaput)\
**Post date:** [May 19, 2019, 12:38pm UTC](https://forum.rasa.com/t/handle-small-talk-in-the-middle-of-a-flow/9875/5 "2019-05-19T12:38:38Z")

</div>

Hi Remy, i tried this solution and it’s awesome, but if i type something else other than the story flow, it predicted as the intent in the flow, and the story keep continuing, is it any way around to stop the story and create a fresh start?

---

<div class="post-metadata">

**Author:** ![Remy](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/remy/32/2030_2.png) [@Remy](https://forum.rasa.com/u/Remy)\
**Post date:** [May 20, 2019, 11:50am UTC](https://forum.rasa.com/t/handle-small-talk-in-the-middle-of-a-flow/9875/6 "2019-05-20T11:50:09Z")

</div>

> [@yaput](#):
>
> it predicted as the intent in the flow

This looks like an NLU issue. It predicts the wrong intent it seems.

You can test your stories using the --debug flag.

creating a fresh start is done by using /restart. You can embed that in a button for instance, or have your bot explain that to a user. TwoStageFallbackPolicy has this in-built in its workings.

---

<div class="post-metadata">

**Author:** ![yaput](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/yaput/32/6710_2.png) [@yaput](https://forum.rasa.com/u/yaput)\
**Post date:** [May 20, 2019, 12:16pm UTC](https://forum.rasa.com/t/handle-small-talk-in-the-middle-of-a-flow/9875/7 "2019-05-20T12:16:19Z")

</div>

Okay, clear, thanks for your answer and solution Remy, appreciate it 😃

---

<div class="post-metadata">

**Author:** ![Remy](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/remy/32/2030_2.png) [@Remy](https://forum.rasa.com/u/Remy)\
**Post date:** [May 20, 2019, 1:42pm UTC](https://forum.rasa.com/t/handle-small-talk-in-the-middle-of-a-flow/9875/8 "2019-05-20T13:42:40Z")

</div>

No problem, Yanuar.

good luck!
