--- title: OnCallEscalationTemplateSNC - Global description: The OnCallEscalationTemplateSNC script include provides methods to apply escalation policy templates to escalation sets.Instantiates an OnCallEscalationTemplateSNC object.Applies an escalation policy template to an escalation set.Deletes all escalation step definition records associated with an escalation set. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/api-reference/server-api-reference/OnCallEscalationTemplateSNCAPI.html release: australia product: Server API Reference classification: server-api-reference topic_type: concept last_updated: "2026-03-12" reading_time_minutes: 3 breadcrumb: [Server API reference, API reference, API implementation and reference] --- # OnCallEscalationTemplateSNC- Global The OnCallEscalationTemplateSNC script include provides methods to apply escalation policy templates to escalation sets. For more information about the escalation process, see [Defining On-Call Scheduling escalation process](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/it-service-management/defining-escalation-process-and-template.md). This script include requires the On-Call Scheduling plugin \(com.snc.on\_call\_rotation\). **Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md) ## OnCallEscalationTemplateSNC - OnCallEscalationTemplateSNC\(\) Instantiates an OnCallEscalationTemplateSNC object. |Name|Type|Description| |----|----|-----------| |None| || This example instantiates an OnCallEscalationTemplateSNC object. ``` var escTemp = new global.OnCallEscalationTemplateSNC(); ``` ## OnCallEscalationTemplateSNC - copyEscalationTemplatetoEscalationSet\(String templateSysId, String escalationSetSysId\) Applies an escalation policy template to an escalation set. When the template is applied to the escalation set, escalation step definition records are created in the Shift Escalation Step Definition \[cmn\_rota\_esc\_step\_def\] table. Before calling this method, call the deleteEscalationSetSteps\(\) method to delete existing escalation step definitions. If existing records are not deleted first, this method returns an error. |Name|Type|Description| |----|----|-----------| |templateSysId|String|Sys\_id of the escalation policy template in the On-Call Escalation Policy Template \[on\_call\_template\_escalation\_policy\] table.| |escalationSetSysId|String|Sys\_id of the escalation set in the Shift Escalation Set \[cmn\_rota\_escalation\_set\] table.|
| Type | Description |
|---|---|
| Object | Object containing error and warning messages. If the operation was successful, this object is empty. **Note:** If an error occurs, the operation stops and the template is not applied. If a warning occurs, the operation continues and some records are still created. ``` { "error": "String", "warning": {Object} } ``` |
| <Object>.error | Error message.Possible errors: - Escalation policy template sys\_id is not correct. - Escalation set sys\_id is not correct. - Escalation step definitions already exist on escalation set. Data type: String |
| <Object>.warning | Information about any warnings.Data type: Object ``` { "message": "String", "skipped_steps": [Array], "not_matching_steps": {Object}, } ``` |
| <Object>.warning.message | Warning message.Possible warnings: - Roster position does not match the rosters on the shift - There are no audiences defined on the escalation step template Data type: String |
| <Object>.warning.skipped\_steps | Indexes of any escalation steps that were skipped \(1-based\).Data type: Array |
| <Object>.warning.not\_matching\_steps | Object containing information about any escalation steps that do not have available rosters in the format `{"step number":[roster number]}`.For example, if the return value is `{"3":[3]}`, then at escalation step three the tertiary roster is not available. Data type: Object |