---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# SMSPreferenceHandlerSNC - Scoped, Global

# SMSPreferenceHandlerSNC - Scoped, Global {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

The SMSPreferenceHandler script include provides methods to manage short message service (SMS) configurations.

This script include is implemented as the script include SMSPreferenceHandlerSNC and resides in the `sn_sms_pref` namespace. To use this API you must install the Notify plugin (com.snc.notify)
which requires a separate subscription. You can activate this plugin if you have the admin role.

## SMSPreferenceHandlerSNC - SMSPreferenceHandler(String provider) {#ariaid-title2}

Instantiates the SMSPreferenceHandler script include object.
{#SPH-SMSPreferenceHandler_S__table_r1c_yzv_xhb__entry__3}

| Name | Type | Description |
|-|-|-|
| provider | String | Name of the telephony service provider. |
[Table 1. Parameters]

{#SPH-SMSPreferenceHandler_S__table_r1c_yzv_xhb}  

    var handler = new sn_sms_pref.SMSPreferenceHandler('TwilioDirect'); // Pass the provider name
    var config = handler.getConfig();

## SMSPreferenceHandlerSNC - getConfig() {#ariaid-title3}

Returns the preferences configuration record for the current telephony service
provider.
The method queries all preference configuration records from the SMS Preference
Configuration \[sn_sms_pref_configuration\] table for the current telephony service provider,
sorts the results by the Order field (lowest to highest), and then returns the first
record.
{#SPH-getConfig__table_rjc_23p_xhb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 2. Parameters]

{#SPH-getConfig__table_rjc_23p_xhb} {#SPH-getConfig__table_sjc_23p_xhb__entry__2}

| Type | Description |
|-|-|
| GlideRecord | Preference configuration record for the current telephony service provider. If no record exists, then null. |
[Table 3. Returns]

{#SPH-getConfig__table_sjc_23p_xhb}  

    var handler = new sn_sms_pref.SMSPreferenceHandler('TwilioDirect'); // Pass the provider name
    var config = handler.getConfig();


