Dialog commands can utilize specialized command mechanics, and you can read more about them here

Example of dialog windows. Keep in mind that you can have multiple files and multiple Dialogs inside each file for better organization

welcome:
  Enabled: true
  Label: '{#white}Welcome {#gray}%cmi_user_display_name% {#white}to {#edward}%cmi_user_world_formatted%'
  Description:
    Width: 300
    Lines: 
    - '{#green}Best minecraft server on earth!'
    - ''
    - '{#white}We are glad to have you here %cmi_user_display_name%{#white}!'
    - 'If you have any questions, feel free to ask our staff'
  Buttons:
    Columns: 3 
    List:
    - Label: '{#red}Read The Rules' 
      Width: 100
      OpenDialog: rules
    - Label: '{#green>}Read a joke{#darkgreen<}'
      Width: 100
      OpenDialog: 'randomtext'
    - Label: '{#edward>}Start Playing{#darkgreen<}'
      Width: 100
      Commands: 'closeinv!'
    - Label: '{#blue}Join our Discord'
      Width: 100
      Commands: 'cmi heal [playerName]'
    - Label: ''
      Width: 1
    - Label: '{#yellow}Visit Google'
      Width: 100
      Url: www.google.com
    - Label: '{#yellow}Visit Our Website %cmi_user_display_name%'
      Width: 304
      Url: www.zrips.net
  Close:
    Label: 'Go Away!'  
    Commands: 
    - 'cmi feed [playerName]'
    Width: 150
rules:
  Enabled: true
  Description:
    Width: 300
    Lines: 
    - '{#white}1. {#green}No griefing'
    - '{#white}2. {#green}No harassment or hate speech'
    - '{#white}3. {#green}No cheating or hacked clients'
    - '{#white}4. {#green}Respect staff and players'
    - '{#white}5. {#green}No spamming or advertising'
    - '{#white}6. {#green}No stealing from other players'
    - '{#white}7. {#green}No exploiting bugs or glitches'
    - '{#white}8. {#green}Keep builds appropriate and safe for all ages'
    - '{#white}9. {#green}No impersonating staff or other players'
    - '{#white}10. {#green}Use English in public chat'
  Close:
    Label: 'Back'
    OpenDialog: 'welcome'
    Width: 150
randomtext:
  Enabled: true
  Description:
    Randomize: true
    Lines: 
    - "{#yellow}Why did the creeper break up with the skeleton?\n\n{#green}Because he felt blown away!"
    - "{#yellow}Why don't Endermen like jokes?\n\n{#green}They can't take things lightly!"
    - '{#yellow}Why did Steve get lost?\n\n{#green}He didn’t follow the chunky breadcrumbs!'
    - '{#yellow}How does a Minecraft player avoid sunburn?\n\n{#green}Stay in the shade biome!'
    - '{#yellow}Why was the Minecraft player a great musician?\n\n{#green}He had perfect block timing!'
    - '{#yellow}Why did the chicken cross the Nether?\n\n{#green}To get to the other biome!'
    - '{#yellow}How do you start a party in Minecraft?\n\n{#green}You block the creepers!'
    - '{#yellow}Why was the villager so good at trading?\n\n{#green}Because he had emerald standards!'
    - '{#yellow}What do you call a Minecraft celebration?\n\n{#green}A block party!'
    - '{#yellow}What’s a skeleton’s least favorite room?\n\n{#green}The living room!'
  Close:
    Label: 'Back'
    OpenDialog: 'welcome'
    Width: 150

Each dialog setup starts with its name which will be used in a command or when opening this dialog from another dialog
Enabled: Will define if this dialog should be enabled, when its set to false then only players with access to cmi.command.dialogs.disabled will be able to see it
Label: Will define top text of Dialog window, this can contain placeholders which will be translated based on the player who is looking at this window
Description:
    Width: defines description width, default value is 250, if text can’t fit inside defined width then it will be wrapped to new line
    Lines: one or multiple text lines defining description. Can contain placeholders
    Randomize: when enabled we will pick one random input from provided lines
Buttons:
    Columns:
defines how many columns of buttons we should have, by default it will be 1
    List: list of buttons in defined order, keep in mind that buttons will be placed in exact order and amount per line will be always the fixed one based on previous Columns option. Only last buttons get centered if their amount is lower
        Label: label of button, can contain placeholders
        Width: button width, no less than 1, defaults to 250 if not set
        Commands: one or multiple commands to be performed when clicking this button. Specialized commands supported. To use players name inside command you can utilize [playerName] variable
        OpenDialog: alternative option to commands which can open different dialog from this one
        Url: alternative option to commands, opens provided URL link
Close: optional field to create close button, utilizes same options as general buttons, if not provided then there wont be a close button, but you can always close Dialog window by pressing ESC key on your keyboard. Recommended to keep this one present. Keep in mind that action from Close button will be performed when you press ESC on your keyboard