---
sourceDocument: Xanadu API リファレンス
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ja-JP/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - ja-JP

ft:publication_title :

    - Xanadu API リファレンス

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# NotifyAction - グローバル

# NotifyAction - グローバル {#ariaid-title1}

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

NotifyAction API を使用すると、電話通信プロバイダーに送信するアクションを定義できます。

NotifyAction オブジェクトにアクションを追加するには、アクションのタイプごとにそれぞれの add 関数を呼び出します。各 add 関数は、 addSay() メソッドの SayAction オブジェクトなどの Action オブジェクトを返します。返されるオブジェクトの詳細については、各メソッドの例を参照してください。  
注:  
NotifyAction API はグローバルアプリケーション内でのみ有効です。スコープ対象のアプリケーションでこのタイプの機能を使用するには、カスタムの Notify ワークフローアクティビティを作成する必要があります。これらのアクティビティの作成の詳細については、「 [通知ワークフローアクティビティ](https://www.servicenow.com/docs/access?context=c_NotifyActivities&version=xanadu&pubname=xanadu-servicenow-platform&ft:locale=en-US)」を参照してください。

## NotifyAction - addConference() {#ariaid-title2}

現在のコールを現在の電話会議に移動する会議アクションを追加します。
{#r_NotifyAction-addConference__table_ef5_xg4_wr__entry__3}

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

{#r_NotifyAction-addConference__table_ef5_xg4_wr} {#r_NotifyAction-addConference__table_ff5_xg4_wr__entry__2}

| タイプ | 説明 |
|-|-|
| ConferenceAction | NotifyAction オブジェクトに追加されたアクション。電話会議の名前や、参加者が参加または退席するときの電話会議の動作を定義するには、ConferenceAction オブジェクトを使用します。 |
[表 : 2. 返される内容]

{#r_NotifyAction-addConference__table_ff5_xg4_wr}  
この例は、会議アクションを追加して会議の名前を設定する方法を示します。

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a conference call action and set its name
    var conference = notifyAction.addConference();
    conference.setName('Brown Bag: Week 3');

## NotifyAction - addConference.setEndOnExit(ブーリアン endOnExit) {#ariaid-title3}

指定された発信者が電話会議を退出したときに電話会議を終了するかどうかを定義します。
{#NotifyAction-addConference_setEndOnExit_B__table_j33_tmc_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| endOnExit | ブーリアン | 指定された発信者が現在の電話会議を退出したときに電話会議を終了するかどうかを示すフラグ。 * true：指定された発信者が電話会議を退出したときに電話会議を終了する * false：デフォルト。すべての参加者が退出したら電話会議を終了する {#NotifyAction-addConference_setEndOnExit_B__ul_bcw_4fc_cgb} |
[表 : 3. パラメーター]

{#NotifyAction-addConference_setEndOnExit_B__table_j33_tmc_cgb} {#NotifyAction-addConference_setEndOnExit_B__table_k33_tmc_cgb__entry__2}

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

{#NotifyAction-addConference_setEndOnExit_B__table_k33_tmc_cgb}  
この例では、電話会議アクションを追加し、指定された発信者が退出したら電話会議を終了するように設定する方法を示します。

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a conference call action and set the caller that starts the meeting
    var conference = notifyAction.addConference();

    // retrieve the participant for which the conference call should exit when they leave
    var notifyParticipantGr = new GlideRecord('notify_participant');
    notifyParticipantGr.get('active participant sys id');
     
    if (notifyParticipantGr.isValid) {
    conference.setEndOnExit(true);
    }

## NotifyAction - addConference.setHangupOnStar(ブーリアン hangupOnStar) {#ariaid-title4}

参加者が星印 (\*) キーを押したときに電話会議を終了するかどうかを定義します。
{#NotifyAction-addConference_setHangupOnStar_B__table_kjb_jkc_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| hangupOnStar | ブーリアン | 参加者が星印 (\*) キーを押したら電話会議を終了するかどうかを示すフラグ。 有効な値： * true：電話会議を終了する * false：デフォルト。電話会議を終了しない {#NotifyAction-addConference_setHangupOnStar_B__ul_bcw_4fc_cgb} |
[表 : 5. パラメーター]

{#NotifyAction-addConference_setHangupOnStar_B__table_kjb_jkc_cgb} {#NotifyAction-addConference_setHangupOnStar_B__table_ljb_jkc_cgb__entry__2}

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

{#NotifyAction-addConference_setHangupOnStar_B__table_ljb_jkc_cgb}  
この例は、会議アクションを追加して電話会議を記録する方法を示します。

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a conference call action and set the hang up action
    var conference = notifyAction.addConference();
    conference.setHangupOnStar(true);

## NotifyAction - addConference.setMuted(ブーリアン muted) {#ariaid-title5}

指定した発信者を現在の電話会議内でミュートするかどうかを定義します。
このメソッドを呼び出さない場合、デフォルトで発信者はミュートされません。
{#NotifyAction-addConference_setMuted_B__table_zws_qgc_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| muted | ブーリアン | 指定した発信者を現在の電話会議内でミュートするかどうかを示すフラグ。 * true：発信者をミュートする必要あり * false：デフォルト。発信者をミュートしない {#NotifyAction-addConference_setMuted_B__ul_bcw_4fc_cgb} |
[表 : 7. パラメーター]

{#NotifyAction-addConference_setMuted_B__table_zws_qgc_cgb} {#NotifyAction-addConference_setMuted_B__table_axs_qgc_cgb__entry__2}

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

{#NotifyAction-addConference_setMuted_B__table_axs_qgc_cgb}  
この例は、会議アクションを追加して指定した発信者をミュートする方法を示します。

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a conference call action and set it to mute the specified participant
    var conference = notifyAction.addConference();

    var notifyParticipantGr = new GlideRecord('notify_participant');
    notifyParticipantGr.get('active participant sys id');
     
    if (notifyParticipantGr.isValid) {
    conference.setMuted(true);
    }

## NotifyAction - addConference.setName(文字列 name) {#ariaid-title6}

現在の電話会議の名前を指定された名前に設定します。
{#NotifyAction-addConference_setName_S__table_okj_rcc_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| name | 文字列 | 現在の電話会議に関連付ける名前。 |
[表 : 9. パラメーター]

{#NotifyAction-addConference_setName_S__table_okj_rcc_cgb} {#NotifyAction-addConference_setName_S__table_pkj_rcc_cgb__entry__2}

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

{#NotifyAction-addConference_setName_S__table_pkj_rcc_cgb}  
この例は、会議アクションを追加して電話会議の名前を設定する方法を示します。

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a conference call action and set its name
    var conference = notifyAction.addConference();

    conference.setName('Brown Bag: Week 3');

## NotifyAction - addConference.setRecord(ブーリアン record) {#ariaid-title7}

関連付けられた電話会議を記録するかどうかを定義します。
このメソッドを呼び出さない場合、デフォルトで電話会議は記録されません。
{#NotifyAction-addConference_setRecord_B__table_bz2_ffc_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| record | ブーリアン | 現在の電話会議を記録するかどうかを示すフラグ。 * true：電話会議の記録を開始する * false：デフォルト。電話会議は録音されません。記録中の場合は記録が停止されます。 {#NotifyAction-addConference_setRecord_B__ul_bcw_4fc_cgb} |
[表 : 11. パラメーター]

{#NotifyAction-addConference_setRecord_B__table_bz2_ffc_cgb} {#NotifyAction-addConference_setRecord_B__table_cz2_ffc_cgb__entry__2}

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

{#NotifyAction-addConference_setRecord_B__table_cz2_ffc_cgb}  
この例は、会議アクションを追加して電話会議を記録する方法を示します。

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a conference call action and set it to be recorded
    var conference = notifyAction.addConference();
    conference.setRecord(true);

## NotifyAction - addConference.setStartOnEnter(ブーリアン startOnEnter) {#ariaid-title8}

指定された発信者が電話会議に参加したときに電話会議を開始するかどうかを定義します。
デフォルトでは、発信者が 2 人以上いれば必ず電話会議が開始されます。特定の発信者が参加したときにのみ電話会議が開始されるようにするには、他の発信者それぞれに対してこのメソッドを呼び出し、値を「false」に設定する必要があります。そうすると、目的のユーザーが電話会議に参加するまで電話会議は開始されません。
{#NotifyAction-addConference_setStartOnEnter_B__table_dps_43c_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| startOnEnter | ブーリアン | 選択された発信者が現在の電話会議に参加したら電話会議を開始するかどうかを示すフラグ。 * true：デフォルト。指定された発信者が電話会議に参加したら電話会議を開始する。 * false：指定された発信者が追加された後に電話会議を開始する {#NotifyAction-addConference_setStartOnEnter_B__ul_bcw_4fc_cgb} |
[表 : 13. パラメーター]

{#NotifyAction-addConference_setStartOnEnter_B__table_dps_43c_cgb} {#NotifyAction-addConference_setStartOnEnter_B__table_eps_43c_cgb__entry__2}

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

{#NotifyAction-addConference_setStartOnEnter_B__table_eps_43c_cgb}  
この例では、電話会議アクションを追加し、指定された発信者が参加するまで電話会議が開始しないように設定する方法を示します。

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a conference call action and set the caller that starts the meeting
    var conference = notifyAction.addConference();

    // retrieve the participant for which the conference call should start when they arrive
    var notifyParticipantGr = new GlideRecord('notify_participant');
    notifyParticipantGr.get('active participant sys id');
     
    if (notifyParticipantGr.isValid) {
    conference.setStartOnEnter(true);
    }

## NotifyAction - addDial() {#ariaid-title9}

指定された電話番号または Notify クライアントにコールを転送します。
addDial アクションを作成したら、関連する電話番号 (setPhoneNumber()) または Notify クライアント (setClientRecord()) も設定する必要があります。
{#r_NotifyAction-addDial__table_ef5_xg4_wr__entry__3}

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

{#r_NotifyAction-addDial__table_ef5_xg4_wr} {#r_NotifyAction-addDial__table_ff5_xg4_wr__entry__2}

| タイプ | 説明 |
|-|-|
| DialAction | NotifyAction オブジェクトに追加されたアクション。 |
[表 : 16. 返される内容]

{#r_NotifyAction-addDial__table_ff5_xg4_wr}  
この例では、発信コールを行ってコールを記録する方法を示します。

    // Initialize NotifyAction
    var notifyAction = new SNC.NotifyAction();
     
    // Call addDial() to connect to another party -- this returns an object of type DialAction
    var dialAction = notifyAction.addDial();
     
    // Call setPhoneNumber(String phoneNumber)in DialAction.java to specify the phone number to dial
    dialAction.setPhoneNumber('+919765xxxxxxx');
     
    // Invoke setRecord(Boolean record) to record the call to this new number +919765xxxxxxx
    dialAction.setRecord(true);

## NotifyAction - addDial.setCallerID(文字列 callerID) {#ariaid-title10}

発信コールの発信者 ID を定義します。
{#NotifyAction-addDial_setCallerID_S__table_ehj_hzc_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| callerID | 文字列 | 発信コールに設定する発信者識別子。 |
[表 : 17. パラメーター]

{#NotifyAction-addDial_setCallerID_S__table_ehj_hzc_cgb} {#NotifyAction-addDial_setCallerID_S__table_fhj_hzc_cgb__entry__2}

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

{#NotifyAction-addDial_setCallerID_S__table_fhj_hzc_cgb}  
この例では、発信コールを行ってコールのタイムアウトを設定する方法を示します。

    // Initialize NotifyAction
    var notifyAction = new SNC.NotifyAction();
     
    // Call addDial() to connect to another party -- this returns an object of type DialAction
    var dialAction = notifyAction.addDial();
     
    // Call setPhoneNumber(String phoneNumber)in DialAction.java to specify the phone number to dial
    dialAction.setPhoneNumber('+919765xxxxxxx');
     
    // Set the caller ID
    dialAction.setCallerID('Planning Conf Call');

## NotifyAction - addDial.setClientRecord(文字列 tableName, 文字列 sysID) {#ariaid-title11}

Notify の発信者レコードと発信者の一意の識別子を検索するテーブルを指定して、現在の発信者を Notify の発信者に設定します。
{#NotifyAction-addDial_setClientRecord_S_S__table_mmn_zbd_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| tableName | 文字列 | 目的の発信者の情報を含むテーブルの名前。 |
| sysID | 文字列 | 目的の Notify 発信者の一意の識別子 (sys_id)。 |
[表 : 19. パラメーター]

{#NotifyAction-addDial_setClientRecord_S_S__table_mmn_zbd_cgb} {#NotifyAction-addDial_setClientRecord_S_S__table_nmn_zbd_cgb__entry__2}

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

{#NotifyAction-addDial_setClientRecord_S_S__table_nmn_zbd_cgb}  
この例では、setClientRecord() を使用して現在の発信者を Notify の発信者に設定する方法を示します。

    // set up a dial action to forward the
    // call to the specified client
    var action = new SNC.NotifyAction();
    var dial = action.addDial();
    dial.setClientRecord(notifyClientRecord.getTableName(), notifyClientRecord.getUniqueValue());
    dial.setTimeout(activity.vars.timeout);
    dial.setRecord(activity.vars.record);

## NotifyAction - addDial.setDTMF(文字列 value) {#ariaid-title12}

コールが接続されたときに再生する DTMF トーンを定義します。
{#NotifyAction-addDial_setDTMF_S__table_ult_2fd_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| value | 文字列 | コールが接続されたときに再生する有効な DTMF の番号。 |
[表 : 21. パラメーター]

{#NotifyAction-addDial_setDTMF_S__table_ult_2fd_cgb} {#NotifyAction-addDial_setDTMF_S__table_vlt_2fd_cgb__entry__2}

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

{#NotifyAction-addDial_setDTMF_S__table_vlt_2fd_cgb}  
この例では、発信コールを行ってコールの接続時に再生する DTMF トーンを定義する方法を示します。

    // Initialize NotifyAction
    var notifyAction = new SNC.NotifyAction();
     
    // Call addDial() to connect to another party - this returns an object of type DialAction
    var dialAction = notifyAction.addDial();
     
    // Call setPhoneNumber(String phoneNumber)in DialAction.java to specify the phone number to dial
    dialAction.setPhoneNumber('+919765xxxxxxx');
     
    // DTMF tones to play when call connects
    dialAction.setDTMF("1246AF");

## NotifyAction - addDial.setHangupOnStar(ブーリアン hangupOnStar) {#ariaid-title13}

星印 (\*) キーが押されたときにコールを終了するかどうかを定義します。
{#NotifyAction-addDial_setHangupOnStar_B__table_uns_2gd_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| hangupOnStar | ブーリアン | 星印 (\*) キーが押されたときにコールを終了するかどうかを示すフラグ。 * true：コールを終了する * false：コールを終了しない {#NotifyAction-addDial_setHangupOnStar_B__ul_bcw_4fc_cgb} |
[表 : 23. パラメーター]

{#NotifyAction-addDial_setHangupOnStar_B__table_uns_2gd_cgb} {#NotifyAction-addDial_setHangupOnStar_B__table_vns_2gd_cgb__entry__2}

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

{#NotifyAction-addDial_setHangupOnStar_B__table_vns_2gd_cgb}  
この例では、発信コールを行って切断キーを星印に設定する方法を示します。

    // Initialize NotifyAction
    var notifyAction = new SNC.NotifyAction();
     
    // Call addDial() to connect to another party -- this returns an object of type DialAction
    var dialAction = notifyAction.addDial();
     
    // Call setPhoneNumber(String phoneNumber)in DialAction.java to specify the phone number to dial
    dialAction.setPhoneNumber('+919765xxxxxxx');
     
    // End call by pressing star
    dialAction.setHangupOnStar(true);

## NotifyAction - addDial.setPhoneNumber(文字列 phoneNumber) {#ariaid-title14}

発信先の電話番号を定義します。
{#NotifyAction-addDial_setPhoneNumber_S__table_cdc_f1d_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| phoneNumber | 文字列 | 発信先の E.164 準拠の電話番号。 |
[表 : 25. パラメーター]

{#NotifyAction-addDial_setPhoneNumber_S__table_cdc_f1d_cgb} {#NotifyAction-addDial_setPhoneNumber_S__table_ddc_f1d_cgb__entry__2}

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

{#NotifyAction-addDial_setPhoneNumber_S__table_ddc_f1d_cgb}  
この例では、発信コールを行ってコールのタイムアウトを設定する方法を示します。

    // Initialize NotifyAction
    var notifyAction = new SNC.NotifyAction();
     
    // Call addDial() to connect to another party -- this returns an object of type DialAction
    var dialAction = notifyAction.addDial();
     
    // Call setPhoneNumber(String phoneNumber)in DialAction.java to specify the phone number to dial
    dialAction.setPhoneNumber('+919765xxxxxxx');

## NotifyAction - addDial.setRecord(ブーリアン record) {#ariaid-title15}

発信コールを記録するかどうかを定義します。
{#NotifyAction-addDial_setRecord_B__table_hbp_sdd_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| record |   | 発信コールを記録するかどうかを示すフラグ。 有効な値： * true：発信コールを記録する * false：発信コールを記録しない {#NotifyAction-addDial_setRecord_B__ul_z5r_22d_cgb} |
[表 : 27. パラメーター]

{#NotifyAction-addDial_setRecord_B__table_hbp_sdd_cgb} {#NotifyAction-addDial_setRecord_B__table_ibp_sdd_cgb__entry__2}

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

{#NotifyAction-addDial_setRecord_B__table_ibp_sdd_cgb}  
この例では、発信コールを行ってコールを記録する方法を示します。

    // Initialize NotifyAction
    var notifyAction = new SNC.NotifyAction();
     
    // Call addDial() to connect to another party -- this returns an object of type DialAction
    var dialAction = notifyAction.addDial();
     
    // Call setPhoneNumber(String phoneNumber)in DialAction.java to specify the phone number to dial
    dialAction.setPhoneNumber('+919765xxxxxxx');
     
    // Record the call
    dialAction.setRecord(true);

## NotifyAction - addDial.setTimeout(整数 timeout) {#ariaid-title16}

発信コールがタイムアウトするまでの時間を秒単位で設定します。
{#NotifyAction-addDial_setTimeout_I__table_ldb_hyc_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| timeout | 整数 | 発信コールがタイムアウトするまでの秒数。デフォルト：30 |
[表 : 29. パラメーター]

{#NotifyAction-addDial_setTimeout_I__table_ldb_hyc_cgb} {#NotifyAction-addDial_setTimeout_I__table_mdb_hyc_cgb__entry__2}

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

{#NotifyAction-addDial_setTimeout_I__table_mdb_hyc_cgb}  
この例では、発信コールを行ってコールのタイムアウトを設定する方法を示します。

    // Initialize NotifyAction
    var notifyAction = new SNC.NotifyAction();
     
    // Call addDial() to connect to another party -- this returns an object of type DialAction
    var dialAction = notifyAction.addDial();
     
    // Call setPhoneNumber(String phoneNumber)in DialAction.java to specify the phone number to dial
    dialAction.setPhoneNumber('+919765xxxxxxx');
     
    // Set the number of seconds to wait before timing out
    dialAction.setTimeout(45);

## NotifyAction - addGather() {#ariaid-title17}

指定したインタラクティブ電話メニューを発信者の画面に表示します。
{#r_NotifyAction-addGather__table_crt_zg4_wr__entry__3}

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

{#r_NotifyAction-addGather__table_crt_zg4_wr} {#r_NotifyAction-addGather__table_drt_zg4_wr__entry__2}

| タイプ | 説明 |
|-|-|
| GatherAction | NotifyAction オブジェクトに追加されたアクション。GatherAction オブジェクトを使用して、ユーザーの画面に表示するメニュー設定とオプションを定義します。 |
[表 : 32. 返される内容]

{#r_NotifyAction-addGather__table_drt_zg4_wr}  

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // present the user with a menu
    var gather = notifyAction.addGather();
    gather.setNumberOfDigits(1);    // the user can type 1 digit
    gather.setFinishKey('#');       // # or *, useful for > 1 digit
    gather.setTimeout(10);          // time to enter answer, in seconds

    // add first menu item
    var usSay = gather.addSay();
    usSay.setText('Press 1 for english');
    usSay.setLanguage('en-US');

    // add second menu item
    var nlSay = gather.addSay();
    nlSay.setText('Kies 2 voor Nederlands');
    nlSay.setLanguage('nl-NL');

    // add third menu item
    var frSay = gather.addSay();
    frSay.setText('Choisissez 3 pour le français.');
    frSay.setLanguage('fr-FR');

    // and finish off with an applause
    var play = gather.addPlay();
    play.setURL('http://www.wavsource.com/snds_2015-04-12_5971820382841326/sfx/applause_y.wav');

## NotifyAction - addGather.addPlay() {#ariaid-title18}

コール中にオーディオファイルを再生します。
サポートされている子メソッドの説明については、NotifyAction addPlay() メソッドを参照してください。
{#NotifyAction-addGather_addPlay__table_uhd_mpd_cgb__entry__3}

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

{#NotifyAction-addGather_addPlay__table_uhd_mpd_cgb} {#NotifyAction-addGather_addPlay__table_vhd_mpd_cgb__entry__2}

| タイプ | 説明 |
|-|-|
| PlayAction | NotifyAction オブジェクトに追加されたアクション。PlayAction オブジェクトを使用して、オーディオファイルの URL とオーディオをループさせる回数を定義します。 |
[表 : 34. 返される内容]

{#NotifyAction-addGather_addPlay__table_vhd_mpd_cgb}  

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // Create the gather action object
    var gather = notifyAction.addGather();

    // Play an audio file
    var play = gather.addPlay();
    play.setURL('http://www.wavsource.com/snds_2015-04-12_5971820382841326/sfx/applause_y.wav');

## NotifyAction - addGather.addSay() {#ariaid-title19}

コール中に読み上げるテキスト読み上げを定義します。
サポートされている子メソッドの説明については、NotifyAction addSay() メソッドを参照してください。
{#NotifyAction-addGather_addSay__table_cp4_znd_cgb__entry__3}

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

{#NotifyAction-addGather_addSay__table_cp4_znd_cgb} {#NotifyAction-addGather_addSay__table_dp4_znd_cgb__entry__2}

| タイプ | 説明 |
|-|-|
| SayAction | NotifyAction オブジェクトに追加されたアクション。SayAction オブジェクトを使用して、読み上げるテキストと言語を定義します。 |
[表 : 36. 返される内容]

{#NotifyAction-addGather_addSay__table_dp4_znd_cgb}  

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // present the user with a menu
    var gather = notifyAction.addGather();
    gather.setNumberOfDigits(1);    // the user can type 1 digit
    gather.setTimeout(20);          // time to enter answer, in seconds

    // add first menu item
    var gatherSay = gather.addSay();
    gatherSay.setText('Press 1 for english');
    gatherSay.setLanguage('en-US');

## NotifyAction - addGather.setFinishKey(文字列 finishKey) {#ariaid-title20}

入力の終了を示すために発信者が入力するキーを定義します。
{#NotifyAction-addGather_setFinishKey_S__table_pk1_hmd_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| finishKey | 文字列 | 発信者の入力の終了を示すキー。 有効な値： * 0 ～ 9 * # (デフォルト) * \* {#NotifyAction-addGather_setFinishKey_S__ul_vv3_vhd_cgb} |
[表 : 37. パラメーター]

{#NotifyAction-addGather_setFinishKey_S__table_pk1_hmd_cgb} {#NotifyAction-addGather_setFinishKey_S__table_qk1_hmd_cgb__entry__2}

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

{#NotifyAction-addGather_setFinishKey_S__table_qk1_hmd_cgb}  
この例は、収集アクションを追加して、発信者入力の終了を示すキーを定義する方法を示しています。

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    var gather = notifyAction.addGather();
    gather.setNumberOfDigits(4);    // the user can type four digit
    gather.setFinishKey('#');       // # or *, useful for > 1 digit

## NotifyAction - addGather.setNumberOfDigits(整数 numberOfDigits) {#ariaid-title21}

収集する桁数を定義します。
{#NotifyAction-addGather_setNumberOfDigits_I__table_f2w_3ld_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| numberOfDigits | 整数 | 収集する桁数。ゼロは無効な値です。 |
[表 : 39. パラメーター]

{#NotifyAction-addGather_setNumberOfDigits_I__table_f2w_3ld_cgb} {#NotifyAction-addGather_setNumberOfDigits_I__table_g2w_3ld_cgb__entry__2}

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

{#NotifyAction-addGather_setNumberOfDigits_I__table_g2w_3ld_cgb}  
この例では、収集アクションを追加し、収集するキーストロークの回数を定義する方法を示します。

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // present the user with a menu
    var gather = notifyAction.addGather();
    gather.setNumberOfDigits(4);    // the user can type four digit
    gather.setFinishKey('#');       // # or *, useful for > 1 digits
    gather.setTimeout(20);          // time to enter answer, in seconds

## NotifyAction - addGather.setTimeout(整数 timeout) {#ariaid-title22}

入力の収集がタイムアウトするまでの時間を定義します。
{#NotifyAction-addGather_setTimeout_I__table_ej2_1nd_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| timeout | 整数 | 発信者の入力がタイムアウトするまでに待機する秒数。デフォルト：10 |
[表 : 41. パラメーター]

{#NotifyAction-addGather_setTimeout_I__table_ej2_1nd_cgb} {#NotifyAction-addGather_setTimeout_I__table_fj2_1nd_cgb__entry__2}

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

{#NotifyAction-addGather_setTimeout_I__table_fj2_1nd_cgb}  
この例は、収集アクションを追加し、入力のタイムアウトの値を定義する方法を示しています。

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // present the user with a menu
    var gather = notifyAction.addGather();
    gather.setNumberOfDigits(4);    // the user can type 1 digit
    gather.setFinishKey('#');       // # or *, useful for > 1 digits
    gather.setTimeout(20);          // time to enter answer, in seconds

## NotifyAction - addHangUp() {#ariaid-title23}

アクティブな通話を終了します。
{#r_NotifyAction-addHangUp__table_tqt_lh4_wr__entry__3}

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

{#r_NotifyAction-addHangUp__table_tqt_lh4_wr} {#r_NotifyAction-addHangUp__table_uqt_lh4_wr__entry__2}

| タイプ | 説明 |
|-|-|
| HangUpAction | NotifyAction オブジェクトに追加されたアクション。 |
[表 : 44. 返される内容]

{#r_NotifyAction-addHangUp__table_uqt_lh4_wr}  

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // hang up
    notifyAction.addHangUp();

## NotifyAction - addQueue() {#ariaid-title24}

コールをキューに入れて保留します。
{#r_NotifyAction-addQueue__table_e5b_j24_wr__entry__3}

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

{#r_NotifyAction-addQueue__table_e5b_j24_wr} {#r_NotifyAction-addQueue__table_f5b_j24_wr__entry__2}

| タイプ | 説明 |
|-|-|
| QueueAction | NotifyAction オブジェクトに追加されたアクション。QueueAction オブジェクトを使用して、キュー名、およびキューへの追加と取り出しの動作を定義します。 |
[表 : 46. 返される内容]

{#r_NotifyAction-addQueue__table_f5b_j24_wr}  
この例は、指定したキューにコールを追加する方法を示しています。

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // queue the call
    var queue = notifyAction.addQueue();
    queue.setName('my queue');

この例は、キューからコールを取り出す方法を示しています。

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // dequeue the call
    var queue = notifyAction.addQueue();
    queue.setDequeue(true);

## NotifyAction - addQueue.setDequeue(ブーリアン dequeue) {#ariaid-title25}

現在のコールキューからコールを取り出します (「保留」の解除)。
{#NotifyAction-addQueue_setDequeue_B__table_enw_wwd_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| dequeue | ブーリアン | 現在のコールをキューから取り出すかどうかを示すフラグ。 * true：コールをキューから取り出す * false：コールをキューに入れておく {#NotifyAction-addQueue_setDequeue_B__ul_lph_gxd_cgb} |
[表 : 47. パラメーター]

{#NotifyAction-addQueue_setDequeue_B__table_enw_wwd_cgb} {#NotifyAction-addQueue_setDequeue_B__table_fnw_wwd_cgb__entry__2}

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

{#NotifyAction-addQueue_setDequeue_B__table_fnw_wwd_cgb}  
この例は、キューからコールを取り出す方法を示しています。

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // dequeue the call
    var queue = notifyAction.addQueue();
    queue.setDequeue(true);

## NotifyAction - addQueue.setName(文字列 name) {#ariaid-title26}

キューに関連付けられる名前を定義します。
{#NotifyAction-addQueue_setName_S__table_fph_xvd_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| name | 文字列 | キューに関連付ける名前。 |
[表 : 49. パラメーター]

{#NotifyAction-addQueue_setName_S__table_fph_xvd_cgb} {#NotifyAction-addQueue_setName_S__table_gph_xvd_cgb__entry__2}

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

{#NotifyAction-addQueue_setName_S__table_gph_xvd_cgb}  
この例では、キューの名前を定義する方法を示します。

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // queue the call
    var queue = notifyAction.addQueue();
    queue.setName('my queue');

## NotifyAction - addPlay() {#ariaid-title27}

コール中にオーディオファイルを再生します。
{#r_NotifyAction-addPlay__table_inp_1g4_wr__entry__3}

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

{#r_NotifyAction-addPlay__table_inp_1g4_wr} {#r_NotifyAction-addPlay__table_jnp_1g4_wr__entry__2}

| タイプ | 説明 |
|-|-|
| PlayAction | NotifyAction オブジェクトに追加されたアクション。PlayAction オブジェクトを使用して、オーディオファイルの URL とオーディオをループさせる回数を定義します。 |
[表 : 52. 返される内容]

{#r_NotifyAction-addPlay__table_jnp_1g4_wr}  

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a play action
    var play = notifyAction.addPlay();
    play.setURL('http://www.moviesounds.com/2001/imsorry.wav');
    play.setLoop(1);

## NotifyAction - addPlay.setLoop(整数 loop) {#ariaid-title28}

オーディオファイルを再生する (ループする) 回数を定義します。
{#NotifyAction-addPlay_setLoop_I__table_akq_1rd_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| loop | 整数 | オーディオファイルの再生回数。 |
[表 : 53. パラメーター]

{#NotifyAction-addPlay_setLoop_I__table_akq_1rd_cgb} {#NotifyAction-addPlay_setLoop_I__table_bkq_1rd_cgb__entry__2}

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

{#NotifyAction-addPlay_setLoop_I__table_bkq_1rd_cgb}  

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a play action
    var play = notifyAction.addPlay();
    play.setURL('http://www.moviesounds.com/2001/imsorry.wav');
    play.setLoop(2);

## NotifyAction - addPlay.setURL(文字列 url) {#ariaid-title29}

再生するオーディオファイルを取得する URL を定義します。
{#NotifyAction-addPlay_setURL_S__table_t3n_pqd_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| url | 文字列 | 再生するオーディオファイルの URL。 |
[表 : 55. パラメーター]

{#NotifyAction-addPlay_setURL_S__table_t3n_pqd_cgb} {#NotifyAction-addPlay_setURL_S__table_u3n_pqd_cgb__entry__2}

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

{#NotifyAction-addPlay_setURL_S__table_u3n_pqd_cgb}  

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a play action
    var play = notifyAction.addPlay();
    play.setURL('http://www.moviesounds.com/2001/imsorry.wav');
    play.setLoop(1);

## NotifyAction - addRecord() {#ariaid-title30}

現在の NotifyAction オブジェクトに、コールを記録するアクションを追加します。
コールが完了するか、指定された終了キー (setFinishKey()) が押されると、記録が自動的に終了します。記録したものは、関連付けられたコールの notify_record テーブルに格納されます。
{#NotifyAction-addRecord__table_dyw_22x_zfb__entry__3}

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

{#NotifyAction-addRecord__table_dyw_22x_zfb} {#NotifyAction-addRecord__table_eyw_22x_zfb__entry__2}

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

{#NotifyAction-addRecord__table_eyw_22x_zfb}  
この例では、コールを記録する方法を示します。

    // First we initialize NotifyAction
    var notifyAction = new SNC.NotifyAction();
     
    // Call addRecord() of NotifyAction -- This returns an object of type RecordAction
    var recordAction = notifyAction.addRecord();
     
    // Optional. Define the key that callers use to stop the recording
    recordAction.setFinishKey('#'); // Stop the call recording when caller presses the '#' key.

## NotifyAction - addRecord.setFinishKey(文字列 finishKey) {#ariaid-title31}

記録を終了するキーを定義します。
{#NotifyAction-addRecord_setFinishKey_S__table_t1r_fhd_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| finishKey | 文字列 | 記録を終了するキー。 有効な値： * 0 ～ 9 * # (デフォルト) * \* {#NotifyAction-addRecord_setFinishKey_S__ul_vv3_vhd_cgb} |
[表 : 59. パラメーター]

{#NotifyAction-addRecord_setFinishKey_S__table_t1r_fhd_cgb} {#NotifyAction-addRecord_setFinishKey_S__table_u1r_fhd_cgb__entry__2}

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

{#NotifyAction-addRecord_setFinishKey_S__table_u1r_fhd_cgb}  
この例では、コールを記録してコール終了キーを設定する方法を示します。

    // First we initialize NotifyAction
    var notifyAction = new SNC.NotifyAction();
     
    // Then we call addRecord() of NotifyAction 
    var recordAction = notifyAction.addRecord();
     
    // Set the key that terminates the recording
    recordAction.setFinishKey('#'); // This means that we stop the call recording when user presses the '#' key.

## NotifyAction - addRecord.setMaxDuration(整数 seconds) {#ariaid-title32}

記録の最大長を定義します。
{#NotifyAction-addRecord_setMaxDuration_I__table_xv3_cjd_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| seconds | 整数 | 記録の最長時間 (単位：秒)。デフォルト：3600 |
[表 : 61. パラメーター]

{#NotifyAction-addRecord_setMaxDuration_I__table_xv3_cjd_cgb} {#NotifyAction-addRecord_setMaxDuration_I__table_yv3_cjd_cgb__entry__2}

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

{#NotifyAction-addRecord_setMaxDuration_I__table_yv3_cjd_cgb}  
この例では、コールを記録してコール終了キーを設定する方法を示します。

    // First we initialize NotifyAction
    var notifyAction = new SNC.NotifyAction();
     
    // Then we call addRecord() of NotifyAction 
    var recordAction = notifyAction.addRecord();
     
    // Set the maximum length of the recording
    recordAction.setMaxDuration(4800); 

## NotifyAction - addRecord.setTimeout(整数 timeout) {#ariaid-title33}

記録が終了するまでの無音の秒数を設定します。
{#NotifyAction-addrecord_setTimeout_I__table_wnz_f3d_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| timeout | 整数 | 記録が終了するまでのコールの無音の秒数。デフォルト：10 |
[表 : 63. パラメーター]

{#NotifyAction-addrecord_setTimeout_I__table_wnz_f3d_cgb} {#NotifyAction-addrecord_setTimeout_I__table_xnz_f3d_cgb__entry__2}

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

{#NotifyAction-addrecord_setTimeout_I__table_xnz_f3d_cgb}  
この例では、コールを記録して記録のタイムアウトの値を設定する方法を示します。

    // First we initialize NotifyAction
    var notifyAction = new SNC.NotifyAction();
     
    // Then we call addRecord() of NotifyAction 
    var recordAction = notifyAction.addRecord();
     
    // Set the recoding timeout value
    recordAction.setTimeout(360); 

## NotifyAction - addReject() {#ariaid-title34}

着信コールを拒否します。
{#r_NotifyAction-addReject__table_z1j_rh4_wr__entry__3}

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

{#r_NotifyAction-addReject__table_z1j_rh4_wr} {#r_NotifyAction-addReject__table_abj_rh4_wr__entry__2}

| タイプ | 説明 |
|-|-|
| RejectAction | NotifyAction オブジェクトに追加されたアクション。RejectAction オブジェクトを使用して、コールを拒否する理由を定義します。 |
[表 : 66. 返される内容]

{#r_NotifyAction-addReject__table_abj_rh4_wr}  

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // reject the call
    var rejectAction = notifyAction.addReject();
    rejectAction.setReason('busy'); // 'busy' or 'rejected'

## NotifyActon - addReject.setReason(文字列 reason) {#ariaid-title35}

コールが拒否された理由を定義します。
{#NotifyActon-addReject_setReason_S__table_fdf_bzd_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| reason | 文字列 | コールが拒否された理由。 有効な値： * busy * rejected {#NotifyActon-addReject_setReason_S__ul_bf1_wpy_cgb}他のすべての値は無視されます。 |
[表 : 67. パラメーター]

{#NotifyActon-addReject_setReason_S__table_fdf_bzd_cgb} {#NotifyActon-addReject_setReason_S__table_gdf_bzd_cgb__entry__2}

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

{#NotifyActon-addReject_setReason_S__table_gdf_bzd_cgb}  

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // reject the call
    var rejectAction = notifyAction.addReject();
    rejectAction.setReason('busy'); // 'busy' or 'rejected'

## NotifyAction - addSay() {#ariaid-title36}

コール中に読み上げるテキスト読み上げを定義します。
テキスト読み上げでは複数の言語がサポートされます。利用可能な言語は電話プロバイダーによって異なります。
{#r_NotifyAction-addSay__table_k1d_v24_wr__entry__3}

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

{#r_NotifyAction-addSay__table_k1d_v24_wr} {#r_NotifyAction-addSay__table_l1d_v24_wr__entry__2}

| タイプ | 説明 |
|-|-|
| SayAction | NotifyAction オブジェクトに追加されたアクション。SayAction オブジェクトを使用して、読み上げるテキストと言語を定義します。 |
[表 : 70. 返される内容]

{#r_NotifyAction-addSay__table_l1d_v24_wr}  
この例では、複数の言語でテキストを読み上げる方法を示します。

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a say action to say something in US English
    var usSay = notifyAction.addSay();
    usSay.setText('Welcome. I can speak english');
    usSay.setLanguage('en-US');

    // add a say action to say something in Dutch
    var nlSay = notifyAction.addSay();
    nlSay.setText('Ik spreek ook vloeiend nederlands');
    nlSay.setLanguage('nl-NL');

    // and german
    var deSay = notifyAction.addSay();
    deSay.setText('Und ich kan auch deutsch sprechen');
    deSay.setLanguage('de-DE');

## NotifyAction - addSay.setLanguage(文字列 language) {#ariaid-title37}

テキストを読み上げる言語を定義します。
このメソッドを setText() メソッドと併用して、読み上げる際の言い回しを定義します。
{#NotifyAction-addSay_setLanguage_S__table_xsp_3bc_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| 言語 | 文字列 | 関連するテキストを読み上げる際の言語を定義する ISO 3166 言語コード。「en-US」や「nl-NL」など。 |
[表 : 71. パラメーター]

{#NotifyAction-addSay_setLanguage_S__table_xsp_3bc_cgb} {#NotifyAction-addSay_setLanguage_S__table_ysp_3bc_cgb__entry__2}

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

{#NotifyAction-addSay_setLanguage_S__table_ysp_3bc_cgb}  
この例では、複数の言語でテキストを読み上げる方法を示します。

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a say action to say something in US English
    var usSay = notifyAction.addSay();
    usSay.setText('Welcome. I can speak english');
    usSay.setLanguage('en-US');

    // add a say action to say something in Dutch
    var nlSay = notifyAction.addSay();
    nlSay.setText('Ik spreek ook vloeiend nederlands');
    nlSay.setLanguage('nl-NL');

    // and german
    var deSay = notifyAction.addSay();
    deSay.setText('Und ich kan auch deutsch sprechen');
    deSay.setLanguage('de-DE');

## NotifyAction - addSay.setText(文字列 text) {#ariaid-title38}

現在のコール内で読み上げるテキストを定義します。
このメソッドを setLanguage() メソッドと併用して、指定したテキストを読み上げる際の言語を定義します。
{#NotifyAction-addSay_setText_S__table_mz3_gvs_1gb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| text | 文字列 | 現在のコール内で読み上げるテキスト。 |
[表 : 73. パラメーター]

{#NotifyAction-addSay_setText_S__table_mz3_gvs_1gb} {#NotifyAction-addSay_setText_S__table_nz3_gvs_1gb__entry__2}

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

{#NotifyAction-addSay_setText_S__table_nz3_gvs_1gb}  
この例では、複数の言語でテキストを読み上げる方法を示します。

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // add a say action to say something in US English
    var usSay = notifyAction.addSay();
    usSay.setText('Welcome. I can speak english');
    usSay.setLanguage('en-US');

    // add a say action to say something in Dutch
    var nlSay = notifyAction.addSay();
    nlSay.setText('Ik spreek ook vloeiend nederlands');
    nlSay.setLanguage('nl-NL');

    // and german
    var deSay = notifyAction.addSay();
    deSay.setText('Und ich kan auch deutsch sprechen');
    deSay.setLanguage('de-DE');

## NotifyAction - addSMS() {#ariaid-title39}

SMS メッセージを送信します。
注:  
アクティブなコールでこの関数を使用する場合は、返された SMSAction オブジェクトに対して setTo 関数を呼び出す必要はありません。SMS は自動的に発信者に送信されます。
{#r_NotifyAction-addSMS__table_gw2_kg4_wr__entry__3}

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

{#r_NotifyAction-addSMS__table_gw2_kg4_wr} {#r_NotifyAction-addSMS__table_hw2_kg4_wr__entry__2}

| タイプ | 説明 |
|-|-|
| SMSAction | NotifyAction オブジェクトに追加されたアクション。SMSAction オブジェクトを使用して、メッセージテキストと、メッセージの送信先の電話番号を定義します。 |
[表 : 76. 返される内容]

{#r_NotifyAction-addSMS__table_hw2_kg4_wr}  

    // Instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // Define where to send the SMS to
    var number = new GlideElementPhoneNumber();
    number.setPhoneNumber('+31612345678', true);

    // Add an SMS action
    var sms = notifyAction.addSMS();
    sms.setMessage('Lorem ipsum dolor sit amet, consectetur adipiscing elit.');
    sms.setTo(number);

## NotifyAction - addSMS.setMessage(文字列 message) {#ariaid-title40}

送信する SMS メッセージのテキストを定義します。
{#NotifyAction-addSMS_setMessage_S__table_b2q_szd_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| message | 文字列 | 送信する SMS メッセージのテキスト。 |
[表 : 77. パラメーター]

{#NotifyAction-addSMS_setMessage_S__table_b2q_szd_cgb} {#NotifyAction-addSMS_setMessage_S__table_c2q_szd_cgb__entry__2}

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

{#NotifyAction-addSMS_setMessage_S__table_c2q_szd_cgb}  

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // define where to send the sms to
    var number = new GlideElementPhoneNumber();
    number.setPhoneNumber('+31612345678', true);

    // add a SMS action
    var sms = notifyAction.addSMS();
    sms.setMessage('Lorem ipsum dolor sit amet, consectetur adipiscing elit.');
    sms.setTo(number);

## NotifyAction - addSMS.setTo(文字列 to) {#ariaid-title41}

SMS メッセージの送信先となる電話番号を設定します。
{#NotifyAction-addSMS_setTo_S__table_qtf_212_cgb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| to | 文字列 | SMS メッセージの送信先となる E.164 に準拠した電話番号。 |
[表 : 79. パラメーター]

{#NotifyAction-addSMS_setTo_S__table_qtf_212_cgb} {#NotifyAction-addSMS_setTo_S__table_rtf_212_cgb__entry__2}

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

{#NotifyAction-addSMS_setTo_S__table_rtf_212_cgb}  

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();

    // define where to send the sms to
    var number = new GlideElementPhoneNumber();
    number.setPhoneNumber('+31612345678', true);

    // add a SMS action
    var sms = notifyAction.addSMS();
    sms.setMessage('Lorem ipsum dolor sit amet, consectetur adipiscing elit.');
    sms.setTo(number);

## NotifyAction - append(NotifyAction action) {#ariaid-title42}

指定された NotifyAction オブジェクトを現在のクライアントの NotifyAction オブジェクトに追加します。
NotifyAction には、ターミナルと非ターミナルの 2 つのタイプがあります。クライアントの NotifyAction オブジェクトにターミナルアクションを追加すると、それ以上のアクションを追加できません。非ターミナルアクションは次のとおりです。

* PlayAction
* RecordAction
* SayAction
* SMSAction
{#NotifyAction-append_NA__ul_lfb_rqy_cgb}

他のすべての NotifyAction はターミナルです。ターミナルアクションの後に別の NotifyAction を追加しようとすると、コールが失敗します。
{#NotifyAction-append_NA__table_rl3_3bx_zfb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| action | NotifyAction | 現在の発信者の NotifyAction オブジェクトに追加する NotifyAction オブジェクト。 |
[表 : 81. パラメーター]

{#NotifyAction-append_NA__table_rl3_3bx_zfb} {#NotifyAction-append_NA__table_sl3_3bx_zfb__entry__2}

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

{#NotifyAction-append_NA__table_sl3_3bx_zfb}

## NotifyAction - fromJson(文字列 json) {#ariaid-title43}

JSON 文字列から NotifyAction オブジェクトを逆シリアル化します。
{#r_NotifyAction-fromJson_String__table_qc2_c34_wr__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| json | 文字列 | NotifyAction オブジェクトの JSON 文字列表現。 |
[表 : 83. パラメーター]

{#r_NotifyAction-fromJson_String__table_qc2_c34_wr} {#r_NotifyAction-fromJson_String__table_rc2_c34_wr__entry__2}

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

{#r_NotifyAction-fromJson_String__table_rc2_c34_wr}  
この例では、NotifyAction オブジェクトを逆シリアル化する方法を示します。

    var json = ".... some json obtained from toJson ....";

    // instantiate notify action
    var notifyAction = new SNC.NotifyAction();

    // deserialize and reconstruct the notify action instance
    notifyAction.fromJson(json);

この例では、NotifyAction オブジェクトをシリアル化および逆シリアル化する方法を示します。

    // instantiate notify action
    var notifyAction = new SNC.NotifyAction();

    // add a queue
    var queue = notifyAction.addQueue();
    queue.setName('myQueueName');
    queue.setDequeue(false);

    // serialize to json
    var json = notifyAction.toJson();
    gs.log('serialization result: ' + json);

    // instantiate a new notify action
    var newAction = new SNC.NotifyAction();

    // deserialize the json generated above
    newAction.fromJson(json);

    // serialize the new object and log the result
    newJson = newAction.toJson();
    gs.log('new serialization result: ' + newJson);
    gs.log('the same: ' + (json == newJson));

出力：\*\*\* Script: serialization result: {"fClassName":"NotifyAction","fActions":\[{"fClassName":"QueueAction","fDequeue":true,"fQueueName":"myQueueName"}\]} \*\*\* Script: new serialization result: {"fClassName":"NotifyAction","fActions":\[{"fClassName":"QueueAction","fDequeue":true,"fQueueName":"myQueueName"}\]} \*\*\* Script: the same: true

## NotifyAction - setCallRecord(GlideRecord callRecord) {#ariaid-title44}

後続のアクションを追加する Notify コールのレコードを定義します。
{#NotifyAction-setCallRecord_GR__table_uwv_vvv_zfb__entry__3}

| 名前 | タイプ | 説明 |
|-|-|-|
| callRecord | GlideRecord | アクションを追加する発信者のレコード (notify_call テーブル内) を含む GlideRecord。この発信者は、このメソッドが別の発信者で再度呼び出されるまで影響を受け続けます。 |
[表 : 85. パラメーター]

{#NotifyAction-setCallRecord_GR__table_uwv_vvv_zfb} {#NotifyAction-setCallRecord_GR__table_vwv_vvv_zfb__entry__2}

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

{#NotifyAction-setCallRecord_GR__table_vwv_vvv_zfb}  
この例は、アクションを追加する対象の発信者を設定する方法を示しています。

    public NotifyAction runIncomingCallWorkflow(NotifyPhoneNumber notifyPhoneNumber, GlideRecord callRecord) throws NoWorkflowConfiguredException, NoSuchNotifyGroupRecordException {
       NotifyAction notifyAction = runWorkflow(notifyPhoneNumber, COL_INCOMING_CALL_WF, callRecord);
       notifyAction.setCallRecord(callRecord);
       return notifyAction;
    }

## NotifyAction - toJson() {#ariaid-title45}

NotifyAction オブジェクトを JSON 文字列にシリアル化します。
{#r_NotifyAction-toJson__table_ygy_xh4_wr__entry__3}

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

{#r_NotifyAction-toJson__table_ygy_xh4_wr} {#r_NotifyAction-toJson__table_zgy_xh4_wr__entry__2}

| タイプ | 説明 |
|-|-|
| 文字列 | この NotifyAction オブジェクトの JSON 表現。 |
[表 : 88. 返される内容]

{#r_NotifyAction-toJson__table_zgy_xh4_wr}  
この例では、NotifyAction オブジェクトをシリアル化する方法を示します。

    // instantiate notify action
    var notifyAction = new SNC.NotifyAction();

    // add one or more notify actions
    // ...

    // and serialize to json
    var json = notifyAction.toJson();

この例では、NotifyAction オブジェクトをシリアル化および逆シリアル化する方法を示します。

    // instantiate notify action
    var notifyAction = new SNC.NotifyAction();

    // add a queue
    var queue = notifyAction.addQueue();
    queue.setName('myQueueName');
    queue.setDequeue(false);

    // serialize to json
    var json = notifyAction.toJson();
    gs.log('serialization result: ' + json);

    // instantiate a new notify action
    var newAction = new SNC.NotifyAction();

    // deserialize the json generated above
    newAction.fromJson(json);

    // serialize the new object and log the result
    newJson = newAction.toJson();
    gs.log('new serialization result: ' + newJson);
    gs.log('the same: ' + (json == newJson));

出力：\*\*\* Script: serialization result: {"fClassName":"NotifyAction","fActions":\[{"fClassName":"QueueAction","fDequeue":true,"fQueueName":"myQueueName"}\]} \*\*\* Script: new serialization result: {"fClassName":"NotifyAction","fActions":\[{"fClassName":"QueueAction","fDequeue":true,"fQueueName":"myQueueName"}\]} \*\*\* Script: the same: true

