Create a custom SLA condition rule
You can create custom SLA condition rules to determine whether an SLA should attach, pause, complete, reattach, or cancel. SLA condition classes contain script to define processing for an SLA condition rule. Create an SLA condition rule after the SLA condition class is defined.
Before you begin
Role required: admin
Procedure
Example of an SLA Condition Class
For example, including the following method in an SLA Condition Class attaches the
SLA if its condition matches the SLA's start_condition field:
attach: function() {
return (this._conditionMatches(this.sla.start_condition));
},The following is an example which shows the format of a script include that would extend the SLAConditionBase class and provide methods for each of the SLA transitions:
var SLAConditionLocal = Class.create();
SLAConditionLocal.prototype = Object.extendsObject(SLAConditionBase, {
attach: function() {
// insert script here
},
pause: function() {
// insert script here
},
complete: function() {
// insert script here
},
reattach: function() {
// insert script here
},
cancel: function() {
// insert script here
},
});