# What the propper way to include checkpoint in the middle of the story?

**URL:** <https://forum.rasa.com/t/what-the-propper-way-to-include-checkpoint-in-the-middle-of-the-story/12414>\
**Category:** Rasa Open Source\
**Created:** [July 3, 2019, 7:05am UTC](https://forum.rasa.com/t/what-the-propper-way-to-include-checkpoint-in-the-middle-of-the-story/12414 "2019-07-03T07:05:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![selphe](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@selphe](https://forum.rasa.com/u/selphe)\
**Post date:** [July 3, 2019, 7:05am UTC](https://forum.rasa.com/t/what-the-propper-way-to-include-checkpoint-in-the-middle-of-the-story/12414/1 "2019-07-03T07:05:06Z")

</div>

My use case is to simplify stories via including checkpoint with login actions. What I’ve tried:

> **Example of auth\_cases.md**
>
> ```auto
> ## Auth success
> > check_auth
> - action_check_auth
> - slot{"auth": true}
> > auth_true
> 
> ## Auth login success
> > check_auth
> - action_check_auth
> - slot{"auth": false}
> - followup{"name": "auth_form"}
> - auth_form
> - form{"name": "auth_form"}
> - slot{"auth": true}
> - form{"name": null}
> > auth_true
> 
> ## Auth failed
> > check_auth
> - action_check_auth
> - slot{"auth": false}
> - followup{"name": "auth_form"}
> - auth_form
> - form{"name": "auth_form"}
> * deny
> - action_deactivate_form
> - form{"name": null}
> - slot{"auth": false}
> > auth_failed
> 
> ## Auth explain failed 
> > auth_false
> - action_check_auth
> - slot{"auth": false}
> - followup{"name": "auth_form"}
> - auth_form
> - form{"name": "auth_form"}
> - slot{"requested_slot": "email"}
> * explain
> - utter_auth_explain
> - form{"name": "auth_form"}
> * deny
> - action_deactivate_form
> - form{"name": null}
> - slot{"auth": false}
> - utter_cancel
> > auth_failed
> 
> ```

> **Example of general\_stories.md**
>
> ```auto
> ## general story to deny unauth user
> > auth_false
> - utter_cant_do
> 
> ## example action 1 pass
> * request_action_1
> > check_auth
> > auth_true
> - action_request_action_1
> 
> ## example action 2 pass
> * request_action_2
> > check_auth
> > auth_true
> - action_request_action_2
> 
> ```

It kinda works, but replies are confused: when I request action 1, bot utteres action 2 and so on. It follow checkpoint, but looks like bot forgot what I’ve asked before checkpoint, and gives me random answer after auth.

I’ve also tried increase max\_history, but it didn’t help, may be it should be increased even more?

How can I simplify stories?

---

<div class="post-metadata">

**Author:** ![MetcalfeTom](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/metcalfetom/32/1422_2.png) [@MetcalfeTom](https://forum.rasa.com/u/MetcalfeTom)\
**Post date:** [July 10, 2019, 7:58am UTC](https://forum.rasa.com/t/what-the-propper-way-to-include-checkpoint-in-the-middle-of-the-story/12414/2 "2019-07-10T07:58:14Z")

</div>

Hi @selphe,

Try separating your checkpoints in the story - having one checkpoint after another in the same story is not how they’re intended to be used, for example your `general_stories.md` should look more like this:

```auto
## general story to deny unauth user
> auth_false
  - utter_cant_do

## example action 1 request
* request_action_1
> check_auth

## example action 1 pass
> auth_true
  - action_request_action_1

```

Of course, in order to have two separate request actions, you’ll need to use a slot to keep track of which one was requested.

On another note, what do you mean by “the bot forgot what I’ve asked before checkpoint”?

---

<div class="post-metadata">

**Author:** ![selphe](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@selphe](https://forum.rasa.com/u/selphe)\
**Post date:** [August 15, 2019, 5:06am UTC](https://forum.rasa.com/t/what-the-propper-way-to-include-checkpoint-in-the-middle-of-the-story/12414/3 "2019-08-15T05:06:46Z")

</div>

Seems in my case checkpoints is useless, because it can’t simplify stories like mine… It would be helpful, if checkpoints could work like “inlude”.

> **Example**
>
> ```
> ## Story 1
> * request_story_1
> > check_auth_block
> > auth_true_block
> - utter_welcome
> - action_story1
> 
> ## Story 2
> * request_story_2
> > check_auth_block
> > auth_true_block
> - utter_welcome
> - action_story2
> 
> ## include block 1
> > check_auth_block
> - action_check_auth
> - slot{"auth": false}
> 
> ## include block 2
> > auth_true_block
> - auth_form
> - form{"name": "auth_form"}
> - slot{"auth": true}
> - form{"name": null}
> 
> ```

In this example, I have a long “include” block with part of story, which will be repeated from story to another story. As result, the target story (Story 1 or Story 2) will be much simple to understand and read, and even simply to debug or edit included part.

May be is there some way to achieve that behaviour in current release?
