Rasa custom form action in rasa 2.x?

I have my last bot to be migrated to Rasa 2.2, and that seem to be too tricky for me, so ask support from community.
Bot has 22 yes/no questions and and it stores answers and after answered to all questions, it lists, back to user, those answers where user has replied “No” with link to additional material. I use custom functions for these.

I can make the questions easily with new form functionality in Rasa 2.0 but for other functionality I (think I) need custom functions in action server but don’t know how to get it working.

Here is my rasa 1.10.1setup, all run in docker containers.

action.py

from typing import Any, Text, Dict, List, Union

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

class KyselyForm(FormAction):

    def name(self):
        return "kysely_form"

    @staticmethod
    def required_slots(tracker):

        return ["kysymys01", "kysymys02", "kysymys03", "kysymys04", "kysymys05", "kysymys06", "kysymys07", "kysymys08", "kysymys09", "kysymys10", "kysymys11", "kysymys12", "kysymys13", "kysymys14", "kysymys15", "kysymys16", "kysymys17", "kysymys18", "kysymys19", "kysymys20", "kysymys21", "kysymys22"]

    def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]:
        return {
           "kysymys01": [
                self.from_intent(intent="juu_vastaus",  value=True),
                self.from_intent(intent="ei_vastaus",  value=False),
           ],
                        "kysymys02": [
                                self.from_intent(intent="juu_vastaus",  value=True),
                                self.from_intent(intent="ei_vastaus",  value=False),
                        ],
                        "kysymys03": [
                                self.from_intent(intent="juu_vastaus",  value=True),
                                self.from_intent(intent="ei_vastaus",  value=False),
                        ],
                        "kysymys04": [
                                self.from_intent(intent="juu_vastaus",  value=True),
                                self.from_intent(intent="ei_vastaus",  value=False),
                        ],
                        "kysymys05": [
                                self.from_intent(intent="juu_vastaus",  value=True),
                                self.from_intent(intent="ei_vastaus",  value=False),
                        ],
                        "kysymys06": [
                                self.from_intent(intent="juu_vastaus",  value=True),
                                self.from_intent(intent="ei_vastaus",  value=False),
                        ],
                        "kysymys07": [
                                self.from_intent(intent="juu_vastaus",  value=True),
                                self.from_intent(intent="ei_vastaus",  value=False),
                        ],
                        "kysymys08": [
                                self.from_intent(intent="juu_vastaus",  value=True),
                                self.from_intent(intent="ei_vastaus",  value=False),
                        ],
                        "kysymys09": [
                                self.from_intent(intent="juu_vastaus",  value=True),
                                self.from_intent(intent="ei_vastaus",  value=False),
                        ],
                        "kysymys10": [
                                self.from_intent(intent="juu_vastaus",  value=True),
                                self.from_intent(intent="ei_vastaus",  value=False),
                        ],
                        "kysymys11": [
                                self.from_intent(intent="juu_vastaus",  value=True),
                                self.from_intent(intent="ei_vastaus",  value=False),
                        ],
                        "kysymys12": [
                                self.from_intent(intent="juu_vastaus",  value=True),
                                self.from_intent(intent="ei_vastaus",  value=False),
                        ],
                        "kysymys13": [
                                self.from_intent(intent="juu_vastaus",  value=True),
                                self.from_intent(intent="ei_vastaus",  value=False),
                        ],
                        "kysymys14": [
                                self.from_intent(intent="juu_vastaus",  value=True),
                                self.from_intent(intent="ei_vastaus",  value=False),
                        ],
                        "kysymys15": [
                                self.from_intent(intent="juu_vastaus",  value=True),
                                self.from_intent(intent="ei_vastaus",  value=False),
                        ],
                        "kysymys16": [
                                self.from_intent(intent="juu_vastaus",  value=True),
                                self.from_intent(intent="ei_vastaus",  value=False),
                        ],
                        "kysymys17": [
                                self.from_intent(intent="juu_vastaus",  value=True),
                                self.from_intent(intent="ei_vastaus",  value=False),
                        ],
                        "kysymys18": [
                                self.from_intent(intent="juu_vastaus",  value=True),
                                self.from_intent(intent="ei_vastaus",  value=False),
                        ],
                        "kysymys19": [
                                self.from_intent(intent="juu_vastaus",  value=True),
                                self.from_intent(intent="ei_vastaus",  value=False),
                        ],
                        "kysymys20": [
                                self.from_intent(intent="juu_vastaus",  value=True),
                                self.from_intent(intent="ei_vastaus",  value=False),
                        ],
                        "kysymys21": [
                                self.from_intent(intent="juu_vastaus",  value=True),
                                self.from_intent(intent="ei_vastaus",  value=False),
                        ],
                        "kysymys22": [
                                self.from_intent(intent="juu_vastaus",  value=True),
                                self.from_intent(intent="ei_vastaus",  value=False),
                        ],
                }

    def submit(
        self,
        dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: Dict[Text, Any],
    ) -> List[Dict]:

        dispatcher.utter_message("Kiitos! Olet vastannut kaikkiin kysymyksiin. Alla linkit kohtiin joihin vastasit ei/en osaa")

        if tracker.get_slot("kysymys01") == False:
            dispatcher.utter_message("www.oppialiasaa1.com")
        if tracker.get_slot("kysymys02") == False:
            dispatcher.utter_message("www.oppialiasaa2.com")
        if tracker.get_slot("kysymys03") == False:
            dispatcher.utter_message("www.oppialiasaa3.com")
        if tracker.get_slot("kysymys04") == False:
            dispatcher.utter_message("www.oppialiasaa5.com")
        if tracker.get_slot("kysymys05") == False:
            dispatcher.utter_message("www.oppialiasaa5.com")
        if tracker.get_slot("kysymys06") == False:
            dispatcher.utter_message("www.oppialiasaa6.com")
        if tracker.get_slot("kysymys07") == False:
            dispatcher.utter_message("www.oppialiasaa7.com")
        if tracker.get_slot("kysymys08") == False:
            dispatcher.utter_message("www.oppialiasaa8.com")
        if tracker.get_slot("kysymys09") == False:
            dispatcher.utter_message("www.oppialiasaa9.com")
        if tracker.get_slot("kysymys10") == False:
            dispatcher.utter_message("www.oppialiasaa10.com")
        if tracker.get_slot("kysymys11") == False:
            dispatcher.utter_message("www.oppialiasaa11.com")
        if tracker.get_slot("kysymys12") == False:
            dispatcher.utter_message("www.oppialiasaa12.com")
        if tracker.get_slot("kysymys13") == False:
            dispatcher.utter_message("www.oppialiasaa13.com")
        if tracker.get_slot("kysymys14") == False:
            dispatcher.utter_message("www.oppialiasaa14.com")
        if tracker.get_slot("kysymys15") == False:
            dispatcher.utter_message("www.oppialiasaa15.com")
        if tracker.get_slot("kysymys16") == False:
            dispatcher.utter_message("www.oppialiasaa16.com")
        if tracker.get_slot("kysymys17") == False:
            dispatcher.utter_message("www.oppialiasaa17.com")
        if tracker.get_slot("kysymys18") == False:
            dispatcher.utter_message("www.oppialiasaa19.com")
        if tracker.get_slot("kysymys19") == False:
            dispatcher.utter_message("www.oppialiasaa19.com")
        if tracker.get_slot("kysymys20") == False:
            dispatcher.utter_message("www.oppialiasaa20.com")
        if tracker.get_slot("kysymys21") == False:
            dispatcher.utter_message("www.oppialiasaa21.com")
        if tracker.get_slot("kysymys22") == False:
            dispatcher.utter_message("http://www.oppialiasaa22.com")



        dispatcher.utter_message("")
        dispatcher.utter_message("Tässä kaikki tällä kertaa")
        return []

Hi @InnoOmnia you can find a comprehensive migration guide from 1.10 to 2.0 here. Hope this helps!