Conditional Slot Logic in RASA 2.0

Hey everybody,

I cannot seem to find a good example on how to handle conditional slot logic when it comes to RASA 2.0.

How would I convert the below from RASA 1.X to RASA 2.0?

def required_slots(tracker: Tracker) -> List[Text]:
    """A list of required slots that the form has to fill."""

    if (tracker.get_slot("box_damaged_slot") is False and tracker.get_slot("product_damaged_slot") is False) or (
            tracker.get_slot("box_damaged_slot") is True and tracker.get_slot("product_damaged_slot") is False):
        return ["box_damaged_slot", "product_damaged_slot"]
    else:
        if tracker.get_slot("multiple_product_slot") is False:
            if tracker.get_slot("return_product_slot") is False:
                return ["box_damaged_slot", "product_damaged_slot",
                        "multiple_product_slot",
                        "value_product_slot", "return_product_slot"]
            else:
                return ["box_damaged_slot", "product_damaged_slot",
                        "multiple_product_slot",
                        "value_product_slot", "return_product_slot",
                        "product_or_money_slot"]
        else:
            if tracker.get_slot("return_product_slot") is False:
                return ["box_damaged_slot", "product_damaged_slot",
                        "multiple_product_slot", "products_damaged_slot",
                        "value_product_slot", "return_product_slot"]
            else:
                return ["box_damaged_slot", "product_damaged_slot",
                        "multiple_product_slot", "products_damaged_slot",
                        "value_product_slot", "return_product_slot",
                        "product_or_money_slot"]

Can someone guide me in the right direction, I thank you in advance!

Fabrice :slight_smile:

The solution can be found here: Issue with handling conditional slot logic and validations in the same action in Rasa 2.0.