Is it possible to have a checkpoint and a action_restart or reset slots action together inside a story path?

I am working with Forms, and I would like to do the following:

  • Once the Form is complete, I would like to ask the user if they would like to run another query on the form again. If the user affirms, the form is restarted (or the slots could be reset, whichever is possible).
  • If the user denies, the form does not start again and the user gets an utter_goodbye, for example.

What do I know and what have I tried so far?

  • I found that the default action_restart is only possible to be put at the end of a story path. Does this hold true for all scenarios?
  • I am aware of writing a custom action to reset slots using SetSlot() but I do not prefer it because if I have a lot of slots to be filled, I will have to write them down within the return list. Is there any other easier way - perhaps an action to get all the slots from the form so far and reset them all together? This would be helpful.
  • Finally, perhaps a stupid but essential (for my understanding) question: I tried to have a checkpoint and an action_restart together inside a single story path and did not achieve it at all. So for example, inside a story, at the end:
- checkpoint: utter_result
- action: action_restart

Is this not possible?

I apologize for the lengthy questions but I would appreciate if anyone would be able to clarify my doubts and help me with my task.

Thank you and have a good day!

  • I found that the default action_restart is only possible to be put at the end of a story path. Does this hold true for all scenarios?

Yes, since action_restart clears the tracker you no longer have any conversation history. You’re starting a new session at that point.

FYI, in general, use of checkpoints is discouraged.