Script Events and Contexts
todo4teams can be configured and expanded in various places using scripts. For example, email mailboxes, message boxes, forms and teams can be expanded with scripts. These scripts are written in JavaScript and can in principle access all Java objects of todo4teams.
Events and contexts
todo4teams triggers the execution of scripts at specified events. For example, the first event in the life cycle of a ticket at which a script can run is the sending of the ticket after it has been created.
Scripts are attached either to teams or to forms. The figure shows the events to which scripts can be linked, including their context. The red arrows show the process from the creation of the ticket through its acceptance to its completion.
When a new ticket is sent, the "Send Action" scripts of all selected forms are first executed. Here, for example, the form entries can be checked for completeness and the user can be asked to add or correct something. The script of the "Send Action" of the addressed team is then executed. Here, for example, it could be specified that a certain form must be activated and filled out when tickets are addressed to this team.
As soon as the user has pressed send and all of the above scripts have been executed, the ticket is saved and the "Start Action" script of the addressed team is executed.
By the way: All script actions are of course optional. If no scripts have been saved for the actions, nothing happens and the ticket goes through its life cycle as usual.
The next script action now takes place when the ticket is completed and is linked to the forms: Here, the content of the form can be checked again.
After the agent clicks the "Send" button and executes this script, the ticket is saved and the "End Action" scripts of the activated forms and the addressed team are executed.