# Save break point in a dialog and get back to it after interruption

**URL:** <https://forum.rasa.com/t/save-break-point-in-a-dialog-and-get-back-to-it-after-interruption/42662>\
**Category:** Rasa Open Source\
**Created:** [April 20, 2021, 1:18pm UTC](https://forum.rasa.com/t/save-break-point-in-a-dialog-and-get-back-to-it-after-interruption/42662 "2021-04-20T13:18:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhzape](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@jhzape](https://forum.rasa.com/u/jhzape)\
**Post date:** [April 20, 2021, 1:18pm UTC](https://forum.rasa.com/t/save-break-point-in-a-dialog-and-get-back-to-it-after-interruption/42662/1 "2021-04-20T13:18:47Z")

</div>

Hi @stephens ,

May i ask how to get back to the story which was interrupted by another story in the middle? For example the bot works good in Story 1 and at one middle step, Story 2 (e.g. ask weather etc) comes in and interrupted. Is there any methods in rasa-sdk or any better way to get back to the exact break point in story 1 and finish the rest of steps after finishing story 2?

---

<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:** [April 21, 2021, 9:38am UTC](https://forum.rasa.com/t/save-break-point-in-a-dialog-and-get-back-to-it-after-interruption/42662/2 "2021-04-21T09:38:57Z")

</div>

Hi @jhzape, there are various ways to achieve this as long as you have rules or stories for these things. You can find a user guide on this topic [here](https://rasa.com/docs/rasa/unexpected-input). For questions like ask weather, you can just write a rule and the bot will automatically continue where it left off once that interaction is complete

---

<div class="post-metadata">

**Author:** ![jhzape](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@jhzape](https://forum.rasa.com/u/jhzape)\
**Post date:** [April 21, 2021, 9:58am UTC](https://forum.rasa.com/t/save-break-point-in-a-dialog-and-get-back-to-it-after-interruption/42662/3 "2021-04-21T09:58:02Z")

</div>

Thanks for your reply @akelad. But my case is somehow different to the link you shared. Since Story 2 is firstly an multi-turn interaction (adjust app volume and send/receive commands to/from android app by custom payload), not in a form, but can take place at any step not only in Story 1, but also in Story 3… Story N. It seems to me that adding Story 2 to each other stories is too cumbersome.

I tried the way that changing sender\_id, so that the main dialog is with sender\_id “A” and interruption dialog can work under sender\_id “B”. What I expected is once the interruption dialog is done and I switch sender\_id from “B” to “A”, the main dialog should continue as no interruption occurs. But I failed.

I was wondering if tracker can help in some way, which can remove the interruption dialog and go back to the action before the break point. I hope I make it clear to you.

---

<div class="post-metadata">

**Author:** ![YuaNWA](https://avatars.discourse-cdn.com/v4/letter/y/ce73a5/32.png) [@YuaNWA](https://forum.rasa.com/u/YuaNWA)\
**Post date:** [April 21, 2021, 10:37am UTC](https://forum.rasa.com/t/save-break-point-in-a-dialog-and-get-back-to-it-after-interruption/42662/4 "2021-04-21T10:37:13Z")

</div>

I’ve struggled with this for a long time as well, and long story short, RASA doesn’t have multi-turn interruption built in.

There are workarounds, but you will be doing complicated things that RASA was probably not designed for.

First things first, when Story 1 is interrupted, you will have to use a custom action to store the last bot utterance in a slot. You can do this by looking at the tracker within the custom action itself and getting the last bot utterance from there.

The second part is more tricky. It will depend on how your project has been coded and setup. The important thing to note is that RASA can’t resume from the middle of a story.

So how do you get around that?

1. Ensure that each of your utterances has a unique intent. This pretty much only works if your project is entirely a decision tree based system. So when Story 2 ends, you run a custom action to get the last bot utterance from the slot it was stored in and use FollowUpAction() to force the bot to repeat the last message in Story 1. Remember, RASA cannot resume from the middle of a story, so if that utterance is in the middle of a story, RASA will not be able to correctly predict the next action. Which is why your intents need to be unique so that RASA can know where to go from there.

2. Judicious use of UserUtteranceReverted()/ActionReverted()/FollowupAction() to rewind the tracker to the point where you left off in Story 1. This of course has a lot of drawbacks as well. Essentially, you will be running a custom action to loop through the tracker, and rewind each action until you get to the last bot utterance in Story 1. This method is more helpful as you would end up back before the interruption and can continue with the story. Before doing the rewinding, you can store the slot values internally first then use SlotSet() to ensure that the slots are passed on even after the actions have been rewinded.

WARNING: I have not tested these methods fully and they might mess up your project. This is also not something that RASA is designed for, so doing this might mess up your project.

---

<div class="post-metadata">

**Author:** ![jhzape](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@jhzape](https://forum.rasa.com/u/jhzape)\
**Post date:** [April 21, 2021, 12:20pm UTC](https://forum.rasa.com/t/save-break-point-in-a-dialog-and-get-back-to-it-after-interruption/42662/5 "2021-04-21T12:20:07Z")

</div>

Hi @YuaNWA, thanks a lot for such detailed explanation and i am impressed by the research you have done so far. I will give a try on the 2rd way to see if the bot can handle it or not.

---

<div class="post-metadata">

**Author:** ![jhzape](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@jhzape](https://forum.rasa.com/u/jhzape)\
**Post date:** [April 28, 2021, 8:32am UTC](https://forum.rasa.com/t/save-break-point-in-a-dialog-and-get-back-to-it-after-interruption/42662/6 "2021-04-28T08:32:57Z")

</div>

@YuaNWA Do you know if timestamp of an action can control which action the bot should revert to? I tried to use timestamp to control the conversation flow, but I had no progress so far and posted a new [topic](http://forum.rasa.com/t/timestamp-in-actionreverted/42921). Could you please have a look at it?
