# Responses from custom actions not uttered

**URL:** <https://forum.rasa.com/t/responses-from-custom-actions-not-uttered/47630>\
**Category:** Rasa Open Source\
**Created:** [September 10, 2021, 7:55am UTC](https://forum.rasa.com/t/responses-from-custom-actions-not-uttered/47630 "2021-09-10T07:55:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Venkat](https://avatars.discourse-cdn.com/v4/letter/v/4491bb/32.png) [@Venkat](https://forum.rasa.com/u/Venkat)\
**Post date:** [September 10, 2021, 7:55am UTC](https://forum.rasa.com/t/responses-from-custom-actions-not-uttered/47630/1 "2021-09-10T07:55:04Z")

</div>

HI , I made some custom actions for my project , but the responses entered in the custom actions is not uttered by the bot .

I have attached the python code for the custom actions

```auto

from typing import Any, Text, Dict, List
from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher
class area_options(Action):
    def name (self) -> Text:
        return "action_area_buttons"

    def run(self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict[Text,Any]) -> List[Dict[Text, Any]]:
        value = tracker.get_slot("area_travel")
        
        if value == 'Domestic': 
            dispatcher.utter_message(message= "utter_domestic_packages")
        elif value == 'International':         
            dispatcher.utter_message(message= "utter_international_packages")
        return []

```

---

<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:** [September 10, 2021, 9:09am UTC](https://forum.rasa.com/t/responses-from-custom-actions-not-uttered/47630/2 "2021-09-10T09:09:25Z")

</div>

Hello @Venkat I guess this is same as this thread [Facing syntax error with custom action in rasa open source](http://forum.rasa.com/t/facing-syntax-error-with-custom-action-in-rasa-open-source/47581) can I politely asked why you open this new thread? as you not satisfied with the assistance and suggestion Chris and I gave you on the above thread link?

---

<div class="post-metadata">

**Author:** ![Venkat](https://avatars.discourse-cdn.com/v4/letter/v/4491bb/32.png) [@Venkat](https://forum.rasa.com/u/Venkat)\
**Post date:** [September 10, 2021, 9:35am UTC](https://forum.rasa.com/t/responses-from-custom-actions-not-uttered/47630/4 "2021-09-10T09:35:21Z")

</div>

Hello @nik202 actually this is a different issue , I’m not facing an error , actually my bot dosn’t reply according to the story written

---

<div class="post-metadata">

**Author:** ![Venkat](https://avatars.discourse-cdn.com/v4/letter/v/4491bb/32.png) [@Venkat](https://forum.rasa.com/u/Venkat)\
**Post date:** [September 10, 2021, 9:39am UTC](https://forum.rasa.com/t/responses-from-custom-actions-not-uttered/47630/5 "2021-09-10T09:39:09Z")

</div>

if you see in the screenshot attached below , the response of the bot after the selection of the button it should reply with another set of buttons . I have also attached the stories file for your review . [stories.yml](https://forum.rasa.com/uploads/short-url/3TxhQrjOp4pYx86AOXweVgMkSG1.yml) (841 Bytes)

---

<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:** [September 10, 2021, 9:40am UTC](https://forum.rasa.com/t/responses-from-custom-actions-not-uttered/47630/6 "2021-09-10T09:40:35Z")

</div>

@Venkat I previously suggested you this below solution about same code and again I am sharing you the same.

Class always will be capital

`class AreaOptions(Action):`

Use template rather then response, if new update is enforce you to use response then fine

```auto
dispatcher.utter_message(template= "utter_domestic_packages")
dispatcher.utter_message(template= "utter_international_packages")

```

I hope you had seen this

---

<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:** [September 10, 2021, 9:41am UTC](https://forum.rasa.com/t/responses-from-custom-actions-not-uttered/47630/7 "2021-09-10T09:41:08Z")

</div>

@Venkat there is no attachment?

---

<div class="post-metadata">

**Author:** ![Venkat](https://avatars.discourse-cdn.com/v4/letter/v/4491bb/32.png) [@Venkat](https://forum.rasa.com/u/Venkat)\
**Post date:** [September 10, 2021, 9:41am UTC](https://forum.rasa.com/t/responses-from-custom-actions-not-uttered/47630/8 "2021-09-10T09:41:53Z")

</div>

sorry , this is the screenshot

 ![Screenshot from 2021-09-10 15-06-09](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/9/9/99b19ee9383e3e3441e3c89fdf17f7eab38b23b6.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:** [September 10, 2021, 9:42am UTC](https://forum.rasa.com/t/responses-from-custom-actions-not-uttered/47630/9 "2021-09-10T09:42:31Z")

</div>

@Venkat Please share the `rasa --version`

@Venkat share your domain file for the above screenshot.

---

<div class="post-metadata">

**Author:** ![Venkat](https://avatars.discourse-cdn.com/v4/letter/v/4491bb/32.png) [@Venkat](https://forum.rasa.com/u/Venkat)\
**Post date:** [September 10, 2021, 9:46am UTC](https://forum.rasa.com/t/responses-from-custom-actions-not-uttered/47630/10 "2021-09-10T09:46:41Z")

</div>

Thank you for the help , the above mentioned solution worked .
