---
sourceDocument: Xanadu API リファレンス
sourceDocumentLink: https://www.servicenow.com/docs/r/ja-JP/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - ja-JP

ft:publication_title :

    - Xanadu API リファレンス

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# NotifyScoped - スコープ指定

# NotifyScoped - スコープ指定 {#ariaid-title1}

* リリースバージョン: Xanadu
* 
* 更新日 2024年08月01日
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 所要時間：21分

NotifyScoped API を使用すると、スクリプトを使用して Notify コールと SMS メッセージを操作できます。

NotifyScoped クラスとそれに関連するメソッドを `sn_notify` 名前空間から実行します。

## NotifyScoped - call(文字列 notifyPhoneNumber, 文字列 toPhoneNumber, GlideRecord conferenceCall, GlideRecord conferenceCallRecord, 文字列 userSysId, 文字列 groupSysId, GlideRecord sourceRecord) {#ariaid-title2}

指定された E.164 準拠の電話番号に電話をかけます。
{#NotifyScoped-call_S_S_GR_GR_S_S_GR__table_qk4_txx_zfb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| notifyPhoneNumber | 文字列 | コールの発信元の Notify 電話番号。コールを開始すると、この番号に関連付けられた番号グループの発信コールワークフローが実行されます。このワークフローに、ユーザーを電話会議に接続するための電話会議に参加アクティビティが含まれていることを確認します。 |
| toPhoneNumber | 文字列 | コールする電話番号。コール先の番号が電話会議に追加されます。 |
| conferenceCall | GlideRecord | オプション。このパラメーターが渡されると、toPhoneNumber パラメーターで識別された発信者が、このレコードで識別された電話会議に自動的に参加します。 電話会議レコードを識別する Notify コール \[notify_call\] テーブルの GlideRecord。このレコードは、workflow.scratchpad.conference_call 変数として発信コールワークフローのスクラッチパッドに自動的に追加されます。 |
| userSysId | 文字列 | オプション。コールに関連付けられたユーザーの一意の識別子 (sys_id)。 |
| groupSysId | 文字列 | オプション。コールに関連付けられたグループの一意の識別子 (sys_id)。 |
| sourceRecord | GlideRecord | オプション。このコールを要求したソースレコード。 |
[表 : 1. パラメーター]

{#NotifyScoped-call_S_S_GR_GR_S_S_GR__table_qk4_txx_zfb} {#NotifyScoped-call_S_S_GR_GR_S_S_GR__table_rk4_txx_zfb__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 2. 返される内容]

{#NotifyScoped-call_S_S_GR_GR_S_S_GR__table_rk4_txx_zfb}  
この例は、別の電話番号へのコールを開始する方法を示しています。

    var from = '+14048007337';
    var to = '+31646810495';

    // set up call
    new sn_notify.NotifyScoped().call(from, to);

この例は、電話番号のリストへのコールを開始し、リスト内の番号を新しい電話会議に自動的に参加させる方法を示しています。

    var notify = new sn_notify.NotifyScoped();
    var from = '+14041234567';
    var participants = ['+31612345678', '+31623456789', '+31687654321'];

    // set up a conference call
    var conferenceCall = notify.conferenceCall();

    // set up the outbound calls for all conference call participants
    for (var i in participants) {
        var to = participants[i];
        notify.call(from, to, conferenceCall);
    }

## NotifyScoped - conferenceCall(GlideRecord sourceRecord) {#ariaid-title3}

新しい電話会議の GlideRecord を作成します。
{#NotifyScoped-conferenceCall__table_kcb_qcd_1gb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| sourceRecord | GlideRecord | オプション。電話会議の作成要求を開始したレコード。notify_conference_call レコードのソースとテーブルのフィールドに入力するために使用されます。 |
[表 : 3. パラメーター]

{#NotifyScoped-conferenceCall__table_kcb_qcd_1gb} {#NotifyScoped-conferenceCall__table_lcb_qcd_1gb__entry__2}

| タイプ | 説明 |
|-|-|
| GlideRecord | 新しい Notify 電話会議 \[notify_conference_call\] レコード。 |
[表 : 4. 返される内容]

{#NotifyScoped-conferenceCall__table_lcb_qcd_1gb}  

    var notify = new sn_notify.NotifyScoped();
    var from = '+14041234567';
    var participants = ['+31612345678', '+31623456789', '+31687654321'];

    // set up a conference call
    var conferenceCall = notify.conferenceCall();

    // set up the outbound calls for all conference call participants
    for (var i in participants) {
        var to = participants[i];
        notify.call(from, to, conferenceCall);
    }

## NotifyScoped - dequeueCall(GlideRecord callRecord) {#ariaid-title4}

コールがキュー (保留中) に入れられた後に再開します。
このメソッドを使用して、queueCall() メソッドでキューに入れられたコールを再開します。
{#NotifyScoped-dequeueCall_GR__table_pzh_vmd_1gb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| callRecord | GlideRecord | 再開する保留中のコールを含む Notify コール \[notify_call\] テーブルの GlideRecord オブジェクト。 |
[表 : 5. パラメーター]

{#NotifyScoped-dequeueCall_GR__table_pzh_vmd_1gb} {#NotifyScoped-dequeueCall_GR__table_qzh_vmd_1gb__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 6. 返される内容]

{#NotifyScoped-dequeueCall_GR__table_qzh_vmd_1gb}  
次の例は、保留中のコールを再アクティブ化する方法を示しています。

    var notifyCallGr = new GlideRecord('notify_call');
    notifyCallGr.get('active participant sys id');
     
    if (notifyCallGr.isValid) {
        sn_notify.NotifyScoped.dequeueCall(notifyCallGr);
    }

## NotifyScoped - forwardCall(GlideRecord call, 文字列 destination, 文字列 dtmf) {#ariaid-title5}

指定されたコールを別のコール受信者に転送します。
{#NotifyScoped-forwardCall_GR_S_S__table_bjm_332_1gb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| call | GlideRecord または文字列 | 転送するコールの Notify コールレコードまたは電話通信プロバイダーのコール ID。 |
| destination | GlideRecord または文字列 | コールの転送先となる発信者の Notify 電話番号レコードまたは E.164 準拠の電話番号。 |
| dtmf | 文字列 | Dual Tone - コール接続時に送信する Multi-Frequency (DTMF) コード。 |
[表 : 7. パラメーター]

{#NotifyScoped-forwardCall_GR_S_S__table_bjm_332_1gb} {#NotifyScoped-forwardCall_GR_S_S__table_cjm_332_1gb__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 8. 返される内容]

{#NotifyScoped-forwardCall_GR_S_S__table_cjm_332_1gb}  
次の例は、コールを別の電話番号に転送する方法を示しています。

    var callID = 'CA92374b5aa561dab476a7001db6026edc'; // Twilio Call ID
    var phoneNumber = '+91406xxxxxxx';
    var dtmfTones = null;
     
    var notifyCallGr = new GlideRecord('notify_call');
    notifyCallGr.get('active participant sys id');
     
    if (notifyCallGr.isValid) {
        sn_notify.NotifyScoped.forwardCall(notifyCallGr(or) callID, phoneNumber, dtmfTones)
    }

## NotifyScoped - getAvailableClients(文字列 notifyNumber) {#ariaid-title6}

コールを受信できるクライアントセッションのリストを返します。
{#NotifyScoped-getAvailableClients_S__table_ixd_kk2_1gb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| notifyNumber | 文字列 | 有効な Notify 電話番号。 |
[表 : 9. パラメーター]

{#NotifyScoped-getAvailableClients_S__table_ixd_kk2_1gb} {#NotifyScoped-getAvailableClients_S__table_jxd_kk2_1gb__entry__2}

| タイプ | 説明 |
|-|-|
| アレイ | 指定された電話番号の notify_client_session テーブルから取得された GlideRecord。 利用可能なクライアントセッションがない場合は「0」を返します。 |
[表 : 10. 返される内容]

{#NotifyScoped-getAvailableClients_S__table_jxd_kk2_1gb}  
次の例は、 getAvailableClients() メソッドを使用してnotify_client_sessionテーブルにインデックスを付け、利用可能なすべての通知クライアントを反復処理する方法を示しています。

    var clientSessionGr = sn_notify.NotifyScoped.getAvailableClients('+185xxxxxxxx'); 
    // Here clientSessionGr is of type GlideRecord on 'notify_client_session' table.
     
    var isLoggedInUserAvailable = false;
    while (clientSessionGr.next()) {
      if (clientSessionGr.user == gs.getUserID())
        isLoggedInUserAvailable = clientSessionGr.available;
    }
    gs.info('isLoggedInUserAvailable - ' + isLoggedInUserAvailable);

## NotifyScoped - getPhoneNumbers() {#ariaid-title7}

Notify で利用可能なすべての電話番号と短縮コードを返します。
{#NotifyScoped-getPhoneNumbers__table_kgn_1sc_1gb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 11. パラメーター]

{#NotifyScoped-getPhoneNumbers__table_kgn_1sc_1gb} {#NotifyScoped-getPhoneNumbers__table_lgn_1sc_1gb__entry__2}

| タイプ | 説明 |
|-|-|
| アレイ | NotifyPhoneNumber オブジェクトのリスト。各オブジェクトが、Notify で利用可能な 1 つの電話番号を表します。 |
[表 : 12. 返される内容]

{#NotifyScoped-getPhoneNumbers__table_lgn_1sc_1gb}  
この例は、Notify の電話番号を取得してリストを反復処理する方法を示しています。

    // Instantiate notify
    var notify = new sn_notify.NotifyScoped();

    // Retrieve all available phone numbers
    var phoneNumbers = notify.getPhoneNumbers();

    // Iterate over phone numbers
    for (var i = 0; i < phoneNumbers.length; i++) {
      var number = phoneNumbers[i];

      // Perform any actions using each phone number

    }

## NotifyScoped - getShortCodes() {#ariaid-title8}

Notify で利用可能なすべての短縮コードを返します。
{#NotifyScoped-getShortCodes__table_y3d_z5c_1gb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| なし |   |   |
[表 : 13. パラメーター]

{#NotifyScoped-getShortCodes__table_y3d_z5c_1gb} {#NotifyScoped-getShortCodes__table_z3d_z5c_1gb__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 14. 返される内容]

{#NotifyScoped-getShortCodes__table_z3d_z5c_1gb}  
この例は、Notify の短縮コードを取得してリストを反復処理する方法を示しています。

    // Instantiate notify
    var notify = new sn_notify.NotifyScoped();

    // Retrieve all available shortcodes
    var shortCodes = notify.getShortCodes();

    // Iterate over phone numbers
    for (var i = 0; i < shortCodes.length; i++) {
      var shortCode = shortCodes[i];
      gs.log(shortCode.getNumber());

    //perform any actions using each shortcode

    }

## NotifyScoped - getTokens(GlideRecord, record) {#ariaid-title9}

WebRTC またはモバイルクライアントで使用するアクティブな電話ドライバーのクライアントトークンを返します。
このメソッドは、現在ログインしているユーザーレコードをクライアントとして使用します。
{#NotifyScoped-getTokens_GR__table_dsj_lsl_1gb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| record | GlideRecord | Notify クライアントを識別するために使用する GlideRecord (グループレコードやユーザーレコードなど)。 |
[表 : 15. パラメーター]

{#NotifyScoped-getTokens_GR__table_dsj_lsl_1gb} {#NotifyScoped-getTokens_GR__table_esj_lsl_1gb__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | サポートされているドライバーの Web RTC トークン ({driverName1: "token1", driverName2: "token2"} 形式の JSON 文字列 ("TwilioDirect":"eyJhxxxx.eyJleHAiOiIxxxx.7fejxxx_mbLxxx" など) |
[表 : 16. 返される内容]

{#NotifyScoped-getTokens_GR__table_esj_lsl_1gb}  
この例は、現在ログインしているユーザーのクライアントトークンを取得する方法を示しています。

    // get Notify client Tokens per active Notify driver for the currently logged in user
    var json = new sn_notify.NotifyScoped().getTokens();
     
    // Parse the JSON that was return into a tokens object
    var tokens = JSON.parse(json);

    // Log line
    gs.log('Notify client tokens for the currently logged in user');

     // iterate over the driver tokens
    for (var driver in tokens) {
     	gs.log(driver + ' Driver token: ' + tokens[driver]);
    }

この例は、すべての Notify グループのクライアントトークンを取得する方法を示しています。

    // instantiate Notify
    var notify = new sn_notify.NotifyScoped.Notify();
     
    // get all Notify Groups
    var notifyGroup = new GlideRecord("notify_group");
    notifyGroup.query();
     
    // iterate over all notify groups
    while (notifyGroup.next()) {
      // generate Notify Client tokens per active Notify Driver for this group
      var json = notify.getTokens(notifyGroup);
      var tokens = JSON.parse(json);
     
      for (var driver in tokens) {
        gs.log(gs.getMessage("Notify Client token for {0} driver and Notify Group '{1}': {2}", [driver, notifyGroup.getValue('name'), tokens[driver]]));
      }
    }

この例は、アクティブな電話ドライバーのクライアントトークンを取得する方法を示しています。

    var notify = new sn_notify.NotifyScoped();
    var now_GR = new GlideRecord('sys_user');
    if (now_GR.get(gs.getUserID())) {
      gs.info(notify.getTokens(now_GR));
    }

出力：

    {"TwilioDirect":"eyJhxxxx.eyJleHAiOiIxxxx.7fejxxx_mbLxxx"}

## NotifyScoped - getTokenTTL(文字列 owner) {#ariaid-title10}

指定された電話ドライバーに対してクライアントセッションがアクティブな状態を維持する、自動タイムアウトまでの最大時間を返します。
{#NotifyScoped-getTokenTTL_S__table_kym_hl2_1gb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| owner | 文字列 | セッションの長さを取得する対象の電話ドライバーの名前。 有効な値： * Twilio：古いドライバーの場合 * TwilioDirect：新しいドライバーの場合 {#NotifyScoped-getTokenTTL_S__ul_ql5_vgc_1gb} |
[表 : 17. パラメーター]

{#NotifyScoped-getTokenTTL_S__table_kym_hl2_1gb} {#NotifyScoped-getTokenTTL_S__table_lym_hl2_1gb__entry__2}

| タイプ | 説明 |
|-|-|
| 整数 | セッションの最長時間 (単位：秒)。 デフォルト：1800 秒 |
[表 : 18. 返される内容]

{#NotifyScoped-getTokenTTL_S__table_lym_hl2_1gb}  
次の例は、このメソッドと関連する応答を正しく呼び出す方法を示しています。また、無効なドライバーが渡された場合に返されるものも示します。

    var owner = "TwilioDirect";  // Valid driver
    var ttl = SNC.Notify.getTokenTTL(owner);
    gs.info("Token TTL for " + owner + " --> " + ttl);
     
    owner = "Abcxyz";  // Invalid driver
    ttl = SNC.Notify.getTokenTTL(owner);
    // For an invalid driver, we throw NoSuchNotifyDriverException saying that Abcxyzdriver is not available
    // and return the default value of TTL
    gs.info("Token TTL for " + owner + " --> " + ttl); 

## NotifyScoped - hasCapability(文字列 notifyPhoneNumber, 文字列 capability) {#ariaid-title11}

指定された電話番号に指定された機能があるかどうかを判断します。
電話番号に関連付けられた電話ドライバーに、電話のすべての機能のリストが含まれています。  
注:  
ベースシステムでは、Notify JS ドライバーの機能としては「show_speakers」しかありませんが、これは変更可能です。
{#NotifyScoped-hasCapabilitiy_S_S__table_b3l_2n2_1gb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| notifyPhoneNumber | 文字列 | 指定された機能を確認する電話番号。 |
| capability | 文字列 | 検出対象の機能。文字列テキストが電話内のテキストと完全に一致する必要があります。 |
[表 : 19. パラメーター]

{#NotifyScoped-hasCapabilitiy_S_S__table_b3l_2n2_1gb} {#NotifyScoped-hasCapabilitiy_S_S__table_c3l_2n2_1gb__entry__2}

| タイプ | 説明 |
|-|-|
| ブーリアン | 指定された電話に指定された機能があるかどうかを示すフラグ。 * true：電話に機能がある * false：電話に機能がない {#NotifyScoped-hasCapabilitiy_S_S__ul_ryg_y2g_yfb} |
[表 : 20. 返される内容]

{#NotifyScoped-hasCapabilitiy_S_S__table_c3l_2n2_1gb}  
この例では、電話に特定の機能があるかどうかを確認する方法を示します。

    // Each driver has a defined set of capabilities.

    var capability = 'show_speakers';
    gs.info(sn_notify.NotifyScoped.hasCapability('+185xxxxxxxx', capability)); // true
     
    capability = 'send_sms';
    gs.info(sn_notify.NotifyScoped.hasCapability('+185xxxxxxxx', capability)); // false

## NotifyScoped - kick(GlideRecord participant) {#ariaid-title12}

指定された発信者を現在の Notify 電話会議から除外します。
{#NotifyScoped-kick_GR__table_iby_22d_1gb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| participant | GlideRecord | 電話会議から除外する発信者の Notify 参加者 \[notify_participant\] レコードを含む GlideRecord オブジェクト。 |
[表 : 21. パラメーター]

{#NotifyScoped-kick_GR__table_iby_22d_1gb} {#NotifyScoped-kick_GR__table_jby_22d_1gb__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 22. 返される内容]

{#NotifyScoped-kick_GR__table_jby_22d_1gb}  
この例は、通話から参加者を除外する方法を示しています。

    var participant = new GlideRecord('notify_participant');
    participant.get('<sys_id>');
    if (participant.isValid()) {
        new sn_notify.NotifyScoped().kick(participant);
    }

## NotifyScoped - modifyCall(GlideRecord callRecord, NotifyAction notifyAction) {#ariaid-title13}

アクティブな Notify 電話のコールで 1 つ以上のアクティビティを実行します。
コールの動作を変更するには、このメソッドを使用します。たとえば、コールの転送、音声の再生、強制切断などです。  
注:  
このメソッドのスコープ対象の実装では、カスタム Notify アクティビティのみがサポートされます。グローバル実装とは異なり、NotifyAction API は提供されません。カスタム通知アクティビティの作成方法の詳細については、「 [通知ワークフローアクティビティ](https://www.servicenow.com/docs/access?context=c_NotifyActivities&version=xanadu&pubname=xanadu-servicenow-platform&ft:locale=en-US)」を参照してください。
{#NotifyScoped-modifyCall_GR_NA__table_lyc_2kd_1gb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| callRecord | GlideRecord | アクションを適用するコールの Notify コール \[notify_call\] レコード。 |
| notifyAction | NotifyAction | コールで実行する 1 つ以上のアクティビティを記述する NotifyAction オブジェクト。 |
[表 : 23. パラメーター]

{#NotifyScoped-modifyCall_GR_NA__table_lyc_2kd_1gb} {#NotifyScoped-modifyCall_GR_NA__table_myc_2kd_1gb__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 24. 返される内容]

{#NotifyScoped-modifyCall_GR_NA__table_myc_2kd_1gb}

## NotifyScoped - mute(GlideRecord participantRecord) {#ariaid-title14}

指定した電話会議の参加者をミュートします。
{#NotifyScoped-mute_GR__table_gyh_5fd_1gb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| participantRecord | GlideRecord | notify_participant テーブルの、ミュート対象の参加者に対する GlideRecord。 |
[表 : 25. パラメーター]

{#NotifyScoped-mute_GR__table_gyh_5fd_1gb} {#NotifyScoped-mute_GR__table_hyh_5fd_1gb__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 26. 返される内容]

{#NotifyScoped-mute_GR__table_hyh_5fd_1gb}  
次の例は、発信者をミュートする方法を示しています。

    var notifyParticipantGr = new GlideRecord('notify_participant');
    notifyParticipantGr.get('active participant sys id');
     
    if (notifyParticipantGr.isValid) {
        sn_notify.NotifyScoped.mute(notifyParticipantGr);
    }

## NotifyScoped - queueCall(GlideRecord callRecord) {#ariaid-title15}

指定したコールをキューに格納します (保留)。
dequeueCall() メソッドを使用して、キューに格納されたコールを再開します。
{#NotifyScoped-queueCall_GR__table_k24_rld_1gb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| callRecord | GlideRecord | 保留する Notify コールレコード (notify_call テーブル) の GlideRecord オブジェクト。 |
[表 : 27. パラメーター]

{#NotifyScoped-queueCall_GR__table_k24_rld_1gb} {#NotifyScoped-queueCall_GR__table_l24_rld_1gb__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 28. 返される内容]

{#NotifyScoped-queueCall_GR__table_l24_rld_1gb}  

    var call = new GlideRecord('notify_call');
    call.get('<call record sys_id>');
    if (call.isValid()) {
        new sn_notify.NotifyScoped().queueCall(call);
    }

## NotifyScoped - sendBulkSMS(NotifyPhoneNumber notifyPhoneNumber, 文字列 toPhoneNumbers, 文字列 messageBody, GlideRecord source) {#ariaid-title16}

指定した SMS メッセージを、Notify クライアント (電話番号) の指定されたリストに送信します。
{#NotifyScoped-sendBulkSMS_NPN_S_S_GR__table_ss5_g1d_1gb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| notifyPhoneNumber | [NotifyPhoneNumber](https://www.servicenow.com/docs/e4aTH_KvR7RBHdl7p_FLZg#NPNScopedAPI "NotifyPhoneNumber API を使用すると、Notify 電話番号に関する情報をクエリーできます。") | SMS メッセージの送信元となる電話番号。 |
| toPhoneNumbers | 文字列 | SMS メッセージの送信先の電話番号のカンマ区切りリスト。 フォーマット：E.164 準拠 |
| messageBody | 文字列 | 送信する SMS テキスト。 |
| source | [GlideRecord](https://www.servicenow.com/docs/DKnkjnu3r0c8j~e5s2NNhg#c_GlideRecordScopedAPI "スコープ付き GlideRecord API はデータベース操作に使用されます。") | インシデントなど、この SMS メッセージを要求したソースレコード。 |
[表 : 29. パラメーター]

{#NotifyScoped-sendBulkSMS_NPN_S_S_GR__table_ss5_g1d_1gb} {#NotifyScoped-sendBulkSMS_NPN_S_S_GR__table_ts5_g1d_1gb__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | Null |
[表 : 30. 返される内容]

{#NotifyScoped-sendBulkSMS_NPN_S_S_GR__table_ts5_g1d_1gb}  
この例では、複数の電話番号に SMS メッセージを送信する (一括 SMS) 方法を示します。

    var incidentGr = new GlideRecord('incident');
    incidentGr.get('active incident sys_id');
    if (incidentGr.isValid()) {
        sn_notify.NotifyScoped.sendBulkSMS('+15413970605', ['+919885XXXXXX', '+919775XXXXXX'], 'Test automation message', incidentGr);
    }

## NotifyScoped - sendSMS(NotifyPhoneNumber notifyPhoneNumber, 文字列 toPhoneNumber, 文字列 messageBody, GlideRecord source) {#ariaid-title17}

SMS テキストメッセージを E.164 に準拠した電話番号に送信します。
このメソッドは、Notify メッセージ \[notify_message\] テーブルに新しいレコードを作成し、それをソースレコードに関連付けます。
{#NotifyScoped-sendSMS_NPN_S_S_GR__table_zjt_1yc_1gb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| notifyPhoneNumber | [NotifyPhoneNumber](https://www.servicenow.com/docs/e4aTH_KvR7RBHdl7p_FLZg#NPNScopedAPI "NotifyPhoneNumber API を使用すると、Notify 電話番号に関する情報をクエリーできます。") | この SMS メッセージの送信先となる Notify の電話番号または短縮コード。 |
| toPhoneNumber | 文字列 | SMS メッセージの送信先となる E.164 に準拠した電話番号。 |
| messageBody | 文字列 | SMS テキストメッセージ。 |
| source | [GlideRecord](https://www.servicenow.com/docs/DKnkjnu3r0c8j~e5s2NNhg#c_GlideRecordScopedAPI "スコープ付き GlideRecord API はデータベース操作に使用されます。") | インシデントなど、この SMS メッセージを要求したソースレコード。 |
[表 : 31. パラメーター]

{#NotifyScoped-sendSMS_NPN_S_S_GR__table_zjt_1yc_1gb} {#NotifyScoped-sendSMS_NPN_S_S_GR__table_akt_1yc_1gb__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | 一意のメッセージ SID。Notify メッセージ \[notify_message\] レコードに message_id として格納されます。 |
[表 : 32. 返される内容]

{#NotifyScoped-sendSMS_NPN_S_S_GR__table_akt_1yc_1gb}  
次の例は、SMS メッセージを送信する方法を示しています。

    var incidentGr = new GlideRecord('incident');
    incidentGr.get('active incident sys_id');
    if (incidentGr.isValid()) {
        sn_notify.NotifyScoped.sendSMS('+15413970605', '+919885XXXXXX', 'Test automation message', incidentGr);
    }

## NotifyScoped - unmute(GlideRecord participantRecord) {#ariaid-title18}

指定した電話会議の参加者のミュート状態を解除します。
{#NotifyScoped-unmute_GR__table_zk1_qgd_1gb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| participantRecord | GlideRecord | notify_participant テーブルの、ミュート解除の対象の参加者に対する GlideRecord。 |
[表 : 33. パラメーター]

{#NotifyScoped-unmute_GR__table_zk1_qgd_1gb} {#NotifyScoped-unmute_GR__table_al1_qgd_1gb__entry__2}

| タイプ | 説明 |
|-|-|
| なし |   |
[表 : 34. 返される内容]

{#NotifyScoped-unmute_GR__table_al1_qgd_1gb}  
この例では、指定されたコール参加者のミュートを解除する方法を示します。

    var notifyParticipantGr = new GlideRecord('notify_participant');
    notifyParticipantGr.get('active participant sys id');
     
    if (notifyParticipantGr.isValid) {
        sn_notify.NotifyScoped.unmute(notifyParticipantGr);
    }


