You may dynamically route customers to a specific department by using Visitor triggers
For example you would like to route customers to "Help desk" department if the question "Do you have an existing account?" used in pre-chat window is answered "Yes". You would need to configure a visitor trigger similar to the screenshot below:
Similar trigger may be created for language selection in pre-chat window such as "Please select your preferred language" drop down list shown in pre-chat window would dynamically route to a specific department based on logic in a visitor trigger.