Finish the FormAction prematurely

Hello, is it possible to finish a custom FormAction prematurely, before all slots are filled? For example, forms require a few slots to finish an order, but for legal reasons, it must ask, if user is older than 18.

As per documentation, it is simple to dispatch correct utterance, to inform user, that services is only available for certain age, but I did not found a way to terminate the rest of the form after that, after dispatching the message, it continues to ask for the rest of the slots.

Thanks & Cheers !

they are two approaches to solve this:

  1. in the required_slots() check if age under 18 return an empty list so the form will have no more required slots to fill and finish
  2. in the validate() function … check the value of age and if under 18 fill all slots buy some values you want so the form will have no more NONE required slots to fill

i am recommending the first approach

1 Like

OOoh I didn’t thought, that required_slots() could be used that way, it sounds dope! Thanks alot!