OnCallContactPreferenceUtil - Global
-
- UpdatedAug 3, 2023
- 4 minutes to read
- Vancouver
- API reference
Utility for handling contact preferences.
For contact preference configuration, see Configure contact preferences.
This utility API supports the OnCallRotation API.
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.
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.
|
Example
Example:
Output:
OnCallContactPreferenceUtil - getUserPreferences(String userSysId, Number contactAttempt, GlideDateTime gdt, String communicationTypes)
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.
Type | Description |
---|---|
Array Object | On-call user contact preference.
|
Example
Example:
Output:
OnCallContactPreferenceUtil - getCatchAllContacts(String rotaId, GlideDateTime gdt)
Gets a list of catch-all contacts and preferences.
Name | Type | Description |
---|---|---|
rotaId | String | Sys ID of the shift from the [cmn_rota] table. |
gdt | GlideDateTime | Optional. yyyy-MM-dd HH:mm:ss format in the UTC timezone. Default is now. |
Type | Description |
---|---|
Array object | List of catch-all contacts with preferences.
|
Example
Example:
Output:
On this page
- OnCallContactPreferenceUtil - OnCallContactPreferenceUtil()
- OnCallContactPreferenceUtil - getContactsAtByEscalatee(Object escalatee, Number
contactAttempt, GlideDateTime gdt, String rotaSysIds)
- OnCallContactPreferenceUtil - getUserPreferences(String userSysId, Number contactAttempt,
GlideDateTime gdt, String communicationTypes)
- OnCallContactPreferenceUtil - getCatchAllContacts(String rotaId, GlideDateTime gdt)