Best way to provide a form once a slot is filled

I would like to develop a bot which has a number of forms that are triggered once a slot form_id is filled. I am not sure if I’m doing it the right way so I would like some feedback.

The user fills the slot form_id with a message of intent: request_form. The filled slot is used in story (or is a rule better in this case?) of the type:

- story: form 1 happy path
  steps:
  - slot_was_set:
    - form_id: 1
  - action: 1_form
...

would this solution be good for handling an assistant with around 80 forms?

Thanks a lot!

Hi @laujen,

You may find using rules more robust for this use case. See the following example:


rules:

- rule: Activate form 1 only if form_id is set to 1
  condition:
  - slot_was_set:
    - form_id: 1
  steps:
  - intent: start_form
  - action: 1_form
  - active_loop: 1_form

For reference: Rules

thanks a lot @kearnsw