Navigation logic in slot filling for forms

Hi Team,

I am required to build navigation logic into forms. For example, user could have filled 4 slots out of 5 slots and can decide to go back and amend the values or re-enter values and also at the end of the form filling activity, i want to display a summary of whatever user has entered and in this phase a user can decide to amend any value in which case I have to re-ask for the slot. How can I achieve this?

Thanks in advance…

@lokkrish At the moment, Rasa doesn’t support slot value updates within or outside forms out-of-the-box, therefore you might have to experiment by using custom actions to achieve this, i.e., manually set slots by having the custom action return a SlotSet event. You can access the intent, entities and text of the latest message via the tracker (more info here).

@anca I want to handle all the possible actions while the form is active. Can i trigger custom actions and trigger intent manually based on slot values while the form being still active?

@lokkrish Yes you can handle unhappy paths in forms and trigger a custom action (an example of such a rule is here) while the form is active. You could have an intent update_{slot_name} for each slot that could trigger the corresponding custom action if the user wants to go back. Let me know if that works!

@anca I am using a cheat here, I am using a slot to capture field names which user wants to edit and then by using the validate method, i set all the slots which user wants to re-enter to None so that they are reasked