# Trigger a intent on a custom action

**URL:** <https://forum.rasa.com/t/trigger-a-intent-on-a-custom-action/14298>\
**Category:** Rasa Open Source\
**Created:** [August 13, 2019, 4:43pm UTC](https://forum.rasa.com/t/trigger-a-intent-on-a-custom-action/14298 "2019-08-13T16:43:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgcostaParedes](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mgcostaparedes/32/2868_2.png) [@mgcostaParedes](https://forum.rasa.com/u/mgcostaParedes)\
**Post date:** [August 13, 2019, 4:43pm UTC](https://forum.rasa.com/t/trigger-a-intent-on-a-custom-action/14298/1 "2019-08-13T16:43:51Z")

</div>

Hello people, iam having some trouble on triggering an intent inside an action:

I am trying something like `Return[UserUttered(name='action_utter_balance_client')]` but it does nothing, can somebody help?

---

<div class="post-metadata">

**Author:** ![tyd](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tyd/32/3030_2.png) [@tyd](https://forum.rasa.com/u/tyd)\
**Post date:** [August 14, 2019, 8:28am UTC](https://forum.rasa.com/t/trigger-a-intent-on-a-custom-action/14298/2 "2019-08-14T08:28:08Z")

</div>

Hi @mgcostaParedes! Why do you want to trigger an intent inside of an action?

---

<div class="post-metadata">

**Author:** ![mgcostaParedes](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/mgcostaparedes/32/2868_2.png) [@mgcostaParedes](https://forum.rasa.com/u/mgcostaParedes)\
**Post date:** [August 14, 2019, 8:52am UTC](https://forum.rasa.com/t/trigger-a-intent-on-a-custom-action/14298/3 "2019-08-14T08:52:20Z")

</div>

Hi! Because i have an story like that:

## get\_balance\_client #5

- check\_balance\_client{“client”: “Garagem Peixoto Lda”}
  - balance\_client\_form
  - form{“name”: “balance\_client\_form”}
  - form{“name”: null}
  - slot{“client”: “laskasas”}
  - utter\_let\_me\_search\_client
  - action\_get\_balance\_client
  - slot{“clientsList”: []}

## dispatch balance client

- dispatch\_balance\_client{“clientNum”: “10012”}
  - action\_utter\_balance\_client
  - utter\_balance

and then my action `action_get_balance_client` will be dynamic and willl request in one of instances for further intent by an button click of example:

```
class ActionCheckBalanceClient(Action):
def name(self) -> Text:
   return "action_get_balance_client"

def run(self,
        dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
     
   ## verify if has auth token
   auth_token = tracker.get_slot('auth_token')
   client = tracker.get_slot('client')

   ## make request
   response = api.FoxApi().lookupEntity(auth_token, client)

   if(len(response) == 0): # if didnt recognized the name of entity
       print("dff")
   elif (len(response) == 1):
        clientNum = str(response[0]['num_thirdParty'])
        clientName = response[0]['name']

        # would need to trigger an intent here !!!!! 

        return [SlotSet("clientsList", response), SlotSet("clientNum", clientNum)]
   else:
        buttons = []
        for client in response[:5]:
            buttons.append({"title":client['name'], "payload":"/dispatch_balance_client{\"clientNum\":\"" + str(client['num_thirdParty']) + "\"}"})
        
        dispatcher.utter_button_message("Encontrei varias empresas parecidas..", buttons)

        return [SlotSet("clientsList", response[:5])]
```
