abhinaykumar
ServiceNow Employee
ServiceNow Employee

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’.  

find_real_file.png 

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. 

find_real_file.png

find_real_file.png 

Noticeable fields while creating schedule entry: 

When field 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 until field on schedule entryRepetition 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: 

find_real_file.png

Schedule that includes the preceding holiday schedule:  

find_real_file.pngIf 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.  

find_real_file.png

find_real_file.png 

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’.  

find_real_file.png

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. 

find_real_file.png

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. 

find_real_file.png

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) 

 

Comments
NateDickson1
ServiceNow Employee
ServiceNow Employee

@abhinaykumar wrote:

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. 

Any detail on how this is calculated? I have users creating time_off entries and the resource_allocation_daily is capturing those as 24 hours which is blocking other allocations from occurring. I have attempted setting users schedules and updating average FTE on their profile. We would expect 8 hours a day for vacation entries.

 

We require allocations to still occur if the user schedules vacation so that they show over-allocated and can make sure those situations are addressed appropriately such as finding a backup or reducing overall time with the customer.

Yuvaraj T
Tera Contributor

Hi Abhinay,

 

Thanks for the detailed article about the Resource Capacity.

I have one query about the capacity. As we all know the capacity trend for the resources, which is derived from the user or group schedule. I have a schedule, 8 hours per day and 4 days per week. Total 32 hours per week.

I assigned the schedule to particular user. 

 

In resource report, i entered the below values and generate the report. 
Resource type = Allocation

Entity type = User

Start Date = 2023-01-01

End Date = 2023-12-31

Zoom level = Monthly

Report unit = FTE 

After i run the report, in the Capacity trend line is showing the value as "Jun/2023 capacity: 1.00 FTE", and it is showing same 1.00 FTE for rest of the months.
but when i choose the Report unit is Hours or Person days , values are changed based on the schedule. 

But when the report unit is FTE, the trend line with 1.00 FTE and it is not reduced(0.8 FTE ?) based on the user's schedule like capacity changed the values for  hours and person days. 

Will Capacity FTE value in resource report change based on number of working days or hours per week?
or 
Why always Capacity FTE trend line value showing as 1.00?  
Please explain. 

Version history
Last update:
‎02-18-2021 08:12 PM
Updated by: