Is there a way to calculate business days as opposed to calendar days for the auto-closing of Cases?

Christopher Sik
Kilo Guru

Currently our resolved cases are set to auto-close after 2 days. Our offices are open Monday through Friday. So if a case is resolved on a Friday, it will auto-close on Sunday. If it is resolved on a Thursday it will auto-close on Saturday. This is problematic for our agents and customers who may not see the case was resolved until the following Monday, at which point the case will already be closed and cannot be reopened.

 

Is there a way to ignore certain days and/or dates in the auto-close calculations?

At the minimum, we would be looking for the system to ignore Saturdays and Sundays such that a case resolved on a Thursday would auto-close on the following Monday and a case resolved on a Friday, would auto-close on the following Tuesday.  A case resolved on a Saturday or Sunday would auto-close on the following Tuesday.

 

It would also be ideal if we could avoid holidays and unplanned business closures. But we'd like to avoid having to hard code those dates using a script which would then have to be continually updated. We were wondering if there is a way to add a calendar of dates to ignore to a table somewhere in the platform which the auto-close flow could then refer to and determine when to auto-close the case record?

 

I came across this old post and others like it. But the script offered as a solution only counts days and does not distinguish between work days and non-work days.

Auto closure of a case record after 7 business day... - ServiceNow Community

 

Thanks for your help!

1 ACCEPTED SOLUTION

Kristen Ankeny
Kilo Sage

I would leverage the glideSchedule api to handle this, as you can define a schedule that includes your holidays and then have the script use that to properly define 2 business days. https://developer.servicenow.com/dev.do#!/reference/api/utah/server/no-namespace/c_GlideScheduleScop...

 

View solution in original post

2 REPLIES 2

Kristen Ankeny
Kilo Sage

I would leverage the glideSchedule api to handle this, as you can define a schedule that includes your holidays and then have the script use that to properly define 2 business days. https://developer.servicenow.com/dev.do#!/reference/api/utah/server/no-namespace/c_GlideScheduleScop...

 

Christopher Sik
Kilo Guru

Thanks @Kristen Ankeny for clueing me into this feature and the documentation. It appears we already have some schedules in place in our instance. So now it's just a matter of developing a script to reference that schedule in the auto-close flow. I'll pass this information on to our development for further action.

Be well!