Resource Capacity in Resource Management
This article provides complete details of resource capacity and will cover the following points:
1.What is capacity?
2.How do we define scheduled hours?
3.How to define holidays?
4.How to create time off entries?
5.Capacity formula
6.Employee profile and its impact on capacity generation
What is capacity ?
Capacity is the amount of work that a user/resource can perform with a work schedule attached.
Capacity can be generated only for users with 'pps_resource' role assigned.
By default, all the users are assumed to follow the schedule provided in property “Default Schedule Name(com.snc.resource_management.default_schedule)”. Out Of the box, this property is defaulted to ‘Resource Management Schedule’ which is 8 hours a day, 5 days a week schedule.
For example: If a user associated with Resource Management Schedule has 8 hours per day as in the schedule -
Capacity for 1 week where there isn’t any company holiday and there isn’t any time off for user:
Capacity = Number of working days in that week * Hours per day as per the schedule
Capacity = 5 * 8 = 40
Specific schedule can also be added to a particular user from the ‘Schedule’ related list available in the ‘resource manager’ view of user record. Once Schedule is provided in the related list, it’s mandatory to update the user’s capacity and availability for specific duration by clicking the related link ‘Update Resource Capacity’.
How do we define scheduled hours?
Schedule hours are the work time that is considered when generating user capacity and availability. Schedules can be configured using schedule and schedule entry records.
Schedule records are saved in the Schedule (cmn_schedule) table. Schedule entries are saved in the Schedule Entry (cmn_schedule_span) table.
The Schedule Entries related list contains the definitions of the time periods you want to include in or exclude from the schedule.
Noticeable fields while creating schedule entry:
Whenfield on schedule entry: Date and time to which the schedule entry applies. If the schedule entry applies to a full 24-hour day, select the ‘All day’ check box.
'2020-01-01 08:00:00' is the start date time and '2020-01-01 17:00:00' is the end date time of the schedule entry. The difference between endDateTime and startDateTime is scheduled hours, which is 9 hours a day for this schedule.
Repeat untilfield on schedule entry*:* Repetition end date. If you leave this field blank, the schedule repeats indefinitely.
Time zone field on schedule: The Time zone field value on the schedule must be Floating.
If the value is not Floating,the Time zone field value must be same as that of the Time zone field value of the user record for which the schedule is attached, or for the user who updates the aggregates.
How to define holidays ?
You can define each individual holiday as a schedule entry to create exceptions to existing schedules.
In order not to allocate users for a given day, holidays are planned to reduce the capacity and availability of users attached to a particular schedule.
Holidays can be attached to main schedule in two ways:
1.Schedules can be included in other schedules through a parent-child relationship, create a holiday schedule and include it in other schedules to maintain consistent holidays.
The following example shows a holiday schedule:
Schedule that includes the preceding holiday schedule:
If holidays are in Child schedule, then Child schedule type must be Include.
2.You can create an entry for the holiday in the main schedule.
If holiday is added in Schedule Entry, then record type must be Excluded.
How to create time off entries ?
‘ com.snc.resource_management.exclude_events_from_schedule ’ property specifies the type of events which must be excluded for capacity calculations.
The default value of this property is ‘time off’.
If a user wants to apply for a leave on a particular day, then the user can go to ‘My Calendar’ module and apply for leave by selecting the type as time off.
The hours for the 'User Calendar Event' for time off entry are 9(schedule hours), even though the event is created for 'All day'. This is to ensure that capacity can never be negative.
When an excluded-type calendar event is submitted, then entry in resource_allocation_daily table is created for the excluded type and the capacity and availability records are reduced by event hours for a particular day.
Capacity Formula:
Capacity = Scheduled hours - Scheduled Holiday hours - User Calendar Events
Let’s now deep dive further to see how the capacity will be calculated in case of company holidays / user time off.
Considering a user attached to the above schedule ‘8-5 weekdays excluding holidays’ and updated capacity for a week I.e from 2020-12-27 to 2021-01-02.
Scheduled hours: Scheduled hours are 9 hours per day. So, the week’s ‘scheduled hours’ are 45.
Scheduled Holiday hours: ‘U.S. Holidays’ is attached to the above schedule as a child schedule and have two holidays for a given week, New Year’s Eve on December 31st and New Year’s Day on January 1st.
So, the week’s ‘Scheduled Holiday hours’ are 18.
User Calendar Events: On 2020-12-29, the user has time off. User calendar events are, therefore, 9.
Capacity = Scheduled hours (45) - Scheduled Holiday hours (18) - User Calendar Events (9)
Capacity for week, 2020-12-27 to 2021-01-02 is 18 hours.
Employee profile and its impact on capacity generation (available from ‘Paris’ release onwards) :
Capacity is generated for only the date range specified in the employment start date and employment end date of the employee profile when the Employee Profile plugin is installed.
If there is contract employee, then user’s start date and end date can be provided in employee profile table.
If any plans change and you want to update user-related aggregates and allocations to 0 after the termination date, then run the scheduled job 'Resource Termination Handler'.
(All aggregates and allocations for terminated resources is automatically updated to 0 when you run the ‘Resource Termination Handler’ scheduled job when the termination date is after the date on which the job is run)
https://www.servicenow.com/community/spm-articles/resource-capacity-in-resource-management/ta-p/2300141