--- title: OnCallContactPreferenceUtil - Global description: The OnCallContactPreferenceUtil script include provides methods for handling contact preferences.Creates an instance of the OnCallContactPreferenceUtil class.Gets a list of contacts with the escalatee object. Each returned contact contains a list of user contact preferences.Gets the list of contact preferences at the time at which the user has opted for communication. If no time is specified, then current time is used. This method is applicable to single and overlapping shifts.Gets a list of catch-all contacts and preferences. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/api-reference/server-api-reference/c\_OnCallContactPreferenceUtilAPI.html release: australia product: Server API Reference classification: server-api-reference topic_type: concept last_updated: "2026-03-12" reading_time_minutes: 5 breadcrumb: [Server API reference, API reference, API implementation and reference] --- # OnCallContactPreferenceUtil- Global The OnCallContactPreferenceUtil script include provides methods for handling contact preferences. For contact preference configuration, see [Configure contact preferences](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/it-service-management/config-my-contact-prefs-oncall.md). This script include supports the [OnCallRotation](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/c_OnCallRotationAPI.md) script include. **Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md) ## OnCallContactPreferenceUtil - OnCallContactPreferenceUtil\(\) Creates an instance of the OnCallContactPreferenceUtil class. |Name|Type|Description| |----|----|-----------| |None| | | ## OnCallContactPreferenceUtil - getContactsAtByEscalatee\(Object escalatee, Number contactAttempt, GlideDateTime gdt, String rotaSysIds\) Gets a list of contacts with the escalatee object. Each returned contact contains a list of user contact preferences.
| Name | Type | Description |
|---|---|---|
| escalatee | Object | Mandatory. Escalatee object returned by the [getEscalationPlan\(\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/c_OnCallRotationAPI.md) method. |
| contactAttempt | Number | Optional. The attempt you are trying to contact \[ default value = 1 \].- `1`: First attempt - `2`: First reminder - `3 or more`: Subsequent reminders |
| gdt | GlideDateTime | Optional. yyyy-MM-dd HH:mm:ss format in the UTC timezone. Default is now.admin |
| rotaSysIds | String | Optional. Comma-separated string of Sys IDs of shifts from the \[cmn\_rota\] table. Default value returns Sys IDs of the shifts at current time. |
| Type | Description |
|---|---|
| Array object | Array of escalatees \(either a user, group, or device records depending on the notification rules\) at a specific time and position.- type: String. Type of contact, e.g., user. - sys\_id: String. Sys ID of the user from the \[sys\_user\] table. - rota\_id: String. Sys ID of the shift from the \[cmn\_rota\] table. - roster\_id: String. Sys ID of the roster from the \[cmn\_rota\_roster\] table. - escalation\_step\_id: String. If an escalation path has been defined, Sys ID of the escalation step from the \[cmn\_rota\_esc\_step\_def\] table. - forced\_communication\_channel: String. If specified in the preferences, mandatory communication channel. Supported values include SMS, voice or email. - override\_user\_contact\_preference: Boolean. True if there are contact overrides, false otherwise. - preference\_source: String. Source of preference, such as contact or group. - contact\_attempt: Number. Contact attempts: 1 = first attempt, 2 = first reminder, and so on. - user\_preferences: Array Object. - type: String. User's preferred contact format, e.g. sms, email, or number. - <name of preferred format, e.g., email or number>: String. Content of preferred contact type, e.g., email address or phone number. - contact\_preferences, Array Object. - type: String. User's preferred contact format, e.g., email or number. - <name of preferred format, e.g., email or number>: String. Content of preferred contact type, e.g., email address or phone number. |
| Name | Type | Description |
|---|---|---|
| userSysId | String | Sys ID of the user from the \[sys\_user\] table. |
| contactAttempt | Number | Optional. The attempt you are trying to contact \[ default value = 1 \].- `1`: First attempt - `2`: First reminder - `3 or more`: Subsequent reminders |
| gdt | GlideDateTime | Optional. yyyy-MM-dd HH:mm:ss format in the UTC timezone. Default is now. |
| communicationTypes | String | Optional. Comma-separated string containing one or more of the following values:- email - sms - voice Default includes all available communication types. |
| Type | Description |
|---|---|
| Array Object | On-call user contact preference. - type: String. User's preferred contact format, e.g. sms, email, or number. - <name of preferred format, e.g., email or number>: String. Content of preferred contact type, e.g., email address or phone number. |
| Type | Description |
|---|---|
| Array object | List of catch-all contacts with preferences.- type: String. Type of contact, e.g., user. - sys\_id: String. Sys ID of the user from the \[sys\_user\] table. - rota\_id: String. Sys ID of the shift from the \[cmn\_rota\] table. - roster\_id: String. Sys ID of the roster from the \[cmn\_rota\_roster\] table. - escalation\_step\_id: String. If an escalation path has been defined, Sys ID of the escalation step from the \[cmn\_rota\_esc\_step\_def\] table. - forced\_communication\_channel: String. If specified in the preferences, mandatory communication channel. Supported values include SMS, voice or email. - override\_user\_contact\_preference: Boolean. True if there are contact overrides, false otherwise. - preference\_source: String. Source of preference, such as contact or group. - contact\_attempt: Number. Contact attempts: 1 = first attempt, 2 = first reminder, and so on. - user\_preferences: Array Object. - type: String. User's preferred contact format, e.g. sms, email, or number. - <name of preferred format, e.g., email or number>: String. Content of preferred contact type, e.g., email address or phone number. - contact\_preferences, Array Object. - type: String. User's preferred contact format, e.g., email or number. - <name of preferred format, e.g., email or number>: String. Content of preferred contact type, e.g., email address or phone number. |