What's the recommend rules to define slots and intents priority (in condition)

OS: Win 10
Rasa version: 2.8
Python version: 3.7
Rasa X, Rasa SDK: Not using

Hi guys,
Recently I’m struggling to define the priority of slots and intent.

Assume we have 1 intent: happy and 1 slot: user_id (text slot).
How do I create a rule (or story) to fulfill all three paths (path1,2 &3) at the same time ?

# Path1:
  - User: I'm happy<br/>
  - Bot: What's your user_id?<br/>
  - User:9527<br/>
  - Bot: Hi 9527, glad to see you are happy<br/>
<br/>
# Path2:
  - User:9527<br/>
  - Bot: What's your mood?<br/>
  - User:I'm happy<br/>
  - Bot: Hi 9527, glad to see you are happy<br/>

# Path3:
  - User:I'm happy 9527<br/>
  - Bot: Hi 9527, glad to see you are happy<br/>

So I tried:

# rules.yml:
- rule: happy <br/>
  steps:
  - intent: happy
  - action: utter_happy

- rule: activate_user_id_form <br/>
  steps:
  - intent: happy
  - slot_was_set:
    - user_id: true
  - action: user_id_form
  - active_loop: user_id_form

# domain.yml
- forms:
  - user_id_form:
    - required_slots:
      user_id:
      - entity: USERID
      - type: from_entity

But Path2 is not working, please help me. Thanks in advance !

I’d suggest writing stories for this, using Interactive Learning

@ChrisRahme thank you, the Interactive Learning is very useful.

1 Like

@ChrisRahme Thanks for helping! This is helpful for what I am doing.

1 Like