As soon as you select "Sales" department the Tiledesk chatbot doesn't find a suitable intent, so it moves to the defaultFallback intent. This intent is connected to the webhook on the replit backend. The defaultFallback on the backend will use the user's sentence as a department name to search from those available - tdclient.getAllDepartments(). If it finds one department with matching name, using orchestration APIs - tdclient.updateRequestDepartment() - it will move the conversation to the corresponding found department.