i require assistance on how to create a custom script that checks the default department for new tickets and then checks the assigned help topic on the new tickets. based on the help topics, it should automatically transfer the ticket to the corresponding department (mapping will be configured in the script).
i would like a starting point to begin creating a custom script.
context - we are creating new tickets from a website form using the osticket API. this creates new tickets in the default department and assigns a help topic to the ticket based on the option chosen on the website form. the requirement is for a script to check new ticket and transfer them to corresponding department based on the current help topic without agent internvention.