{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":14514,"path":"field-service-management/capacity-management-components.md","title":"Field Service Capacity and Reservations Management components","bundle":null,"doc_type":null,"release":"australia","body":"\n# Field Service Capacity and Reservations Management components\n\nSeveral types of components are installed with the Field Service Capacity and Reservations Management feature, including tables, business rules, scheduled jobs, and script includes.\n\nInstall the Field Service Contractor Management plugin \\(com.snc.fsm\\_contractor\\_management\\) to take the external groups into account while reserving, defining, and assigning the work capacity. For more information, see [Activate Field Service Contractor Management](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/field-service-management/workforce-optimization-for-field-service/activate-contractor-management-plugin.md).\n\nActivation of Field Service Capacity and Reservations Management adds the Capacity Management menu to the application navigator and the following modules:\n\n-   **Capacity Reservations**: Reserve a capacity percentage of a group or agents availability to meet specific demands. For example, 60% for Break-Fix Work types and 40% for Install work types.\n-   **Capacity Definitions**: Allocate the correct amount of work to internal or external work groups based on defined hours, task count, or agent work schedules. You can define capacity for a day, week, month, or year.\n-   **Capacity Assignments**: Assign the capacity and capacity reservations to internal work groups and external groups of contractor companies.\n-   **Capacity Usages**: View the record of capacity used by different groups and agents.\n\n**Note:** You must select **using dynamic scheduling** in the **Assignment method for tasks** configuration option to enable your application to distribute work based on the capacity management rules.\n\n## Tables\n\nCapacity and Reservations Management adds the following tables.\n\n<table id=\"table_h1q_d3c_vmb\"><thead><tr><th>\n\nTable\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nCapacity Assignment\\[wm\\_capacity\\_assignment\\]\n\n</td><td>\n\nStores capacity definition assignments to groups within a specific time period to help avoid conflicts in capacity in a given time period by validating the **effective from** and **effective to** dates.\n\n</td></tr><tr><td>\n\nCapacity Definition\\[wm\\_capacity\\_definition\\]\n\n</td><td>\n\nStores the details like source of capacity, allocation schedule, frequency of capacity definitions of a group or internal field service agent and the reservation rules to be used while assigning tasks.\n\n</td></tr><tr><td>\n\nDemand Channel\\[wm\\_demand\\_channel\\]\n\n</td><td>\n\nStores the details like name, conditions, and order of execution of a demand channel.\n\n</td></tr><tr><td>\n\nCapacity Demand Metrics\\[wm\\_capacity\\_for\\_demand\\]\n\n</td><td>\n\nStores the metrics data for all capacity assignments.\n\n</td></tr><tr><td>\n\nCapacity Reservation\\[wm\\_capacity\\_reservation\\]\n\n</td><td>\n\nStores the reservation definition and exclusion conditions.\n\n</td></tr><tr><td>\n\nCapacity Reservation Rule\\[wm\\_capacity\\_reservation\\_rule\\]\n\n</td><td>\n\nStores the reservation rules and the conditions for which the reservations should be used.\n\n</td></tr><tr><td>\n\nCapacity Usage\\[wm\\_capacity\\_usage\\]\n\n</td><td>\n\nStores the capacity used by an internal field service agent or a group within a specific time period.\n\n</td></tr></tbody>\n</table>## Business rules\n\nCapacity management adds the following business rules.\n\n<table id=\"table_axb_clr_jnb\"><thead><tr><th>\n\nBusiness rule\n\n</th><th>\n\nTable\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nAvoid Conflict in Capacity Time Period\n\n</td><td>\n\nCapacity Assignment \\[wm\\_capacity\\_assignment\\]\n\n</td><td>\n\nMonitor the time period defined for the Capacity Assignment to ensure that any group does not have multiple capacity assignments in the same time period or overlapping intervals.\n\n</td></tr><tr><td>\n\nUpdate Capacity on task change\n\n</td><td>\n\nWork Order Task\\[wm\\_task\\]\n\n</td><td>\n\nAdd or update capacity when a task is assigned or unassigned. You can update capacity when the estimated work or travel duration changes.\n\n</td></tr><tr><td>\n\nUpdate Capacity on task delete\n\n</td><td>\n\nWork Order Task\\[wm\\_task\\]\n\n</td><td>\n\nUpdate the capacity used whenever an open task is deleted within the given window.\n\n</td></tr><tr><td>\n\nValidate Capacity Value\n\n</td><td>\n\nCapacity Definition \\[wm\\_capacity\\_definition\\]\n\n</td><td>\n\nValidates the value of the provided capacity for the capacity definition. Capacity should be a non-zero positive integer value.\n\n</td></tr><tr><td>\n\nValidate Effective to and Effective from\n\n</td><td>\n\nCapacity Assignment \\[wm\\_capacity\\_assignment\\]\n\n</td><td>\n\nValidates the dates entered in the **Effective to** and **Effective from** fields in the capacity assignment table. The system calculates the **Effective to** date based on the value entered in the **Repeat for** field if the **Capacity by** value is not selected as for the agent schedule. The **Effective from** value should always be on or after the current date, and before or equal to the **Effective to** date. While updating the capacity assignment, the**Effective to** value cannot be set to a date before capacity usage exists.\n\n</td></tr><tr><td>\n\nValidate Percent Allocated value\n\n</td><td>\n\nCapacity Reservation Rule \\[wm\\_capacity\\_reservation\\_rule\\]\n\n</td><td>\n\nValidates the allocated percentage value in the Capacity Reservation Rule table. This value should be a non-zero positive integer less than or equal to 100.\n\n</td></tr><tr><td>\n\nUpdate Domain for capacity assignment\n\n</td><td>\n\nCapacity Assignment \\[wm\\_capacity\\_assignment\\]\n\n</td><td>\n\nThe system assigns domains to records based on information in the **Type** field. If the Type is 'Territory internal agents' or 'Territory contractor group', the domain is set using the **Territory** field. For any other type, the domain is determined by the **Group** field.\n\n</td></tr><tr><td>\n\nUpdate capacity demand metrics table\n\n</td><td>\n\nCapacity Assignment Override \\[wm\\_capacity\\_override\\]\n\n</td><td>\n\nUpdates the **Capacity Demand Metrics** table when the aggregated agent schedule cutoff date or days is updated for a territory.\n\n</td></tr><tr><td>\n\nUpdate Capacity on task change\n\n</td><td>\n\nWorkOrder Task \\[wm\\_task\\]\n\n</td><td>\n\nEnables you to customize the calculation of capacity by defining conditions for deducting capacity from the capacity usage.\n\n</td></tr><tr><td>\n\nDisallow capacity definition changes\n\n</td><td>\n\nCapacity Definition \\[wm\\_capacity\\_definition\\]\n\n</td><td>\n\nPrevents modifications to capacity definitions when they're in use.\n\n</td></tr><tr><td>\n\nDisallow override for agent-schedule\n\n</td><td>\n\nCapacity Assignment Override\\[wm\\_capacity\\_override\\]\n\n</td><td>\n\nPrevents overrides for schedules managed by agent scheduling system.\n\n</td></tr><tr><td>\n\nDisllow update on capacity usage\n\n</td><td>\n\nCapacity Buckets\\[wm\\_capacity\\_bucket\\]\n\n</td><td>\n\nPrevents updating capacity and time values when capacity usage records exists.\n\n</td></tr><tr><td>\n\nLimit one Demand channel per reservation\n\n</td><td>\n\nCapacity Reservation Rule\\[wm\\_capacity\\_reservation\\_rule\\]\n\n</td><td>\n\nEnsures that each capacity reservation rule is associated with only one demand channel.\n\n</td></tr><tr><td>\n\nPrevent Duplicate Name, Condition\n\n</td><td>\n\nDemand Channel\\[wm\\_demand\\_channel\\]\n\n</td><td>\n\nEnsures that demand channels don't have duplicate names and conditions.\n\n</td></tr><tr><td>\n\nPrevent updating record to inactive\n\n</td><td>\n\nDemand Channel\\[wm\\_demand\\_channel\\]\n\n</td><td>\n\nPrevents changing the status of the demand channel to **Inactive** when the demand channel is still in use.\n\n</td></tr><tr><td>\n\nRemove capacity for unsupported task\n\n</td><td>\n\nWorkOrder Task\\[wm\\_task\\]\n\n</td><td>\n\nRemoves capacity allocations from tasks that don't support capacity management.\n\n</td></tr><tr><td>\n\nRestrict changes to definition\n\n</td><td>\n\nCapacity Definition\\[wm\\_capacity\\_definition\\]\n\n</td><td>\n\nPrevents changing **Capacity by** value of capacity definition to Agent Schedule when there are capacity assignment override records.\n\n</td></tr><tr><td>\n\nTo verify usage not less than 0\n\n</td><td>\n\nCapacity Usage\\[wm\\_capacity\\_usage\\]\n\n</td><td>\n\nValidates that capacity usage values are greater than or equal to 0.\n\n</td></tr><tr><td>\n\nValidate different types of overrides\n\n</td><td>\n\nCapacity Assignment Override\\[wm\\_capacity\\_override\\]\n\n</td><td>\n\nValidates that different types of overrides comply with business constraints.\n\n</td></tr><tr><td>\n\nValidate fields\n\n</td><td>\n\nCapacity Assignment Override\\[wm\\_capacity\\_override\\]\n\n</td><td>\n\nEnsures that the required fields are populated for capacity override.\n\n</td></tr><tr><td>\n\nValidate fields based on type\n\n</td><td>\n\nCapacity Assignment \\[wm\\_capacity\\_assignment\\]\n\n</td><td>\n\nEnsures that the required fields are populated based on the type of capacity assignment.\n\n</td></tr><tr><td>\n\nValidate on deleting definition\n\n</td><td>\n\nCapacity Definition \\[wm\\_capacity\\_definition\\]\n\n</td><td>\n\nEnsures that the capacity definitions are not in use before their deletion.\n\n</td></tr><tr><td>\n\nValidate overall definition\n\n</td><td>\n\nCapacity Definition \\[wm\\_capacity\\_definition\\]\n\n</td><td>\n\nValidates the capacity definition before adding or updating it.\n\n</td></tr><tr><td>\n\nValidate overlapping capacity buckets\n\n</td><td>\n\nCapacity Buckets\\[wm\\_capacity\\_bucket\\]\n\n</td><td>\n\nPrevents defining overlapping time ranges in capacity buckets.\n\n</td></tr><tr><td>\n\nValidate percent allocated\n\n</td><td>\n\nAllocation Schedule \\[wm\\_allocation\\_schedule\\]\n\n</td><td>\n\nValidates the allocated percentage value. The value should be a positive integer less than or equal to 100.\n\n</td></tr><tr><td>\n\nValidate percent allocated\n\n</td><td>\n\nAllocation Schedule Details \\[wm\\_allocation\\_schedule\\_detail\\]\n\n</td><td>\n\nValidates the allocated percentage value. The value should be a positive integer less than or equal to 100.\n\n</td></tr><tr><td>\n\nValidate range\n\n</td><td>\n\nAllocation Schedule Details \\[wm\\_allocation\\_schedule\\_detail\\]\n\n</td><td>\n\nValidates that the time ranges don't overlap.\n\n</td></tr><tr><td>\n\nValidate recurrence\n\n</td><td>\n\nCapacity Assignment Override\\[wm\\_capacity\\_override\\]\n\n</td><td>\n\nValidates that the recurrence rules in capacity override are configured correctly.\n\n</td></tr><tr><td>\n\nValidate total percentage\n\n</td><td>\n\nCapacity Buckets\\[wm\\_capacity\\_bucket\\]\n\n</td><td>\n\nEnsures that the total allocated percentage across all the capacity buckets doesn’t exceed 100.\n\n</td></tr><tr><td>\n\nValidation for rank\n\n</td><td>\n\nCapacity Assignment Override\\[wm\\_capacity\\_override\\]\n\n</td><td>\n\nValidates the ranking order for capacity reservations to ensure proper priority.\n\n</td></tr></tbody>\n</table>Capacity management adds the following business rules for Shift Scheduling for Field Service. The com.snc.sn\\_fsm\\_shift\\_schdlng plugin must be installed to enable these business rules.\n\n<table id=\"table_hcq_r2g_bgc\"><thead><tr><th>\n\nBusiness rule\n\n</th><th>\n\nTable\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nUpdate Capacity For Demand\n\n</td><td>\n\nAgent Schedule \\[sn\\_shift\\_planning\\_agent\\_schedule\\]\n\n</td><td>\n\nUpdates capacity when demand metrics is updated.\n\n</td></tr><tr><td>\n\nUpdate capacity demand metrics table\n\n</td><td>\n\nAgent Schedule Time Off Request \\[sn\\_shift\\_planning\\_agent\\_schedule\\_request\\]\n\n</td><td>\n\nUpdates demand metrics table for territory planning.\n\n</td></tr></tbody>\n</table>Capacity management adds the following business rules for Field Service Territory Planning. You must install the com.snc.fsm\\_territory\\_planning plugin to enable these business rules.\n\n<table id=\"table_kmx_rtj_bgc\"><thead><tr><th>\n\nBusiness rule\n\n</th><th>\n\nTable\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nUpdate capacity demand metrics table\n\n</td><td>\n\nCapacity Assignment Override\\[wm\\_capacity\\_override\\]\n\n</td><td rowspan=\"15\">\n\nUpdates the Capacity Demand Metrics \\(wm\\_capacity\\_for\\_demand\\) table on updating the values for **Aggregated agent schedule cut off** or **Aggregated agent schedule cutoff date** fields for a Field Service Territory.\n\n</td></tr><tr><td>\n\nUpdate capacity demand metrics table\n\n</td><td>\n\nSchedule Entry cmn\\_schedule\\_span\n\n</td></tr><tr><td>\n\nUpdate capacity demand metrics table\n\n</td><td>\n\nCapacity Assignment \\[wm\\_capacity\\_assignment\\]\n\n</td></tr><tr><td>\n\nUpdate capacity demand metrics table\n\n</td><td>\n\nTerritory\\[sn\\_tp\\_territory\\]\n\n</td></tr><tr><td>\n\nUpdate capacity demand metrics table\n\n</td><td>\n\nCapacity Buckets\\[wm\\_capacity\\_bucket\\]\n\n</td></tr><tr><td>\n\nUpdate capacity demand metrics table\n\n</td><td>\n\nAgent Work Schedule \\[agent\\_work\\_schedule\\]\n\n</td></tr><tr><td>\n\nUpdate Demand channel on WOT\n\n</td><td>\n\nWorkOrder Task\\[wm\\_task\\]\n\n</td></tr><tr><td>\n\nUpdate capacity demand metrics table\n\n</td><td>\n\nAgent Personal Schedule \\[agent\\_events\\]\n\n</td></tr><tr><td>\n\nUpdate capacity demand metrics table\n\n</td><td>\n\nCapacity Reservation Rule \\[wm\\_capacity\\_reservation\\_rule\\]\n\n</td></tr><tr><td>\n\nUpdate demand metrics table for 1 day\n\n</td><td>\n\nCapacity Assignment Override\\[wm\\_capacity\\_override\\]\n\n</td></tr><tr><td>\n\nUpdate capacity demand metrics table\n\n</td><td>\n\nAllocation Schedule \\[wm\\_allocation\\_schedule\\]\n\n</td></tr><tr><td>\n\nUpdate capacity demand metrics table\n\n</td><td>\n\nCapacity Definition \\[wm\\_capacity\\_definition\\]\n\n</td></tr><tr><td>\n\nUpdate capacity demand metrics table\n\n</td><td>\n\nSchedule \\[cmn\\_schedule\\]\n\n</td></tr><tr><td>\n\nUpdate capacity demand metrics table\n\n</td><td>\n\nAllocation Schedule Details \\[wm\\_allocation\\_schedule\\_detail\\]\n\n</td></tr><tr><td>\n\nUpdate capacity demand metrics table\n\n</td><td>\n\nTerritory Group \\[sn\\_tp\\_territory\\_group\\]\n\n</td></tr><tr><td>\n\nValidate Aggregated agent schedule cutof\n\n</td><td>\n\nTerritory\\[sn\\_tp\\_territory\\]\n\n</td><td>\n\nValidates the value Aggregated agent schedule cutoff days or date field in the Territory table. The agent schedule cut off days must be a non-zero integer value greater than or equal to 0 and less than or equal to 30.\n\n</td></tr></tbody>\n</table>**Note:** You must select **using dynamic scheduling** in the **Assignment method for tasks** configuration option to enable your application to distribute work based on the capacity management rules.\n\n## Scheduled job\n\nThe Capacity and Reservations Management adds the following scheduled job. To find them, navigate to **All** &gt; **sn\\_schedulejobs.do**.\n\n|Scheduled job|Description|\n|-------------|-----------|\n|Compute Capacity Demand Metrics Data|Calculates and generates data for the Field Service Territory Capacity Analytics dashboard.|\n\n## Script includes\n\nThe Capacity and Reservations Management adds the following Script includes. To find them, navigate to **All** &gt; **Script Includes**.\n\n<table id=\"table_dzh_mml_stb\"><thead><tr><th>\n\nScript include\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nFSMCapacityAjax\n\n</td><td>\n\nProvides AJAX endpoints that allows client scripts to check agent capacity for tasks and retrieve assignment details dynamically from the server.\n\n</td></tr><tr><td>\n\nFSMCapacityAppnmtBookingUtil\n\n</td><td>\n\nUtility methods to support appointment booking in FSM. This utility method retrieves dispatch groups for a location and filters groups based on the configuration. It also determines the eligible groups for task assignment during appointment scheduling.\n\n</td></tr><tr><td>\n\nFSMCapacityBaseUtil\n\n</td><td>\n\nCustomizable utility class that extends FSMCapacityBaseUtilSNC. This utility class provides methods to validate and calculate capacity.\n\n</td></tr><tr><td>\n\nFSMCapacityBaseUtilSNC\n\n</td><td>\n\nProvides read-only utility scripts to validate and calculate capacity.\n\n</td></tr><tr><td>\n\nFSMCapacityBucketApi\n\n</td><td>\n\nManages capacity buckets, including CRUD operations and bucket allocation.\n\n</td></tr><tr><td>\n\nFSMCapacityBucketApiSNC\n\n</td><td>\n\nContains utility methods to retrieve and map capacity buckets used by a task, based on assignment and schedule details. It supports advanced bucket-based capacity calculations and integrates with usage, reservation, and definition APIs.\n\n</td></tr><tr><td>\n\nFSMCapacityConstants\n\n</td><td>\n\nHolds customizable constants. It extends the base constants class \\(FSMCapacityConstantsSNC\\) and allows you to override or add new constant values specific to the requirements, without modifying the base constants.\n\n</td></tr><tr><td>\n\nFSMCapacityConstantsSNC\n\n</td><td>\n\nHolds read-only constants like table names, default values, and configuration options. It centralizes important static values used throughout the workflow.\n\n</td></tr><tr><td>\n\nFSMCapacityCoreApi\n\n</td><td>\n\nProvides methods to retrieve and calculate capacity details for tasks, supporting advanced capacity planning and usage tracking.\n\n</td></tr><tr><td>\n\nFSMCapacityDefinitionApi\n\n</td><td>\n\nProvides API class for capacity definitions. It extends the base API \\(FSMCapacityDefinitionApiSNC\\) and allows you to manage and override capacity definition as per the business requirement.\n\n</td></tr><tr><td>\n\nFSMCapacityDefinitionApiSNC\n\n</td><td>\n\nProvides API methods to calculate total capacity, handle overrides, and support different capacity calculation strategies based on assignment, agent schedule, or hours.\n\n</td></tr><tr><td>\n\nFSMCapacityManagement\n\n</td><td>\n\nIntegrates with various Capacity and Reservation Management APIs to orchestrate capacity checks, calculations, and updates. It provides methods to manage capacity by determining the capacity for tasks and agent availability.\n\n</td></tr><tr><td>\n\nFSMCapacityQueryUtil\n\n</td><td>\n\nUtility class that provides query to find agent schedule assignments within a time window and retrieve all relevant assignments based on qualifiers and date ranges.\n\n</td></tr><tr><td>\n\nFSMCapacityReservationAllocationApi\n\n</td><td>\n\nProvides customizable utility class to manage capacity, reservations, and allocations. It extends FSMCapacityReservationAllocationApiSNC.\n\n</td></tr><tr><td>\n\nFSMCapacityReservationAllocationApiSNC\n\n</td><td>\n\nRead-only utility class that handles capacity, reservations, and allocations. It provides methods to calculate allocation percentages and reservation capacities, supporting advanced scheduling and capacity planning.\n\n</td></tr><tr><td>\n\nFSMCapacityUsageApi\n\n</td><td>\n\nCustomizable API class that manages capacity usage records. It extends FSMCapacityUsageApiSNC and provides customizable methods to handle capacity usage calculations.\n\n</td></tr><tr><td>\n\nFSMCapacityUsageApiSNC\n\n</td><td>\n\nProvides methods to calculate and retrieve total and reserved capacity usage. It leverages caching and integrates with Capacity definition and reservation APIs to validate and track usage efficiently.\n\n</td></tr><tr><td>\n\nFSMCapacityUtil\n\n</td><td>\n\nProvides utility functions to ensure integrity checks and safe deletion Capacity and Reservation Management entities. It checks if the capacity definitions, reservations, or reservation rules are referenced in usage records.\n\n</td></tr><tr><td>\n\nScheduleOptimizationCapacityResponse\n\n</td><td>\n\nContains a utility class that provides methods to calculate the capacity horizons for groups or territories, to determine the available and allocated capacity for task optimization within a specified date range.**Note:** The Schedule Optimization plugin \\(com.snc\\_schedule\\_optimization\\) for Field Service Management must be installed to enable this script include.\n\n</td></tr></tbody>\n</table>The Capacity and Reservations Management adds the following Script includes for Field Service Territory Planning. You must activate the Field Service Territory Planning plugin \\(com.snc.fsm\\_territory\\_planning\\) for Field Service Management to enable these script includes.\n\n|Script include|Description|\n|--------------|-----------|\n|FSMDemandManagementConstants|Extends the constants class FSMDemandManagementConstantsSNC. It allows you to override or add new constant values specific to your requirements without modifying the base read-only constants.|\n|FSMDemandManagementConstantsSNC|Defines read-only constants such as queue names, metric calculation keys, and configuration values. It centralizes important string and numeric constants for reuse across the application.|\n|FSMDemandManagementUtilSNC|Provides read-only core utility functions, including methods to calculate and update metrics data for territories and capacity assignments.|\n|FSMDemandManagementUtil|Customizable class that extends FSMDemandManagementUtilSNC. It allows you to override or add demand management utility methods specific to your requirements.|\n|FSMDemandManagementExtPoint|Provides method to retrieve the default demand channel. Implements the FSMDemandManagementExtPoint extension point, allowing you to customize demand management.|\n|FSMDemandManagementQueryUtil|Customizable class that extends the read-only FSMDemandManagementQueryUtilSNC class. You can override or add new methods in FSMDemandManagementQueryUtil to customize demand management for your requirements.|\n|FSMDemandManagementQueryUtilSNC|Defines utility functions such to fetch the default demand channel, retrieve future work order tasks, and delete metric records. It provides reusable logic to support Demand Management features.|\n\n## Roles\n\nThe Capacity and Reservations Management adds the following roles. To find them, navigate to **All** &gt; **Roles**.\n\n|Roles|Description|\n|-----|-----------|\n|sn\\_fsm\\_capacity\\_mg.wm\\_capacity\\_write|Allows CRUD access to all the capacity related tables|\n|sn\\_fsm\\_capacity\\_mg.wm\\_capacity\\_read|Allows read access to all the capacity related tables and Capacity console workspace|\n\n-   **[Capacity and Reservations Management components](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/field-service-management/advanced-capacity-components.md)**  \nSeveral types of components are installed with the Advanced Capacity and Reservations Management feature, including tables, and script includes.\n\n**Parent Topic:**[Components installed with additional plugins for Field Service Management](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/field-service-management/components-inst-additional-plugin.md)\n\n"}}