How to define utter_slots_values for 2 different forms

Hi there,

I have 2 different forms that are just slightly different (i.e. the second form has an additional slot that asks for “test_date”). And so, I created two different utterances in the domain file:

utter_slots_values:

  - text: "Here's the information I've saved:\n - Surname: {surname}\n - Name: {name}\n... 

utter_slots_values_positive:

  - text: "Done! Here's the information I've saved:\n - Test Date: {test_date}\n - Surname: {surname}\n - Name: {name}\n... 

However, I get this error:

Is there a specific way of submitting these two forms? Here’s the rule I created for submitting each form:

- rule: submit PUI form

  condition:

  - active_loop: PUI_form

  steps:

    - action: PUI_form

    - active_loop: null

    - action: utter_submit

    - action: utter_slots_values

    - action: utter_confirm_info


- rule: submit positive form

  condition:

  - active_loop: positive_form

  steps:

    - action: positive_form

    - active_loop: null

    - action: utter_submit

    - action: utter_slots_values_positive

    - action: utter_confirm_info

Hi @chiqui_hm :smiley:. It seens that you also declared on stories.yml file. That’s why that error. Consider removing from stories.yml what contains on rules.yml. It should look like this:

On stories.yml:

- story: first form
  steps:
  - intent: greet
  - action: utter_greet
  - action: utter_begin_your_form
  - intent: affirm
  - action: PUI_form
  - active_loop: PUI_form

Your form will be actived on stories, rules will check its active and then run what you coded on rules.yml.

- rule: submit PUI form
  condition:
  - active_loop: PUI_form

  steps:
    - action: PUI_form
    - active_loop: null
    - action: utter_submit
    - action: utter_slots_values
    - action: utter_confirm_info

That’s an idea. Or you can declare your form just on your stories, you choose.

But, if you create a rule to a conversation path, you do not have to repeat on stories because it will contradicts. Hope it help you :smiley: