I guess you would have to write your own plugin for that. You can use the Signal class of osTicket which enables you to run your own function on certain events. For example, if you want to run a function when a ticket gets created, you could hook into that with something like:
Signal::connect('ticket.create.validated', function($null, $vars){
// do something
});
Since there is no documentation - afaik - on how to write a plugin, you would need to reverse engineer it. Have a look at include/class.ticket.php to check what signals are available. And look at some available Plugins on how to start,