Nested slots

Can i have slots which can automatically fill other slots? This may sound confusing so here is an example with 2 categorical slots.

  - abc
  - def
  - abc123
  - abc456
  - def132
  - def456

If i set slot2 to def456, can i set slot1 to def? I dont want to use the return method for SlotSet because i have lots of stories and lot more values per slot…

Hm, don’t think so – what is your use case for this?

Departments and list of items per department. If the user wants to talk about a particular item, then i should also keep the department that the item belongs to.

I think the best way would be to have one custom action that extracts the department from the item. So after your stories you would add an action like action_get_department which would basically have a dictionary of all the different items in the different departments, do a look up, and return the department slot. You wouldn’t have to write any extra stories or actions for the different departments, unless you want to change the dialogue based on the departnment (in which case you’d need multiple stories but not multiple actions).

If you decided to turn this flow into a form, you could indeed auto-populate the department slot during a validate_item function you’ve written for the form.