Adding task properties


Properties may be assigned to a ticket and allow a more in-depth control of the workflow.

In the following example we want to check if the sender of an incoming email is a VIP customer. For such a VIP customer, a corresponding notification box should be displayed when a ticket is finished.

To achive this we first insert the following JavaScript code into the arrival action of the corresponding mailbox:

if((toEmail.indexOf("bluma")>-1) || (toEmail.indexOf("bergener")>-1)){
   task.addProperty("VIP Customer", "true");    
} else {task.addProperty("VIP Customer", "false");}

The method addProperty  sets an additional property "VIP Customer" to the ticket. For the senders "bluma" and "bergener" the status is set to "true", for all other senders to "false".

In a second step we insert the following Javascript code into the 'complete action' or 'end action' of the corresponding group:

var isvip= task.getProperty ("VIP Customer");
if (isvip != null && isvip.equals("true"))
{
 //...
}