---
sourceDocument: Referência da API de Yokohama
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/pt-BR/yokohama/api-reference

 Release :

    - yokohama

ft:locale :

    - pt-BR

ft:publication_title :

    - Referência da API de Yokohama

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# NotifyAction - Global

# NotifyAction - Global {#ariaid-title1}

* Versão de lançamento: Yokohama
* 
* Atualizado 30 de jan. de 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 23 min. de leitura

. NotifyAction A API permite definir ações para enviar a um provedor de telefonia.

Você adiciona ações a um objeto NotifyAction chamando a respectiva função de adição para cada tipo de ação. Cada função ADD retorna um objeto Action, como um objeto SayAction para o. AddSay() método. Consulte cada exemplo de método para obter informações sobre objetos retornados.  
Nota:  
. NotifyAction A API só é válida em aplicações globais. Para utilizar esse tipo de funcionalidade nas aplicações com escopo, você deve criar atividades de fluxo de trabalho personalizadas do Notify. Para obter informações adicionais sobre como criar essas atividades, consulte [Atividades de fluxo de trabalho do Notify](https://www.servicenow.com/docs/access?context=c_NotifyActivities&version=yokohama&pubname=yokohama-servicenow-platform&ft:locale=en-US).

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

Adiciona uma ação de conferência para mover a chamada atual para a chamada em conferência atual.
{#r_NotifyAction-addConference__table_ef5_xg4_wr__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| Nenhum |   |   |
[Tabela 1. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| ConferenceAction | Ação adicionada ao objeto NotifyAction. Use o objeto ConferenceAction para definir o nome da chamada em conferência e o comportamento da chamada em conferência quando um participante ingressar ou sair. |
[Tabela 2. Retorna]

{#r_NotifyAction-addConference__table_ff5_xg4_wr}  
Este exemplo demonstra como adicionar uma ação de conferência e definir o nome da conferência.

    // 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(Boolean endOnExit) {#ariaid-title3}

Define se a chamada em conferência deve ser encerrada quando um chamador especificado sai da chamada em conferência.
{#NotifyAction-addConference_setEndOnExit_B__table_j33_tmc_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| EndOnExit | Booliano | Sinalizador que indica se a chamada em conferência deve terminar quando o chamador especificado sair da chamada em conferência atual. * verdadeiro: encerre a chamada em conferência quando o chamador especificado sair da chamada em conferência * Falso: Padrão. Encerre a chamada em conferência quando todos os participantes saírem {#NotifyAction-addConference_setEndOnExit_B__ul_bcw_4fc_cgb} |
[Tabela 3. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 4. Retornos]

{#NotifyAction-addConference_setEndOnExit_B__table_k33_tmc_cgb}  
Este exemplo demonstra como adicionar uma ação de chamada em conferência e defini-la para que a chamada em conferência termine quando o chamador especificado sair.

    // 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);
    }

## - addConference.setHangupOnStar(Boolean hangupOnStar) {#ariaid-title4}

Define se a chamada em conferência deve ser encerrada quando um participante pressiona a tecla asterisco (\*).
{#NotifyAction-addConference_setHangupOnStar_B__table_kjb_jkc_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| hangupOnStar | Booliano | Sinalizador que indica se a chamada em conferência deve terminar quando um participante pressiona a tecla asterisco (\*). Valores válidos: * verdadeiro: encerre a chamada em conferência * Falso: Padrão. Não encerre a chamada em conferência {#NotifyAction-addConference_setHangupOnStar_B__ul_bcw_4fc_cgb} |
[Tabela 5. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 6. Retornos]

{#NotifyAction-addConference_setHangupOnStar_B__table_ljb_jkc_cgb}  
Este exemplo demonstra como adicionar uma ação de conferência e gravar a chamada em conferência.

    // 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(Boolean silenciado) {#ariaid-title5}

Define se o chamador especificado deve ser silenciado na chamada em conferência atual.
Se você não chamar este método, o chamador não será silenciado por padrão.
{#NotifyAction-addConference_setMuted_B__table_zws_qgc_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| muted | Booliano | Sinalizador que indica se o chamador especificado deve ser silenciado na chamada em conferência atual. * verdadeiro: o chamador deve estar mudo * Falso: Padrão. O chamador não deve ser silenciado {#NotifyAction-addConference_setMuted_B__ul_bcw_4fc_cgb} |
[Tabela 7. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 8. Retornos]

{#NotifyAction-addConference_setMuted_B__table_axs_qgc_cgb}  
Este exemplo demonstra como adicionar uma ação de conferência e silenciar um chamador especificado.

    // 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(String nome) {#ariaid-title6}

Define o nome da chamada em conferência atual com o nome especificado.
{#NotifyAction-addConference_setName_S__table_okj_rcc_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| nome | Cadeia de caracteres | Nome a ser associado à chamada em conferência atual. |
[Tabela 9. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 10. Retornos]

{#NotifyAction-addConference_setName_S__table_pkj_rcc_cgb}  
Este exemplo demonstra como adicionar uma ação de conferência e definir o nome da chamada em conferência.

    // 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(Boolean registro) {#ariaid-title7}

Define se a chamada em conferência associada deve ser gravada.
Se você não chamar este método, a chamada em conferência não será gravada por padrão.
{#NotifyAction-addConference_setRecord_B__table_bz2_ffc_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| registro | Booliano | Sinalizador que indica se a chamada em conferência atual deve ser gravada. * verdadeiro: comece a gravar a chamada em conferência * Falso: Padrão. A chamada em conferência não foi gravada. A gravação será interrompida se estiver sendo gravada no momento. {#NotifyAction-addConference_setRecord_B__ul_bcw_4fc_cgb} |
[Tabela 11. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 12. Retornos]

{#NotifyAction-addConference_setRecord_B__table_cz2_ffc_cgb}  
Este exemplo demonstra como adicionar uma ação de conferência e gravar a chamada em conferência.

    // 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(Boolean startOnEnter) {#ariaid-title8}

Define se a chamada em conferência deve ser iniciada quando o chamador especificado ingressar na chamada em conferência.
Por padrão, sempre que houver dois ou mais chamadores, a chamada em conferência será iniciada. Para que a chamada em conferência seja iniciada somente quando um chamador específico ingressar, você deve chamar esse método para cada um dos outros chamadores e definir o valor como "falso". Ao fazer isso, a chamada em conferência não será iniciada até que a pessoa desejada ingresse na chamada em conferência.
{#NotifyAction-addConference_setStartOnEnter_B__table_dps_43c_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| StartOnEnter | Booliano | Sinalizador que indica se a chamada em conferência deve ser iniciada quando o chamador selecionado ingressar na chamada em conferência atual. * Verdadeiro: Padrão. Inicie a chamada em conferência quando o chamador especificado ingressar na chamada em conferência. * falso: inicie a chamada em conferência depois que ela for adicionada {#NotifyAction-addConference_setStartOnEnter_B__ul_bcw_4fc_cgb} |
[Tabela 13. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 14. Retornos]

{#NotifyAction-addConference_setStartOnEnter_B__table_eps_43c_cgb}  
Este exemplo demonstra como adicionar uma ação de conferência e defini-la para que a chamada em conferência não inicie até que o chamador especificado ingresse.

    // 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}

Encaminha uma chamada para um número de telefone especificado ou Notify Client.
Quando a ação addDial for criada, o número de telefone associado ( SetPhoneNumber() ) Ou Notify Client ( SetClientRecord() ) também deve ser definido.
{#r_NotifyAction-addDial__table_ef5_xg4_wr__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| Nenhum |   |   |
[Tabela 15. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| Ação de discagem | Ação adicionada ao objeto NotifyAction. |
[Tabela 16. Retorna]

{#r_NotifyAction-addDial__table_ff5_xg4_wr}  
Este exemplo mostra como fazer uma chamada de saída e gravar a chamada.

    // 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(String callerId) {#ariaid-title10}

Define o ID do chamador para a chamada de saída.
{#NotifyAction-addDial_setCallerID_S__table_ehj_hzc_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| CallerId | Cadeia de caracteres | Identificador do chamador a ser definido para a chamada de saída. |
[Tabela 17. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 18. Retornos]

{#NotifyAction-addDial_setCallerID_S__table_fhj_hzc_cgb}  
Este exemplo mostra como fazer uma chamada de saída e definir um tempo limite de chamada.

    // 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(String tablename, cadeia de caracteres SYSID) {#ariaid-title11}

Define o solicitante atual como um solicitante do Notify especificando a tabela na qual encontrar o registro do solicitante do Notify e o identificador exclusivo do solicitante.
{#NotifyAction-addDial_setClientRecord_S_S__table_mmn_zbd_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| tableName | Cadeia de caracteres | Nome da tabela que contém as informações do chamador desejado. |
| sysID | Cadeia de caracteres | Identificador exclusivo (sys_id) do chamador do Notify desejado. |
[Tabela 19. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 20. Retornos]

{#NotifyAction-addDial_setClientRecord_S_S__table_nmn_zbd_cgb}  
Este exemplo mostra como definir o chamador atual como um chamador Notify usando setClientRecord().

    // 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(String valor) {#ariaid-title12}

Define os tons DTMF a serem reproduzidos quando a chamada é conectada.
{#NotifyAction-addDial_setDTMF_S__table_ult_2fd_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| valor | Cadeia de caracteres | Dígitos DTMF válidos para reproduzir quando a chamada se conectar. |
[Tabela 21. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 22. Retornos]

{#NotifyAction-addDial_setDTMF_S__table_vlt_2fd_cgb}  
Este exemplo mostra como fazer uma chamada de saída e define os tons DTMF a serem reproduzidos quando a chamada for conectada.

    // 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");

## - addDial.setHangupOnStar(Boolean hangupOnStar) {#ariaid-title13}

Define se a chamada deve terminar quando a tecla asterisco (\*) é pressionada.
{#NotifyAction-addDial_setHangupOnStar_B__table_uns_2gd_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| hangupOnStar | Booliano | Sinalizador que indica se a chamada deve terminar quando a tecla asterisco (\*) é pressionada. * verdadeiro: encerre a chamada * falso: não encerre a chamada {#NotifyAction-addDial_setHangupOnStar_B__ul_bcw_4fc_cgb} |
[Tabela 23. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 24. Retornos]

{#NotifyAction-addDial_setHangupOnStar_B__table_vns_2gd_cgb}  
Este exemplo mostra como fazer uma chamada de saída e definir a chave de desligamento como estrela.

    // 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(String phoneNumber) {#ariaid-title14}

Define o número de telefone a ser chamado.
{#NotifyAction-addDial_setPhoneNumber_S__table_cdc_f1d_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| phoneNumber | Cadeia de caracteres | Número de telefone compatível com E.164 para ligar. |
[Tabela 25. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 26. Retornos]

{#NotifyAction-addDial_setPhoneNumber_S__table_ddc_f1d_cgb}  
Este exemplo mostra como fazer uma chamada de saída e definir um tempo limite de chamada.

    // 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(Boolean registro) {#ariaid-title15}

Define se a chamada de saída deve ser gravada.
{#NotifyAction-addDial_setRecord_B__table_hbp_sdd_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| registro |   | Sinalizador que indica se a chamada de saída deve ser gravada. Valores válidos: * verdadeiro: grave a chamada de saída * falso: não grave a chamada de saída {#NotifyAction-addDial_setRecord_B__ul_z5r_22d_cgb} |
[Tabela 27. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 28. Retornos]

{#NotifyAction-addDial_setRecord_B__table_ibp_sdd_cgb}  
Este exemplo mostra como fazer uma chamada de saída e gravar a chamada.

    // 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(Integer tempo limite) {#ariaid-title16}

Define o número de segundos após os quais a chamada de saída expira.
{#NotifyAction-addDial_setTimeout_I__table_ldb_hyc_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| timeout | Inteiro | Número de segundos após os quais a chamada de saída atinge o tempo limite. Padrão: 30 |
[Tabela 29. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 30. Retornos]

{#NotifyAction-addDial_setTimeout_I__table_mdb_hyc_cgb}  
Este exemplo mostra como fazer uma chamada de saída e definir um tempo limite de chamada.

    // 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}

Apresenta um menu de telefone interativo especificado para o chamador.
{#r_NotifyAction-addGather__table_crt_zg4_wr__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| Nenhum |   |   |
[Tabela 31. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| GatherAction | Ação adicionada ao objeto NotifyAction. Use o objeto GatherAction para definir as configurações e opções de menu a serem apresentadas ao usuário. |
[Tabela 32. Retorna]

{#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}

Reproduz um arquivo de áudio na chamada.
Consulte NotifyAction AddPlay() método para obter uma descrição dos métodos secundários compatíveis.
{#NotifyAction-addGather_addPlay__table_uhd_mpd_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| Nenhum |   |   |
[Tabela 33. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| PlayAction | Ação adicionada ao objeto NotifyAction. Use o objeto PlayAction para definir o URL do arquivo de áudio e o número de vezes para repetir o áudio. |
[Tabela 34. Retorna]

{#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}

Define a conversão de texto em fala a ser lida na chamada.
Consulte NotifyAction AddSay() método para obter uma descrição dos métodos secundários compatíveis.
{#NotifyAction-addGather_addSay__table_cp4_znd_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| Nenhum |   |   |
[Tabela 35. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| Ação | Ação adicionada ao objeto NotifyAction. Use o objeto SayAction para definir o texto e o idioma a serem lidos. |
[Tabela 36. Retorna]

{#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(String finishKey) {#ariaid-title20}

Define a chave que o chamador insere para denotar o fim da entrada.
{#NotifyAction-addGather_setFinishKey_S__table_pk1_hmd_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| FinishKey | Cadeia de caracteres | Chave que indica o fim da entrada do chamador. Valores válidos: * 0-9 * (padrão) * \* {#NotifyAction-addGather_setFinishKey_S__ul_vv3_vhd_cgb} |
[Tabela 37. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 38. Retornos]

{#NotifyAction-addGather_setFinishKey_S__table_qk1_hmd_cgb}  
Este exemplo mostra como adicionar uma ação de coleta e definir a chave que denota o fim da entrada do chamador.

    // 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(Integer numberOfDigits) {#ariaid-title21}

Define o número de dígitos a serem coletados.
{#NotifyAction-addGather_setNumberOfDigits_I__table_f2w_3ld_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| NumberDeDigits | Inteiro | Número de dígitos a serem coletados. Zero é um valor inválido. |
[Tabela 39. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 40. Retornos]

{#NotifyAction-addGather_setNumberOfDigits_I__table_g2w_3ld_cgb}  
Este exemplo mostra como adicionar uma ação de coleta e definir o número de pressionamentos de tecla a serem coletados.

    // 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(Integer tempo limite) {#ariaid-title22}

Define o tempo após o qual a coleta de entrada atingirá o tempo limite.
{#NotifyAction-addGather_setTimeout_I__table_ej2_1nd_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| timeout | Inteiro | Número de segundos para aguardar a entrada do chamador antes de expirar o tempo limite. Padrão: 10 |
[Tabela 41. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 42. Retornos]

{#NotifyAction-addGather_setTimeout_I__table_fj2_1nd_cgb}  
Este exemplo mostra como adicionar uma ação de coleta e definir o valor do tempo limite de entrada.

    // 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}

Encerra uma chamada telefônica ativa.
{#r_NotifyAction-addHangUp__table_tqt_lh4_wr__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| Nenhum |   |   |
[Tabela 43. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| HangUpAction | Ação adicionada ao objeto NotifyAction. |
[Tabela 44. Retorna]

{#r_NotifyAction-addHangUp__table_uqt_lh4_wr}  

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

    // hang up
    notifyAction.addHangUp();

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

Coloca a chamada na fila, o que coloca a chamada em espera.
{#r_NotifyAction-addQueue__table_e5b_j24_wr__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| Nenhum |   |   |
[Tabela 45. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| QueueAction | Ação adicionada ao objeto NotifyAction. Use o objeto QueueAction para definir o nome da fila e o comportamento de enfileiramento ou retirada da fila. |
[Tabela 46. Retorna]

{#r_NotifyAction-addQueue__table_f5b_j24_wr}  
Este exemplo mostra como adicionar a chamada à fila especificada.

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

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

Este exemplo mostra como remover a chamada da fila.

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

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

## NotifyAction - addQueue.setDequeue(Boolean retirada da fila) {#ariaid-title25}

Remove a chamada da fila de chamadas atual (tira-a da "espera").
{#NotifyAction-addQueue_setDequeue_B__table_enw_wwd_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| retirada da fila | Booliano | Sinalizador que indica se a chamada atual deve ser removida da fila. * verdadeiro: remova a chamada da fila * falso: a chamada foi colocada na fila {#NotifyAction-addQueue_setDequeue_B__ul_lph_gxd_cgb} |
[Tabela 47. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 48. Retornos]

{#NotifyAction-addQueue_setDequeue_B__table_fnw_wwd_cgb}  
Este exemplo mostra como remover a chamada da fila.

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

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

## NotifyAction - addQueue.setName(String nome) {#ariaid-title26}

Define o nome associado a uma fila.
{#NotifyAction-addQueue_setName_S__table_fph_xvd_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| nome | Cadeia de caracteres | Nome a ser associado à fila. |
[Tabela 49. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 50. Retornos]

{#NotifyAction-addQueue_setName_S__table_gph_xvd_cgb}  
Este exemplo mostra como definir o nome de uma fila.

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

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

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

Reproduz um arquivo de áudio na chamada.
{#r_NotifyAction-addPlay__table_inp_1g4_wr__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| Nenhum |   |   |
[Tabela 51. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| PlayAction | Ação adicionada ao objeto NotifyAction. Use o objeto PlayAction para definir o URL do arquivo de áudio e o número de vezes para repetir o áudio. |
[Tabela 52. Retorna]

{#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(Integer loop) {#ariaid-title28}

Define o número de vezes para reproduzir (loop through) o arquivo de áudio.
{#NotifyAction-addPlay_setLoop_I__table_akq_1rd_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| loop | Inteiro | Número de vezes para reproduzir o arquivo de áudio. |
[Tabela 53. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 54. Retornos]

{#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);

## addPlay.setURL(String url) {#ariaid-title29}

Define o URL onde obter o arquivo de áudio a ser reproduzido.
{#NotifyAction-addPlay_setURL_S__table_t3n_pqd_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| URL | Cadeia de caracteres | URL do arquivo de áudio a ser reproduzido. |
[Tabela 55. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 56. Retornos]

{#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}

Adiciona uma ação para registrar a chamada ao objeto NotifyAction atual.
A gravação termina automaticamente quando a chamada é concluída ou quando um término especificado é pressionado ( SetFinishKey() ). A gravação é colocada na tabela NOTIFY_RECORD da chamada associada.
{#NotifyAction-addRecord__table_dyw_22x_zfb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| Nenhum |   |   |
[Tabela 57. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 58. Retorna]

{#NotifyAction-addRecord__table_eyw_22x_zfb}  
Este exemplo demonstra como gravar uma chamada.

    // 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(String finishKey) {#ariaid-title31}

Define a chave que encerra a gravação.
{#NotifyAction-addRecord_setFinishKey_S__table_t1r_fhd_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| FinishKey | Cadeia de caracteres | Chave que encerra a gravação. Valores válidos: * 0-9 * (padrão) * \* {#NotifyAction-addRecord_setFinishKey_S__ul_vv3_vhd_cgb} |
[Tabela 59. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 60. Retornos]

{#NotifyAction-addRecord_setFinishKey_S__table_u1r_fhd_cgb}  
Este exemplo demonstra como gravar uma chamada e definir a chave de encerramento de chamada.

    // 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(Integer segundos) {#ariaid-title32}

Define a duração máxima da gravação.
{#NotifyAction-addRecord_setMaxDuration_I__table_xv3_cjd_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| segundo(s) | Inteiro | Duração máxima da gravação em segundos. Padrão: 3600 |
[Tabela 61. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 62. Retornos]

{#NotifyAction-addRecord_setMaxDuration_I__table_yv3_cjd_cgb}  
Este exemplo demonstra como gravar uma chamada e definir a chave de encerramento de chamada.

    // 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(Integer tempo limite) {#ariaid-title33}

Define o número de segundos de silêncio, após o qual a gravação termina.
{#NotifyAction-addrecord_setTimeout_I__table_wnz_f3d_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| timeout | Inteiro | Número de segundos de silêncio na chamada, após os quais a gravação termina. Padrão: 10 |
[Tabela 63. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 64. Retornos]

{#NotifyAction-addrecord_setTimeout_I__table_xnz_f3d_cgb}  
Este exemplo demonstra como gravar uma chamada e definir o valor do tempo limite de gravação.

    // 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}

Rejeita uma chamada de entrada.
{#r_NotifyAction-addReject__table_z1j_rh4_wr__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| Nenhum |   |   |
[Tabela 65. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| Rejeitar Ação | Ação adicionada ao objeto NotifyAction. Use o objeto RejectAction para definir o motivo da rejeição da chamada. |
[Tabela 66. Retorna]

{#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(String motivo) {#ariaid-title35}

Define o motivo pelo qual a chamada foi rejeitada.
{#NotifyActon-addReject_setReason_S__table_fdf_bzd_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| motivo | Cadeia de caracteres | Motivo pelo qual a chamada foi rejeitada. Valores válidos: * ocupado * rejeitado {#NotifyActon-addReject_setReason_S__ul_bf1_wpy_cgb}Todos os outros valores são ignorados. |
[Tabela 67. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 68. Retornos]

{#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}

Define a conversão de texto em fala a ser lida na chamada.
A conversão de texto em fala é compatível com vários idiomas. Os idiomas disponíveis dependem do provedor de telefonia.
{#r_NotifyAction-addSay__table_k1d_v24_wr__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| Nenhum |   |   |
[Tabela 69. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| Ação | Ação adicionada ao objeto NotifyAction. Use o objeto SayAction para definir o texto e o idioma a serem lidos. |
[Tabela 70. Retorna]

{#r_NotifyAction-addSay__table_l1d_v24_wr}  
Este exemplo demonstra a leitura de texto em vários idiomas.

    // 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');

## - addSay.setLanguage(String idioma) {#ariaid-title37}

Define o idioma no qual o texto será falado.
Use este método em conjunto com SetText() método para definir o palavreado a ser falado.
{#NotifyAction-addSay_setLanguage_S__table_xsp_3bc_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| idioma | Cadeia de caracteres | Código de idioma ISO 3166 que define o idioma no qual o texto associado será falado. Por exemplo, "en-US" ou "nl-NL". |
[Tabela 71. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 72. Retornos]

{#NotifyAction-addSay_setLanguage_S__table_ysp_3bc_cgb}  
Este exemplo demonstra a leitura de texto em vários idiomas.

    // 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(String texto) {#ariaid-title38}

Define o texto a ser lido na chamada atual.
Use este método em conjunto com SetLanguage() método para definir o idioma no qual falar o texto fornecido.
{#NotifyAction-addSay_setText_S__table_mz3_gvs_1gb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| texto | Cadeia de caracteres | Texto a ser lido em voz alta na chamada atual. |
[Tabela 73. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 74. Retornos]

{#NotifyAction-addSay_setText_S__table_nz3_gvs_1gb}  
Este exemplo demonstra a leitura de texto em vários idiomas.

    // 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}

Envia uma mensagem SMS.
Nota:  
Ao usar esta função com uma chamada ativa, você não precisa chamar o. Definir como Função no objeto SMSAction retornado. O SMS é enviado automaticamente para o chamador.
{#r_NotifyAction-addSMS__table_gw2_kg4_wr__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| Nenhum |   |   |
[Tabela 75. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| SMSAção | Ação adicionada ao objeto NotifyAction. Use o objeto SMSAction para definir o texto da mensagem e o número de telefone para o qual a mensagem será enviada. |
[Tabela 76. Retorna]

{#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(String mensagem) {#ariaid-title40}

Define o texto da mensagem SMS a ser enviada.
{#NotifyAction-addSMS_setMessage_S__table_b2q_szd_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| message | Cadeia de caracteres | Texto da mensagem SMS a ser enviada. |
[Tabela 77. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 78. Retornos]

{#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(String a) {#ariaid-title41}

Define o número de telefone para o qual a mensagem SMS será enviada.
{#NotifyAction-addSMS_setTo_S__table_qtf_212_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| para | Cadeia de caracteres | Número de telefone compatível com E.164 para o qual enviar a mensagem SMS. |
[Tabela 79. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 80. Retornos]

{#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 - anexar (ação NotifyAction) {#ariaid-title42}

Anexa o objeto NotifyAction especificado ao objeto NotifyAction do cliente atual.
Há dois tipos de NotificyActions: Terminal e não-terminal. Depois de anexar uma ação de terminal ao objeto NotifyAction de um cliente, você não poderá anexar nenhuma ação adicional. As ações não terminais incluem:

* PlayAction
* RecordAction
* Ação
* SMSAção
{#NotifyAction-append_NA__ul_lfb_rqy_cgb}

Todas as outras NotificyActions são terminais. Se você tentar adicionar outra NotifyAction após uma ação de terminal, a chamada falhará.
{#NotifyAction-append_NA__table_rl3_3bx_zfb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| ação | NotifyAction | Objeto NotifyAction a ser anexado ao objeto NotifyAction do chamador atual. |
[Tabela 81. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 82. Retornos]

{#NotifyAction-append_NA__table_sl3_3bx_zfb}

## NotifyAction - fromJson(cadeia de caracteres json) {#ariaid-title43}

Desserializar um NotifyAction Objeto de uma cadeia de caracteres JSON.
{#r_NotifyAction-fromJson_String__table_qc2_c34_wr__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| json | Cadeia de caracteres | Uma representação de cadeia de caracteres JSON de um NotifyAction objeto. |
[Tabela 83. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 84. Retornos]

{#r_NotifyAction-fromJson_String__table_rc2_c34_wr}  
Este exemplo demonstra a desserialização de um objeto 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);

Este exemplo demonstra a serialização e a desserialização de um objeto 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: Resultado de serialização:("fClassName": "NotifyAction", "Facções":\[\["fClassName":"QueueAction","fDequeue":true,"fQueueName":"meuQueueName":"meuQueueName"\]

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

Define o registro de chamada Notify no qual adicionar ações subsequentes.
{#NotifyAction-setCallRecord_GR__table_uwv_vvv_zfb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| Registro de chamada | GlideRecord | GlideRecord que contém o registro do chamador (na tabela NOTIFY_CALL) para o qual adicionar ações. Este chamador permanece em efeito até que este método seja chamado novamente com um chamador diferente. |
[Tabela 85. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| vazio |   |
[Tabela 86. Retornos]

{#NotifyAction-setCallRecord_GR__table_vwv_vvv_zfb}  
Este exemplo mostra como definir o chamador ao qual você deseja adicionar ações.

    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}

Serialize o. NotifyAction Objeto para uma cadeia de caracteres JSON.
{#r_NotifyAction-toJson__table_ygy_xh4_wr__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| Nenhum |   |   |
[Tabela 87. Parâmetros]

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

| Tipo | Descrição |
|-|-|
| Cadeia de caracteres | Representação JSON deste objeto NotifyAction. |
[Tabela 88. Retorna]

{#r_NotifyAction-toJson__table_zgy_xh4_wr}  
Este exemplo demonstra a serialização de um objeto NotifyAction.

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

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

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

Este exemplo demonstra a serialização e a desserialização de um objeto 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: Resultado de serialização:("fClassName": "NotifyAction", "Facções":\[\["fClassName":"QueueAction","fDequeue":true,"fQueueName":"meuQueueName":"meuQueueName"\]

