3

I'm wondering how to go about running a batch job that is triggered on Holidays to add "1" to any open cases?

I have a formula field that tracks Weekdays (-weekends) but doesn't look at holidays. I'm thinking if I can run a batch job on any of the 8 holidays we have every year that adds "1" to open cases, I can just subtract the two fields and end up with an accurate time for Case Age.

Any suggestions would be excellent!

Thanks

2

If you are trying to track open case time, you should look at Business Hours and Holidays. From the API Docs, "This object is used to specify the business hours of your support organization. Escalation rules are run only during these hours. If business hours are associated with any Holiday records, then business hours and escalation rules associated with business hours are suspended during the dates and times specified as holidays."

For calculating case age, there is a feature you can request, but it looks like it is only a report field, and it is not clear if it respects holidays or not (worth asking if you request the feature). That link also gives a formula for calculating case age in hours as a formula field on case, although frankly it's a beast, and doesn't help with holidays.

If you decide to go with a batch job, you could query the Holiday object to determine if it is a holiday, but note that you must maintain holidays for your company (via setup, see link above), and the object is a little complex if you use recurring holidays. I'm not away of an Apex class to simplify interaction with the Holiday object.

  • Thanks Jason, that's great info! I think we want Business Days, not hours, so I'm going to see if we'll be able to query the Holiday object and add "1" to a "Holiday" field on the case if the case is still open. – McD Jan 31 '14 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.