Slot_was_set RASA not working as expected

Hello I’m having an issue with rasa slot_was_set in stories. I would want it to work such that if the in_university slot has been filled with true then a university form is trigger other wise if false the form is skipped and the next action is triggered. Find my two stories below,

- story: depression path story 1 
  steps:
  - intent: greet
  - action: name_form
  - active_loop: name_form
  - active_loop: null
  - action: age_form
  - active_loop: age_form
  - active_loop: null
  - action: utter_ask_in_university
  - intent: answer
    entities:
    - in_university
  - slot_was_set:
    - in_university: 'True'
  - action: university_form
  - active_loop: university_form
  - active_loop: null
  - action: utter_therapy
  - intent: affirm
  - action: utter_priv_policy
  - intent: affirm
  - action: utter_acc_priv_policy
  - intent: affirm
  - action: utter_begin
  - intent: affirm
  - action: action_check_time
  - action: utter_wonder
  - intent: feel
  - action: utter_why_down
  - intent: feel
  - action: utter_motivate
  - or:
    - intent: inform
    - intent: affirm
  - action: utter_ask_dprs
  - intent: affirm
  - action: utter_cfrm_dprs
  - action: couns_dtls_form
  - active_loop: couns_dtls_form
  - active_loop: null
  - action: utter_opened_up

Story 2

- story: depression path story 2
  steps:
  - intent: greet
  - action: name_form
  - active_loop: name_form
  - active_loop: null
  - action: age_form
  - active_loop: age_form
  - active_loop: null
  - action: utter_ask_in_university
  - intent: answer
    entities:
    - in_university
  - slot_was_set:
    - in_university: 'False'
  - action: utter_therapy
  - intent: affirm
  - action: utter_priv_policy
  - intent: affirm
  - action: utter_acc_priv_policy
  - intent: affirm
  - action: utter_begin
  - intent: affirm
  - action: action_check_time
  - action: utter_wonder
  - intent: feel
  - action: utter_why_down
  - intent: feel
  - action: utter_motivate
  - or:
    - intent: inform
    - intent: affirm
  - action: utter_ask_dprs
  - intent: affirm
  - action: utter_cfrm_dprs
  - action: couns_dtls_form
  - active_loop: couns_dtls_form
  - active_loop: null
  - action: utter_opened_up

Given that you have a condition that you want to be fulfilled to do something else, I’d write these are rules rather than stories. More details on how to do that here: Rules

1 Like