---
sourceDocument: Referência de API do Xanadu
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/pt-BR/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - pt-BR

ft:publication_title :

    - Referência de API do Xanadu

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# NotifyAction - Global

# NotifyAction - Global {#ariaid-title1}

* Versão de lançamento: Xanadu
* 
* Atualizado 1 de ago. de 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 23 min. de leitura

A API NotifyAction permite que você defina ações a serem enviadas para 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 de adição retorna um objeto Action, como um objetoSayAction para o método addSay(). Consulte cada exemplo de método para obter informações sobre objetos retornados.  
Nota:  
A API NotifyAction só é válida em aplicações globais. Para usar esse tipo de funcionalidade em aplicações com escopo, você deve criar atividades de fluxo de trabalho do Notify personalizadas. 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=xanadu&pubname=xanadu-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 |
|-|-|
| AçãoConferência | 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 entra ou sai. |
[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(Booliano endOnExit) {#ariaid-title3}

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

| Nome | Tipo | Descrição |
|-|-|-|
| fimEmSaída | Booliano | Sinalizador que indica se a chamada em conferência deve terminar quando o chamador especificado sair da chamada em conferência atual. * verdadeiro: encerra a chamada em conferência quando o solicitante especificado sai da chamada em conferência * falso: padrão. Encerrar 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. Retorna]

{#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 solicitante especificado for encerrado.

    // 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 (booliano hangupOnStar) {#ariaid-title4}

Define se a chamada em conferência deve terminar 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: encerrar a chamada em conferência * falso: padrão. Não encerrar 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. Retorna]

{#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 (booliano mudo) {#ariaid-title5}

Define se o chamador especificado deve ser mudo na chamada em conferência atual.
Se você não chamar este método, o solicitante não ficará mudo 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 mudo na chamada em conferência atual. * verdadeiro: o solicitante deve ser mudo * falso: padrão. O solicitante 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. Retorna]

{#NotifyAction-addConference_setMuted_B__table_axs_qgc_cgb}  
Este exemplo demonstra como adicionar uma ação de conferência e, em seguida, silenciar um solicitante 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(cadeia de caracteres name) {#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. Retorna]

{#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(registro booliano) {#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: iniciar a gravação da chamada em conferência * falso: padrão. A chamada em conferência não é 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. Retorna]

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

Define se a chamada em conferência deve ser iniciada quando o solicitante especificado ingressar na chamada em conferência.
Por padrão, sempre que houver dois ou mais solicitantes, a chamada em conferência será iniciada. Para que a chamada em conferência só inicie quando um solicitante específico ingressar, você deve chamar este método para cada um dos outros solicitantes 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 |
|-|-|-|
| inícioEmEntrada | Booliano | Sinalizador que indica se a chamada em conferência deve iniciar 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: inicia a chamada em conferência depois que ela é 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. Retorna]

{#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 solicitante 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 ou cliente Notify especificado.
Depois que a ação addDial é criada, o número de telefone associado (setPhoneNumber()) ou o Cliente do Notify (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 |
|-|-|
| DialAction | 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(cadeia de caracteres 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 |
|-|-|-|
| ID do chamador | Cadeia de caracteres | Identificador do solicitante 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. Retorna]

{#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(cadeia de caracteres "tableName", cadeia de caracteres sysID) {#ariaid-title11}

Define o solicitante atual para um solicitante do Notify especificando a tabela na qual o registro do solicitante do Notify e o identificador exclusivo do solicitante serão encontrados.
{#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 solicitante desejado. |
| sysID | Cadeia de caracteres | Identificador exclusivo (sys_id) do solicitante 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. Retorna]

{#NotifyAction-addDial_setClientRecord_S_S__table_nmn_zbd_cgb}  
Este exemplo mostra como definir o solicitante atual como um solicitante do 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 (valor da cadeia de caracteres) {#ariaid-title12}

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

| Nome | Tipo | Descrição |
|-|-|-|
| valor | Cadeia de caracteres | Dígitos DTMF válidos a serem reproduzidos quando a chamada for conectada. |
[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. Retorna]

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

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

Define se a chamada deve terminar quando a tecla asterisco (\*) for 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 (\*) for pressionada. * verdadeiro: encerrar a chamada * falso: não encerra 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. Retorna]

{#NotifyAction-addDial_setHangupOnStar_B__table_vns_2gd_cgb}  
Este exemplo mostra como fazer uma chamada de saída e definir a tecla de desconexão 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(cadeia de caracteres 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. Retorna]

{#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(registro booliano) {#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: gravar a chamada de saída * falso: não grava 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. Retorna]

{#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 (Tempo limite de número inteiro) {#ariaid-title16}

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

| Nome | Tipo | Descrição |
|-|-|-|
| tempo limite | Inteiro | Número de segundos após o qual a chamada de saída expira. 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. Retorna]

{#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 solicitante.
{#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 |
|-|-|
| Reunir ação | Ação adicionada ao objeto NotifyAction. Use o objeto GatherAction para definir as configurações de menu e as opções 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 o método NotifyAction addPlay() 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 o texto para fala a ser lido na chamada.
Consulte o método NotifyAction addSay() 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 |
|-|-|
| DizerAção | Ação adicionada ao objeto NotifyAction. Use o objetoSayAction 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(cadeia de caracteres "FinishKey") {#ariaid-title20}

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

| Nome | Tipo | Descrição |
|-|-|-|
| termineKey | Cadeia de caracteres | Chave que denota o fim da entrada do solicitante. 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. Retorna]

{#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 solicitante.

    // 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 |
|-|-|-|
| numberOfDigits | 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. Retorna]

{#NotifyAction-addGather_setNumberOfDigits_I__table_g2w_3ld_cgb}  
Este exemplo mostra como adicionar uma ação de coleta e definir o número de toques 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 (tempo limite de número inteiro) {#ariaid-title22}

Define a quantidade de tempo após a qual a coleta de entrada expirará.
{#NotifyAction-addGather_setTimeout_I__table_ej2_1nd_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| tempo limite | Inteiro | Número de segundos de espera pela entrada do solicitante antes de atingir 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. Retorna]

{#NotifyAction-addGather_setTimeout_I__table_fj2_1nd_cgb}  
Este exemplo mostra como adicionar uma ação de coleta e definir o valor de 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 a coloca 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 desenfileiramento. |
[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(Booliano sem fila) {#ariaid-title25}

Remove a chamada da fila de chamadas atual (retira-a da condição "em espera").
{#NotifyAction-addQueue_setDequeue_B__table_enw_wwd_cgb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| desenfileirar | Booliano | Sinalizador que indica se a chamada atual deve ser removida da fila. * verdadeiro: remove a chamada da fila * falso: a chamada é 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. Retorna]

{#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(cadeia de caracteres name) {#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. Retorna]

{#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 (loop de número inteiro) {#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. Retorna]

{#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(cadeia de caracteres URL) {#ariaid-title29}

Define a URL de 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. Retorna]

{#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 para o objeto NotifyAction atual.
A gravação termina automaticamente quando a chamada é concluída ou quando um encerramento especificado é pressionado (setFinishKey()). A gravação é então colocada na tabela notify_record para a 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(cadeia de caracteres "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 |
|-|-|-|
| termineKey | 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. Retorna]

{#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(Inteiros 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 |
|-|-|-|
| segundos | 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. Retorna]

{#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 (tempo limite de número inteiro) {#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 |
|-|-|-|
| tempo limite | Inteiro | Número de segundos de silêncio na chamada, após o qual 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. Retorna]

{#NotifyAction-addrecord_setTimeout_I__table_xnz_f3d_cgb}  
Este exemplo demonstra como gravar uma chamada e definir o valor de 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 |
|-|-|
| RejectAction | 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(cadeia de caracteres 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 * Rejeitadas {#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. Retorna]

{#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 o texto para fala a ser lido na chamada.
Vários idiomas são compatíveis com texto para fala. 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 |
|-|-|
| DizerAção | Ação adicionada ao objeto NotifyAction. Use o objetoSayAction 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');

## NotifyAction - addSay.setLanguage(cadeia de caracteres idioma) {#ariaid-title37}

Define o idioma no qual o texto será falado.
Use este método em conjunto com o método setText() para definir o texto 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. Retorna]

{#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(cadeia de caracteres text) {#ariaid-title38}

Define o texto a ser lido na chamada atual.
Use este método em conjunto com o método setLanguage() para definir o idioma no qual o texto fornecido será falado.
{#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. Retorna]

{#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 a função setTo no objeto SMSAction retornado. O SMS é enviado automaticamente para o solicitante.
{#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 |
|-|-|
| AçãoSMS | 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 (cadeia de caracteres 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. Retorna]

{#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(cadeia de caracteres para) {#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 |
|-|-|-|
| a | Cadeia de caracteres | Número de telefone compatível com E.164 para o qual a mensagem SMS será enviada. |
[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. Retorna]

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

Anexa o objeto NotifyAction especificado ao objeto NotifyAction do cliente atual.
Existem dois tipos de NotifyActions: 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 de terminal incluem:

* PlayAction
* Ação de Registro
* DizerAção
* AçãoSMS
{#NotifyAction-append_NA__ul_lfb_rqy_cgb}

Todas as outras NotifyActions são de terminal. 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 solicitante 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. Retorna]

{#NotifyAction-append_NA__table_sl3_3bx_zfb}

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

Desserializar um objeto NotifyAction 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 objeto NotifyAction. |
[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. Retorna]

{#r_NotifyAction-fromJson_String__table_rc2_c34_wr}  
Este exemplo demonstra como desserializar 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));

Saída: \*\*\* Script: resultado da serialização: {"fClassName":"NotifyAction","fActions":\[{"fClassName":"QueueAction","fDequeue":true,"fQueueName":"myQueueName"}\]} \* \*\* Script: novo resultado de serialização: {"fClassName":"NotifyAction","fActions":\[{"fClassName":"QueueAction","fDequeue":true,"fQueueName":"myQueueName"}\]} \*\*\* Script: o mesmo: verdadeiro

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

Define o registro de chamada do Notify ao qual ações subsequentes são adicionadas.
{#NotifyAction-setCallRecord_GR__table_uwv_vvv_zfb__entry__3}

| Nome | Tipo | Descrição |
|-|-|-|
| registro de chamada | GlideRecord | GlideRecord que contém o registro do solicitante (dentro da tabela notify_call) para o qual ações serão adicionadas. Este solicitante permanece em vigor até que este método seja chamado novamente com um solicitante 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. Retorna]

{#NotifyAction-setCallRecord_GR__table_vwv_vvv_zfb}  
Este exemplo mostra como definir o solicitante 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 objeto NotifyAction 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));

Saída: \*\*\* Script: resultado da serialização: {"fClassName":"NotifyAction","fActions":\[{"fClassName":"QueueAction","fDequeue":true,"fQueueName":"myQueueName"}\]} \* \*\* Script: novo resultado de serialização: {"fClassName":"NotifyAction","fActions":\[{"fClassName":"QueueAction","fDequeue":true,"fQueueName":"myQueueName"}\]} \*\*\* Script: o mesmo: verdadeiro

