How do I clear rule escalations before moving to a closed state?
Rules, incidents, tasks, opportunities, organizations, contacts
Oracle Service Cloud, All supported versions
When using escalations it is important to clear them when an object is closed. When an object is closed rules do not fire and an escalation will not be processed.
Therefore your rule base must keep track of open/closed state and have a Clear Escalation Level action before transitioning to a closed state.
See below for an example rule state diagram.
This is an example state diagram for Task rules which use rule states to record the open/closed status of the Task. You may have to use some other method to store open/closed status depending on your business practices and the complexity of your rule base.
1. All tasks start in the Initial state and after finishing those rules transition to the In Progress state. The rule should always transition (such as a catch all) and use the Transition State and continue action.
2. Next the rules from the In Progress state would be completed including the creation of an example escalation.
3. At the end of the In Progress state a rule should check for Task.Status. If the Task is closed then the rules will transition to the Closed state. However, since the design of this example allows a Task to be reopened, the rule must Transition State and stop. If the rule was Transition State and continue there could be a loop which would be picked up on compile.
4. Since in the closed state rules do not fire and we have transitioned state and stopped, the escalations must be cleared at the end of the In Progress state before moving to the Closed state. Refer to the example below.