Activating different forms based on slot_value for form switching case mentioned on Financial-Bot

I am trying to implement a form-switching case in my project. But I have many forms and writing individual stories for each form switching is hectic. So, I was looking for a way to write a custom action that considers some slot value say next_form_name and then dynamically start the form we got on next_form_name. I think it is possible by something like next_form_name = tracker.get_slot("next_form_name") if next_form_name is not None: return [FollowupAction(next_form_name)]

But issue is how can i set active_loop part based on this same form value as we need to set active loop based on the form being activated? Is it possible to set active_loop via custom action?

Or is there any other recommended way to do form-switching without having to write stories for individual case?

For switching which slots are required there is dynamic form behavior in place. Take a look at Forms.

Good luck!

There is every time same error found in value for form switching. can you give me some proper way to solve this error…

Thanks, Next Employee Portal App

Firstly, you must add the name of this action, action_validate_slot_mappings , to the domain actions list. Note that you do not need to implement the name method in the custom action extending ValidationAction , since this is already implemented.

Thanks @willium6583 your suggestion is work for me. i got my solution once again thanks,

Works like a charm!