Business Calendars Overview
Rule packages can contain one or more Business Calendars. Business calendars define the working days and hours of the organization. They can also be associated with any rule in the package.
Calendars are out-of-the-box classes available in the Fact Model that can be used by Rules. A calendar contains:
- Time zone
In this release, the standard methods that can be accessed from within the rule template have been extended to allow the timezone ID to be passed in at rule evaluation time by the application that is requesting the rule evaluation. If the timezone ID is not passed in in this way, then the "saved" timezone is used. If the timezone ID is passed in, then it overrides the saved timezone and the calculations will be done using the provided timezone.
- Week start day and time
- Week end day and time
- Holidays (one or more)
- Time Change (one or more)
A holiday is fixed, relative, or annual.
- A fixed holiday contains the date of the holiday, including day, month, and year, such as 01/01/2015.
- A relative holiday contains the month and weekday of the holiday and whether it is on the first, second, third, fourth, or last day of that month, such as the third Thursday of November.
- An annual holiday contains the month and day of the holiday, such as July 4.
A time change indicates how the work hours can be adjusted on particular days; for example, defining a half day on a particular day of the work week. Like a holiday, a time change is fixed, relative, or annual and contains the same date definition as the corresponding holiday definition. In addition, the time change contains the start and end time for the defined date.
Business calendars are needed to be able to define rules based on work hours. For instance:
WHEN Task is idle for more than 3 Working Days THEN increase Priority by 20
WHEN Today is a holiday AND Task is urgent THEN Agent Group is “Urgent Care”
The italicized portions of the above examples use business calendar information.
The following topics explain how to work with Business Calendars in GRAT: