How to use categorical slots in rasa 3.1 version? (Syntax)

Actually I am creating a form which has 7 slots in it namely : customer name , partner name , license type , max users , max developers and project name . For lic_type and version I need to fill the slot values by using categorical slots and also by providing buttons to the users to select from the give options.

version:

  • 9x version
  • 10x version
  • 10.9 and above version

lic_type:

  • User license
  • Developer license

Please guide me how to use categorical slots and provide buttons for it. Please give an ellaborated example with all files included : nlu , domain , actions , stories , rules. If not please find me another solution with elaborated explanation.

There’s a common confusion about categorical slots. This is used for model featurization, not data typing and there is no built-in response validation. You probably want to use a text type in your example.

Please thourougly read about how to use forms and follow the examples there. Use rules to enter and submit the form (not stories).

For the version slot with buttons, you would have something like this.

entities:
  - version

slots:
  version:
    type: text
    influence_conversation: false
    mappings:
    - type: from_entity
      entity: version

responses:
  utter_ask_version:
  - text: "What version?"
    buttons:
    - title: "9x version"
      payload: "9x version"
    - title: "10x version"
      payload: "10x version"
    - title: "10.9x version"
      payload: "10.9x version"

Thank you so much , it worked :grinning: