Ok, so let’s say that you’ve implemented ITIL in your organisation and one of the requirements is that incidents are RESOLVED by the Service Desk and then CLOSED by the client. This is easy enough to implement in Service Desk Express by just creating a new User-Defined Status of RESOLVED that is flagged to “Stop The Clock” as shown below. (Incidentally, you need to create a custom version of the User-Defined Status form to add the “Stop The Clock” tick box to it.)
New Resolved Status
The issue however, is that your clients are not closing their calls and consequently management want the RESOLVED calls to be CLOSED automatically after 2 days of inactivity. This is possible to do with business rules BUT it’s horrible because your job queue fills up with all the tickets that are awaiting closure and as such, identifying failed rules becomes a nightmare. So, an alternative solution.
If you are using Service Desk Express 9.1 or above then salvation is here with the introduction of the Integration Engine. In this post I am going to use the Integration Engine to build a package that will do what we’ve mentioned above:
So we fire up the Integration Engine (http://appservername/integrationconsole by default) and add a new package called Close Resolved Calls. We then create a single step called the same thing as shown below:
Closing Resolved Calls 01
When then customise the step as follows:
We use the Scheduler initiator as we want this function to run in the background without human intervention. In this example I have set it to run every hour starting at midnight.
Closing Resolved Calls 02
Now this is where it gets interesting as we need to specify a query that is going to get us all calls that are RESOLVED (I’ve added this as a User-Defined Status), which means they are open at the moment, that haven’t had any activity in the last two days. I am defining inactivity here as no Incident Details records created. The query to do this is as follows:
SELECT I.[Incident #] FROM [_SMDBA_].[Incident] I WHERE (SELECT Top 1 DATEDIFF(dd, ID.[Date], GETDATE()) FROM [_SMDBA_].[Incident Details] ID WHERE ID.[Incident #] = I.[Incident #] ORDER BY ID.[Date] DESC) > 2 AND I.[Status ID:] = 'RESOLVED' ORDER BY I.[Incident #]
As we want to run a specific query we need to use an ODBC source as opposed to SDE (or at least I find it easier than using the filter option).
So now we have a source of all the incidents that are open, with a status of RESOLVED, and no incident details in the last 2 days. Now we specify the Target which in this case is the Incident table in Service Desk Express. Notice how the Insert/Update method is set to Update only, the business rules are being used, and we are updating on Incident #.
Closing Resolved Calls 11
So finally, all we need to do is map the [Incident #] together and hard-code the [Status ID:] = ‘CLOSED’.
Closing Resolved Calls 12
And that’s it. Every hour it will pick up any calls that meet the criteria (incidents that are open, with a status of RESOLVED, and no incident details in the last 2 days) and it will close them. If you have a business rule that fires on update of an incident to a status of CLOSED then this will automatically fire as well. This is another huge plus of the Integration Engine.
You can download the final package here.
As always, keep the feedback coming (whether it be positive or negative). Hope it was useful.