# Trigger a Story OR Intent from a custom action

**URL:** <https://forum.rasa.com/t/trigger-a-story-or-intent-from-a-custom-action/44811>\
**Category:** Rasa Open Source\
**Created:** [June 18, 2021, 3:19pm UTC](https://forum.rasa.com/t/trigger-a-story-or-intent-from-a-custom-action/44811 "2021-06-18T15:19:30Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![oluwoleilesanmi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/oluwoleilesanmi/32/15418_2.png) [@oluwoleilesanmi](https://forum.rasa.com/u/oluwoleilesanmi)\
**Post date:** [June 18, 2021, 3:19pm UTC](https://forum.rasa.com/t/trigger-a-story-or-intent-from-a-custom-action/44811/1 "2021-06-18T15:19:30Z")

</div>

How do i call a different story from a Custom Action using logic to control the story that is selected i have tried using UserUttered and SlotSet nothing seems to work. Kindly see screenshots of my implementation.

![Screenshot 2021-06-18 at 15.07.11](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/3/3658540dcfcbb2bcdb7fd55d231ea1ffc254f960.png) ![Screenshot 2021-06-18 at 15.07.33](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/2/2f66db70bb37bfc6e52d1879d81b7d5c134411c4.png)

 ![Screenshot 2021-06-18 at 15.11.17](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/8/8f4184205683a3426e53fad16cc68cf7731e4440.png) ![Screenshot 2021-06-18 at 15.11.37](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/4/4fb2bd7d19b74d27a6c53d479c00609c5451e81e.png) ![Screenshot 2021-06-18 at 15.19.02](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/8/8616712ce9af835cc75e6b0660b9866aba04d69e.png)

I cant figure out what i am doing wrong. kindly help

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [June 18, 2021, 5:09pm UTC](https://forum.rasa.com/t/trigger-a-story-or-intent-from-a-custom-action/44811/2 "2021-06-18T17:09:48Z")

</div>

@oluwoleilesanmiTry

result=[UserUttered(text="/first\_latin\_square", intent= {“name” : “first\_latin\_square”}), SlotSet(“latin\_square\_counter”, “lb”)]

check this also: [https://rasa.com/docs/action-server/sdk-events/#userutteredhttps://rasa.com/docs/action-server/sdk-events/#useruttered](https://rasa.com/docs/action-server/sdk-events/#userutteredhttps://rasa.com/docs/action-server/sdk-events/#useruttered)

Do it same for rest, hope it will solve your issue.

---

<div class="post-metadata">

**Author:** ![oluwoleilesanmi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/oluwoleilesanmi/32/15418_2.png) [@oluwoleilesanmi](https://forum.rasa.com/u/oluwoleilesanmi)\
**Post date:** [June 18, 2021, 6:52pm UTC](https://forum.rasa.com/t/trigger-a-story-or-intent-from-a-custom-action/44811/3 "2021-06-18T18:52:51Z")

</div>

@nik202 thank you response i tried this and it appears it is not recognised, but the slots values do change. It always says null. Kindly see screenshot from rasax interface when i use [UserUttered(“/first\_latin\_square”, {“name”: “first\_latin\_square”}), SlotSet(“latin\_square\_counter”, “lb”)] for all 3.

 ![Screenshot 2021-06-18 at 19.21.52](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/5/5bf8dbdfeeaa05a47c9b761de85d3c6b5a753ce3.png)

on the other hand when i include text= && intent= as shown in the event UserUttered [UserUttered(text=“/first\_latin\_square”, intent={“name”: “first\_latin\_square”}), SlotSet(“latin\_square\_counter”, “lb”)], i get the error below.

 ![Screenshot 2021-06-18 at 19.36.47](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/3/3ed94db6437f64218bc917b2130b9db38e3acd9f.png)

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [June 18, 2021, 7:21pm UTC](https://forum.rasa.com/t/trigger-a-story-or-intent-from-a-custom-action/44811/4 "2021-06-18T19:21:05Z")

</div>

@oluwoleilesanmiSwap- Mention SlotSet first and then UserUttered

Do for both the cases please.

Even check this [Events](https://rasa.com/docs/action-server/events#user)

 ![Screenshot 2021-06-18 at 8.29.19 PM](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/0/0ea28e950be1e28f430b7405cf6a819976e678a8.png)

**Tip:** Delete the older version and re-train the model please.

Good Luck!

---

<div class="post-metadata">

**Author:** ![oluwoleilesanmi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/oluwoleilesanmi/32/15418_2.png) [@oluwoleilesanmi](https://forum.rasa.com/u/oluwoleilesanmi)\
**Post date:** [June 19, 2021, 2:28pm UTC](https://forum.rasa.com/t/trigger-a-story-or-intent-from-a-custom-action/44811/5 "2021-06-19T14:28:46Z")

</div>

@nik202 thank you, the intent is recognised but actions in the story are not called. below shows how to call UserUttered event.

[SlotSet(“latin\_square\_counter”, “la”), UserUttered(“first\_latin\_square”, {“intent”: {“name”: “third\_latin\_square”, “confidence”: 1.0}})]

any ideas why actions in the story are not called?

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [June 19, 2021, 2:31pm UTC](https://forum.rasa.com/t/trigger-a-story-or-intent-from-a-custom-action/44811/6 "2021-06-19T14:31:13Z")

</div>

@oluwoleilesanmi please share updated story and action file please let me check and even show the error screenshot, run action server in second terminal by rasa run actions

Try mention action: “action\_latin\_square\_selection” in story , give try please.

---

<div class="post-metadata">

**Author:** ![oluwoleilesanmi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/oluwoleilesanmi/32/15418_2.png) [@oluwoleilesanmi](https://forum.rasa.com/u/oluwoleilesanmi)\
**Post date:** [June 19, 2021, 2:49pm UTC](https://forum.rasa.com/t/trigger-a-story-or-intent-from-a-custom-action/44811/7 "2021-06-19T14:49:35Z")

</div>

@nik202 Here are the files.

 ![Screenshot 2021-06-19 at 15.39.04](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/8/84d2896333342b290fd737ba581df4c6a477127a.png) ! ![Screenshot 2021-06-19 at 15.52.50](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/6/6640b452af156b924b7eca012e13a25f980202bf.png)

I just tried including the action\_latin\_square\_selection in all stories but it doesn’t fix it.

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [June 19, 2021, 3:51pm UTC](https://forum.rasa.com/t/trigger-a-story-or-intent-from-a-custom-action/44811/8 "2021-06-19T15:51:57Z")

</div>

@oluwoleilesanmi please share the all files (original files) not screenshots, let me run the code by myself, even share the version or requirement files whilst using pip freeze \> requirement.txt.

I guess its issue of story, or may be other. If you can share. I can try to fix your issue. Thanks.

Is that you mention action in story?

> -story: first\_latin\_square steps:
> 
> - action: action\_latin\_square\_selection
> - slot\_was\_set:
> - latin\_square\_counter: la
> - intent: first\_lating\_square \* you can remove this and try
> - action: utter\_greet

I can be wrong also, but you can try… Thats why I asked you all the file. Thanks

See all the story how they have mention action [Responses](https://rasa.com/docs/rasa/responses)

---

<div class="post-metadata">

**Author:** ![oluwoleilesanmi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/oluwoleilesanmi/32/15418_2.png) [@oluwoleilesanmi](https://forum.rasa.com/u/oluwoleilesanmi)\
**Post date:** [June 21, 2021, 11:10am UTC](https://forum.rasa.com/t/trigger-a-story-or-intent-from-a-custom-action/44811/9 "2021-06-21T11:10:23Z")

</div>

@nik202 Thanks i used a different approach all together after trying so many things, UserUttered doesn’t call any of the stories. I used followup action FollowupAction(name=“action\_latin\_one”) and this worked. This is what the actions and stories look like now.

 ![Screenshot 2021-06-21 at 12.07.01](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/5/5f984680311526c7a25d45a8c2a0b40ba32cf2fb.png) ![Screenshot 2021-06-21 at 12.07.23](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/a/aacfca7edf7cb70e1764900e4aba094d7a173ba7.png)

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [June 21, 2021, 12:35pm UTC](https://forum.rasa.com/t/trigger-a-story-or-intent-from-a-custom-action/44811/10 "2021-06-21T12:35:43Z")

</div>

@oluwoleilesanmi Congrts, and well done!! I tried my level based to help you!
