How can I call a check point from custom action?


I need to call intent from a custom action? As I understand I need to trigger a check point, am I right?

from typing import Any, Dict, List, Text

from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher

class CustomAction(Action):
    def name(self) -> Text:
        return "custom_action"

    def run(self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
        print(">>> Custom action was called")

        dispatcher.utter_message("Hi from custom action")

        return []  # TODO: as I understand I need to call a check point or call direct an intent at here 

Best regards, Alex

I’m not quite sure if I understand what you wanna do… Why would you want your Custom Action to “call” an intent? An intent is something that the USER utters.

If you want some other action to happen right after your custom action, why not just create a story that does that?

I want to switch manual between actions by checkpoints, because Rasa is so clever and can switch between actions on her choice, but I need custom strict rules for switching

Maybe you have a short example so people could better understand what you’re trying to say? If you want hardcoded logic for your chatbot’s actions, you should use rules.


I have many intent (e.g. choice_1_1, choice_1_2, …; choice_2_1, choice_2_2; …; choice_n_1). NLU can take miss way at switching from choice_2_1 to choice_2_n, thats why I need to have an opportunity to switch directly between. What is a best way to solve my task? As I understand I can switch directly by a checkpoint.

PS: I can’t use strict rules (I mean use stories), because sometimes I need to switch from choice_1_2 to choice_1_6

Best regards