# Two actions in series not working

**URL:** <https://forum.rasa.com/t/two-actions-in-series-not-working/49719>\
**Category:** Rasa Open Source\
**Created:** [December 3, 2021, 7:26am UTC](https://forum.rasa.com/t/two-actions-in-series-not-working/49719 "2021-12-03T07:26:58Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![NIkhilBhaskar](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nikhilbhaskar/32/18420_2.png) [@NIkhilBhaskar](https://forum.rasa.com/u/NIkhilBhaskar)\
**Post date:** [December 3, 2021, 7:26am UTC](https://forum.rasa.com/t/two-actions-in-series-not-working/49719/1 "2021-12-03T07:26:58Z")

</div>

I am using rasa version 2.8

```auto
- story: search restaurant info + affirm 
  steps:
    - intent: restaurant_info
    - action: restaurant_info_form
    - active_loop: restaurant_info_form
    - slot_was_set:
      - requested_slot: location
    - action: action_deactivate_loop
    - active_loop: null
    - slot_was_set:
      - requested_slot: null
    - intent: affirm    
    - action: display_restaurant_data      
    - action: restart_conversation

```

This is my story I want to get information of a restaurant based on it’s location which will be provided by user in a form.

Now everything works but last action(restart\_conversataion) doesn’t work, although the action is correct, it just resets all slots.

here is the action:

```auto
from rasa_sdk.events import Restarted

def ActionRestarted(Action):
    def name(self):
        return "restart_conversation"

    def run(self,dispatcher,tracker,domain):
        dispatcher.utter_message('slots reset')
        return [Restarted()]    

```

Now my question is can we write 2 or more consecutive actions together without an intent between them?

I know in rasa 1.x we can

Thanks

---

<div class="post-metadata">

**Author:** ![ChrisRahme](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chrisrahme/32/15572_2.png) [@ChrisRahme](https://forum.rasa.com/u/ChrisRahme)\
**Post date:** [December 3, 2021, 11:22am UTC](https://forum.rasa.com/t/two-actions-in-series-not-working/49719/2 "2021-12-03T11:22:30Z")

</div>

What’s the problem with the restart? If the slots are reset, that’s the correct behavior as per the [docs](https://rasa.com/docs/action-server/events#restart).

Anyway yes, you can write consecutive actions, or make use of the [FollowupAction](https://rasa.com/docs/action-server/sdk-events#followupaction) event.

---

<div class="post-metadata">

**Author:** ![ILG2021](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ilg2021/32/18166_2.png) [@ILG2021](https://forum.rasa.com/u/ILG2021)\
**Post date:** [December 3, 2021, 11:34am UTC](https://forum.rasa.com/t/two-actions-in-series-not-working/49719/3 "2021-12-03T11:34:26Z")

</div>

You mean you don’t want to reset the slots? Maybe you can try this: ` carry_over_slots_to_new_session: false` in domain.yml

---

<div class="post-metadata">

**Author:** ![NIkhilBhaskar](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nikhilbhaskar/32/18420_2.png) [@NIkhilBhaskar](https://forum.rasa.com/u/NIkhilBhaskar)\
**Post date:** [December 3, 2021, 12:02pm UTC](https://forum.rasa.com/t/two-actions-in-series-not-working/49719/4 "2021-12-03T12:02:46Z")

</div>

@ChrisRahmeAccording to docs my story and action is correct, I know that. But after action: display\_restaurant\_data is executed, action: restart\_conversation doesn’t get triggered.

Why is that any idea?

---

<div class="post-metadata">

**Author:** ![NIkhilBhaskar](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nikhilbhaskar/32/18420_2.png) [@NIkhilBhaskar](https://forum.rasa.com/u/NIkhilBhaskar)\
**Post date:** [December 3, 2021, 12:03pm UTC](https://forum.rasa.com/t/two-actions-in-series-not-working/49719/5 "2021-12-03T12:03:54Z")

</div>

I want to reset the slot after every story is completed, but somehow 2 consecutive actions are not triggred(The 1st one is executed but not the second one)

---

<div class="post-metadata">

**Author:** ![ChrisRahme](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chrisrahme/32/15572_2.png) [@ChrisRahme](https://forum.rasa.com/u/ChrisRahme)\
**Post date:** [December 3, 2021, 12:04pm UTC](https://forum.rasa.com/t/two-actions-in-series-not-working/49719/6 "2021-12-03T12:04:44Z")

</div>

> [@NIkhilBhaskar](#):
>
> But after action: display\_restaurant\_data is executed, action: restart\_conversation doesn’t get triggered.

It’s weird. Maybe you need more stories doing this?

Anyway, my preference in that case is to use [FollowupAction](https://rasa.com/docs/action-server/sdk-events#followupaction). Why not try it?

---

<div class="post-metadata">

**Author:** ![NIkhilBhaskar](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nikhilbhaskar/32/18420_2.png) [@NIkhilBhaskar](https://forum.rasa.com/u/NIkhilBhaskar)\
**Post date:** [December 3, 2021, 1:13pm UTC](https://forum.rasa.com/t/two-actions-in-series-not-working/49719/7 "2021-12-03T13:13:18Z")

</div>

@ChrisRahme

So I should write my FollowupAction in my previous action? example: if I have 2 actions

- action: display\_restaurant\_data
- action: restart\_conversation

so I should write my FollowupAction in display\_restaurant\_data ?

---

<div class="post-metadata">

**Author:** ![ChrisRahme](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chrisrahme/32/15572_2.png) [@ChrisRahme](https://forum.rasa.com/u/ChrisRahme)\
**Post date:** [December 3, 2021, 3:00pm UTC](https://forum.rasa.com/t/two-actions-in-series-not-working/49719/8 "2021-12-03T15:00:23Z")

</div>

Yup,

```auto
return [Restarted(), FollowupAction(action_name)] 

```

---

<div class="post-metadata">

**Author:** ![NIkhilBhaskar](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nikhilbhaskar/32/18420_2.png) [@NIkhilBhaskar](https://forum.rasa.com/u/NIkhilBhaskar)\
**Post date:** [December 5, 2021, 3:25pm UTC](https://forum.rasa.com/t/two-actions-in-series-not-working/49719/9 "2021-12-05T15:25:53Z")

</div>

Thanks @ChrisRahme That helped

For other readers FollowupAction(“action\_name”) use quotes for action name

---

<div class="post-metadata">

**Author:** ![ChrisRahme](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chrisrahme/32/15572_2.png) [@ChrisRahme](https://forum.rasa.com/u/ChrisRahme)\
**Post date:** [December 5, 2021, 3:27pm UTC](https://forum.rasa.com/t/two-actions-in-series-not-working/49719/10 "2021-12-05T15:27:52Z")

</div>

Yes of course, `action_name` is a variable in my example 🙂

Glad to be of help anyway!
