Trigger a intent on a custom action

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?

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

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])]