If I’m understanding your problem, you’ll set this up in the actions.py file.
Inside your ApplyLeaveForm class look for (or add) the required_slots method.
You’ll want to do something like this (most of this is a guess because I don’t know what your utterances or actions, or templates are called)
def required_slots(tracker: Tracker) -> List[Text]:
requiredSlot = ["reference",.... other slots on your form ]
return requiredSlot
in your domain.ymp file you’ll want to setup entities,slots, templates and actions all for that “reference” field you want the bot to ask for and collect
entities:
- reference
slots:
- reference
templates:
utter_ask_reference:
- text: "Whatever you want to ask the user for reference"
actions:
- utter_ask_reference
So basically you tell your form action which of the slots you have are required. And you setup those 4 entries in domain.yml. Retrain the bot and it should work. (I hope)
If not, post your actions.py and domain.yml file and I’ll take a look.
I believe in the required_slots, you should be returning a list of slot names rather than action names. In this example, [“reference”] rather than [“utter_ask_reference”,… other slots on your form ].
I think the answer is found in the docs here:
Every time the form action gets called, it will ask the user for the next slot in required_slots which is not already set. It does this by looking for a response called utter_ask_{slot_name} , so you need to define these in your domain file for each required slot.