New form rules

Question 1: Do I need to add the same rule for every form I have?

This is what I have for one of my forms: Should I just repeat the code below for all my different forms?

- rule: Activate email form
    steps:
    - intent: lookup_mail_server
    - action: email_form
    - active_loop: email_form

- rule: Submit email form
    condition:
    # Condition that form is active.
    - active_loop: email_form
    steps:
    - action: email_form
    - active_loop: null

Question 2: What happens if multiple intents trigger the same form? Do I create a separate rule for each one or can multiple intents be specified for single form rule? For example:

- rule: Activate email form
    steps:
    - intent: lookup_mail_server, get_mail_address
    - action: email_form
    - active_loop: email_form

@tatianaf Thanks for the detailed questions! Question 1: Yes, you can have the following stories for all your forms. Questions 2: You can use the OR statement to specify multiple intents. For example -

- rule: Activate email form
    steps:
    - intent: lookup_mail_server OR get_mail_address
    - action: email_form
    - active_loop: email_form

Lmk if you run into any problems!

Now im getting this error: UserWarning: Intent ‘lookup_mail_server or get_mail_address’ has only 1 training examples! Minimum is 2, training may fail.

Is this considered an “or statement” as mentioned here in the docs Stories? because we are avoiding using “or statements” as advised by the docs…

1 Like

up :wave: