I’m trying to create a form to set an appointment where the user is prompted to confirm the appointment once the
time slots are filled.
This is my form in the
appointment_form: appointment_type: - type: from_text entity: appointment_type intent: inform time: - type: from_text entity: time intent: inform
then I added two stories, one for the happy path and one for the unhappy path in which the user doesn’t confirm. I’ve done this through stories as I want to use custom actions at different points:
- story: new appointment happy path steps: - active_loop: appointment_form - slot_was_set: - appointment_type: mri - slot_was_set: - time: "2020-11-11T12:00:00.000-08:00" - action: validate_appointment_form - intent: affirm - action: save_appointment_to_db - story: new appointment unhappy path 0 steps: - active_loop: appointment_form - slot_was_set: - appointment_type: mri - slot_was_set: - time: "2020-11-11T12:00:00.000-08:00" - action: validate_appointment_form - intent: deny - action: clear_appointment_form
I think the two stories are conflicting as if I have a custom action
clear_appointment_form at the end of the unhappy story, neither of the two stories works (the custom action only prints a message to the user for now). However if I have
- action: utter_greet instead of the action aat the end of the story the two work as expected.
What am I doing wrong? Are happy paths for forms something that was deprecated or is this the correct way of using a form happy path?