Slot_was_set is needed to check categorical slot type?

stories:
- story: train booking for first class 
  steps:
  - intent: train_booking
    entities:
     - train_class: first class
  - slot_was_set:
    - train_class:  first class
  - action: action_check_ticket_availability
  - slot_was_set:
    - ticket_availability: True
  - action: utter_ask_confirmation

slots:
  train_class:
    type: categorical
    values:
      - "first class"
      - "second class"
      - "third class"
     - "general"

my question is, I want to perform same action for multiple entity values, which leads to writing lot of duplicate stories with different entity values. for both “first_class” and “second_class” I want to perform same action and for “third class” and general" I want to perform other action. can I skip checking

  • slot_was_set: - train_class: first class slot values are by default checked against list of categorical values specified in domain file? again do we need to perform slot_was_set conditions in story after entity detected? in the story, so my story be like

    • story: train booking for first class and second class steps:
      • or:
        • intent: train_booking entities:
          • train_class: first class
        • intent: buy entities:
          • train_class: second class
          • person_name: John
      • action: action_check_ticket_availability
      • slot_was_set:
        • ticket_availability: True
      • action: utter_ask_confirmation

@radhika you do need the slot_was_set event, but try setting influence_conversation: false for your categorical slot. That way, you can just write a single story to cover your different cases.

Note, it’s still correct syntax to provide the slot value that’s being set. But the first story you list will be sufficient for all of your train class cases.