NotifyAction - Global
. NotifyAction A API permite definir ações a serem enviadas para um provedor de telefonia.
Você adiciona ações a um objeto NotifyAction chamando a respectiva função ADD para cada tipo de ação. Cada função ADD retorna um objeto Action, como um objeto SayAction para AddSay() método. Consulte cada exemplo de método para obter informações sobre objetos retornados.
NotifyAction - addConference()
Adiciona uma ação de conferência para mover a chamada atual para a chamada em conferência atual.
| Nome | Tipo | Descrição |
|---|---|---|
| Nenhum |
| 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. |
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)
Define se a chamada em conferência deve terminar quando um chamador especificado sai da chamada em conferência.
| Nome | Tipo | Descrição |
|---|---|---|
| EndOnExit | Booliano | Sinalizador que indica se a chamada em conferência deve terminar quando o chamador especificado sai da chamada em conferência atual.
|
| Tipo | Descrição |
|---|---|
| vazio |
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);
}
NotifyAction - addConference.setHangupOnStar(Boolean hangupOnStar)
Define se a chamada em conferência deve terminar quando um participante pressiona a tecla asterisco (*).
| 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:
|
| Tipo | Descrição |
|---|---|
| vazio |
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 mudo)
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.
| Nome | Tipo | Descrição |
|---|---|---|
| muted | Booliano | Sinalizador que indica se o chamador especificado deve ser silenciado na chamada em conferência atual.
|
| Tipo | Descrição |
|---|---|
| vazio |
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)
Define o nome da chamada em conferência atual com o nome especificado.
| Nome | Tipo | Descrição |
|---|---|---|
| nome | Cadeia de caracteres | Nome a ser associado à chamada em conferência atual. |
| Tipo | Descrição |
|---|---|
| vazio |
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)
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.
| Nome | Tipo | Descrição |
|---|---|---|
| registro | Booliano | Sinalizador que indica se a chamada em conferência atual deve ser gravada.
|
| Tipo | Descrição |
|---|---|
| vazio |
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)
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 comece 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.
| 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.
|
| Tipo | Descrição |
|---|---|
| vazio |
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()
Encaminha uma chamada para um número de telefone especificado ou Cliente do Notify.
Quando a ação addDial é criada, o número de telefone associado ( SetPhoneNumber() Notify Client ( SetClientRecord() ) também deve ser definido.
| Nome | Tipo | Descrição |
|---|---|---|
| Nenhum |
| Tipo | Descrição |
|---|---|
| DialAction | Ação adicionada ao objeto NotifyAction. |
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)
Define o ID do chamador para a chamada de saída.
| Nome | Tipo | Descrição |
|---|---|---|
| CallerID | Cadeia de caracteres | Identificador do chamador a ser definido para a chamada de saída. |
| Tipo | Descrição |
|---|---|
| vazio |
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)
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.
| 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 chamador do Notify desejado. |
| Tipo | Descrição |
|---|---|
| vazio |
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(String valor)
Define os tons DTMF a serem reproduzidos quando a chamada é conectada.
| Nome | Tipo | Descrição |
|---|---|---|
| valor | Cadeia de caracteres | Dígitos DTMF válidos a serem reproduzidos quando a chamada for conectada. |
| Tipo | Descrição |
|---|---|
| vazio |
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(Boolean hangupOnStar)
Define se a chamada deve terminar quando a tecla asterisco (*) é pressionada.
| Nome | Tipo | Descrição |
|---|---|---|
| hangupOnStar | Booliano | Sinalizador que indica se a chamada deve terminar quando a tecla asterisco (*) é pressionada.
|
| Tipo | Descrição |
|---|---|
| vazio |
Este exemplo mostra como fazer uma chamada de saída e definir a tecla 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)
Define o número de telefone a ser chamado.
| Nome | Tipo | Descrição |
|---|---|---|
| phoneNumber | Cadeia de caracteres | Número de telefone compatível com E.164 para ligar. |
| Tipo | Descrição |
|---|---|
| vazio |
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)
Define se a chamada de saída deve ser gravada.
| Nome | Tipo | Descrição |
|---|---|---|
| registro | Sinalizador que indica se a chamada de saída deve ser gravada. Valores válidos:
|
| Tipo | Descrição |
|---|---|
| vazio |
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 - tempo limite de addDial.setTimeout(Integer)
Define o número de segundos após os quais a chamada de saída expira.
| 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 |
| Tipo | Descrição |
|---|---|
| vazio |
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()
Apresenta um menu de telefone interativo especificado para o chamador.
| Nome | Tipo | Descrição |
|---|---|---|
| Nenhum |
| 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. |
// 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()
Reproduz um arquivo de áudio na chamada.
Consulte NotifyAction AddPlay() método para uma descrição dos métodos secundários compatíveis.
| Nome | Tipo | Descrição |
|---|---|---|
| Nenhum |
| 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. |
// 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()
Define a conversão de texto em fala a ser lida na chamada.
Consulte NotifyAction AddSay() método para uma descrição dos métodos secundários compatíveis.
| Nome | Tipo | Descrição |
|---|---|---|
| Nenhum |
| Tipo | Descrição |
|---|---|
| SayAction | Ação adicionada ao objeto NotifyAction. Use o objeto SayAction para definir o texto e o idioma a serem lidos. |
// 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)
Define a chave que o chamador insere para indicar o fim da entrada.
| Nome | Tipo | Descrição |
|---|---|---|
| FinishKey | Cadeia de caracteres | Chave que indica o fim da entrada do chamador. Valores válidos:
|
| Tipo | Descrição |
|---|---|
| vazio |
Este exemplo mostra como adicionar uma ação Coletar 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)
Define o número de dígitos a serem coletados.
| Nome | Tipo | Descrição |
|---|---|---|
| NumberOfDigits | Inteiro | Número de dígitos a serem coletados. Zero é um valor inválido. |
| Tipo | Descrição |
|---|---|
| vazio |
Este exemplo mostra como adicionar uma ação Coletar 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 - tempo limite de addGather.setTimeout(Integer)
Define a quantidade de tempo após o qual a coleta de entrada atingirá o tempo limite.
| Nome | Tipo | Descrição |
|---|---|---|
| timeout | Inteiro | Número de segundos para aguardar a entrada do chamador antes de expirar. Padrão: 10 |
| Tipo | Descrição |
|---|---|
| vazio |
Este exemplo mostra como adicionar uma ação Coletar 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()
Encerra uma chamada telefônica ativa.
| Nome | Tipo | Descrição |
|---|---|---|
| Nenhum |
| Tipo | Descrição |
|---|---|
| HangUpAction | Ação adicionada ao objeto NotifyAction. |
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// hang up
notifyAction.addHangUp();
NotifyAction - addQueue()
Coloca a chamada na fila, o que coloca a chamada em espera.
| Nome | Tipo | Descrição |
|---|---|---|
| Nenhum |
| 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. |
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)
Remove a chamada da fila de chamadas atual (tira-a da "espera").
| Nome | Tipo | Descrição |
|---|---|---|
| remover da fila | Booliano | Sinalizador que indica se a chamada atual deve ser removida da fila.
|
| Tipo | Descrição |
|---|---|
| vazio |
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)
Define o nome associado a uma fila.
| Nome | Tipo | Descrição |
|---|---|---|
| nome | Cadeia de caracteres | Nome a ser associado à fila. |
| Tipo | Descrição |
|---|---|
| vazio |
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()
Reproduz um arquivo de áudio na chamada.
| Nome | Tipo | Descrição |
|---|---|---|
| Nenhum |
| Tipo | Descrição |
|---|---|
| PlayAction | Ação adicionada ao objeto NotifyAction. Use o objeto PlayAction para definir a URL do arquivo de áudio e o número de vezes para repetir o áudio. |
// 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 - loop addPlay.setLoop(Integer)
Define o número de vezes para reproduzir (loop-through) o arquivo de áudio.
| Nome | Tipo | Descrição |
|---|---|---|
| loop | Inteiro | Número de vezes para reproduzir o arquivo de áudio. |
| Tipo | Descrição |
|---|---|
| vazio |
// 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(String url)
Define o URL onde o arquivo de áudio será obtido.
| Nome | Tipo | Descrição |
|---|---|---|
| URL | Cadeia de caracteres | URL do arquivo de áudio a ser reproduzido. |
| Tipo | Descrição |
|---|---|
| vazio |
// 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()
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.
| Nome | Tipo | Descrição |
|---|---|---|
| Nenhum |
| Tipo | Descrição |
|---|---|
| vazio |
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)
Define a chave que encerra a gravação.
| Nome | Tipo | Descrição |
|---|---|---|
| FinishKey | Cadeia de caracteres | Chave que encerra a gravação. Valores válidos:
|
| Tipo | Descrição |
|---|---|
| vazio |
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)
Define a duração máxima da gravação.
| Nome | Tipo | Descrição |
|---|---|---|
| segundos | Inteiro | Duração máxima da gravação em segundos. Padrão: 3600 |
| Tipo | Descrição |
|---|---|
| vazio |
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 - tempo limite de addRecord.setTimeout(Integer)
Define o número de segundos de silêncio, após o qual a gravação termina.
| 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 |
| Tipo | Descrição |
|---|---|
| vazio |
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()
Rejeita uma chamada de entrada.
| Nome | Tipo | Descrição |
|---|---|---|
| Nenhum |
| 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. |
// 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)
Define o motivo pelo qual a chamada foi rejeitada.
| Nome | Tipo | Descrição |
|---|---|---|
| motivo | Cadeia de caracteres | Motivo pelo qual a chamada foi rejeitada. Valores válidos:
|
| Tipo | Descrição |
|---|---|
| vazio |
// instantiate NotifyAction
var notifyAction = new SNC.NotifyAction();
// reject the call
var rejectAction = notifyAction.addReject();
rejectAction.setReason('busy'); // 'busy' or 'rejected'
NotifyAction - addSay()
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.
| Nome | Tipo | Descrição |
|---|---|---|
| Nenhum |
| Tipo | Descrição |
|---|---|
| SayAction | Ação adicionada ao objeto NotifyAction. Use o objeto SayAction para definir o texto e o idioma a serem lidos. |
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(String idioma)
Define o idioma no qual o texto será falado.
Use este método em conjunto com SetText() método para definir o texto a ser falado.
| 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". |
| Tipo | Descrição |
|---|---|
| vazio |
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)
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.
| Nome | Tipo | Descrição |
|---|---|---|
| texto | Cadeia de caracteres | Texto a ser lido em voz alta na chamada atual. |
| Tipo | Descrição |
|---|---|
| vazio |
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()
Envia uma mensagem SMS.
| Nome | Tipo | Descrição |
|---|---|---|
| Nenhum |
| Tipo | Descrição |
|---|---|
| SCSçã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. |
// 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)
Define o texto da mensagem SMS a ser enviada.
| Nome | Tipo | Descrição |
|---|---|---|
| message | Cadeia de caracteres | Texto da mensagem SMS a ser enviada. |
| Tipo | Descrição |
|---|---|
| vazio |
// 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)
Define o número de telefone para o qual a mensagem SMS será enviada.
| Nome | Tipo | Descrição |
|---|---|---|
| para | Cadeia de caracteres | Número de telefone compatível com E.164 para o qual enviar a mensagem SMS. |
| Tipo | Descrição |
|---|---|
| vazio |
// 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)
Anexa o objeto NotifyAction especificado ao objeto NotifyAction do cliente atual.
- PlayAction
- Ação de Registro
- SayAction
- SCSção
NotifyActions são terminais. Se você tentar adicionar outra NotifyAction após uma ação de terminal, a chamada falhará.
| Nome | Tipo | Descrição |
|---|---|---|
| ação | NotifyAction | Objeto NotifyAction a ser anexado ao objeto NotifyAction do solicitante atual. |
| Tipo | Descrição |
|---|---|
| vazio |
NotifyAction - fromJson(cadeia de caracteres json)
Desserializar um NotifyAction Objeto de uma cadeia de caracteres JSON.
| Nome | Tipo | Descrição |
|---|---|---|
| json | Cadeia de caracteres | Uma representação de cadeia de caracteres JSON de um NotifyAction objeto. |
| Tipo | Descrição |
|---|---|
| vazio |
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 da serialização:("fClassName":"NotifyAction", "Factions":[["fClassName":"QueueAction","fDequeue":true,"fQueueName":"myQueue"]) ** Script: Novo resultado da serialização
NotifyAction - setCallRecord(GlideRecord CallRecord CallRecord)
Define o registro de chamada do Notify no qual as ações subsequentes serão adicionadas.
| Nome | Tipo | Descrição |
|---|---|---|
| CallRecord | 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. |
| Tipo | Descrição |
|---|---|
| vazio |
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()
Serializar o. NotifyAction Objeto para uma cadeia de caracteres JSON.
| Nome | Tipo | Descrição |
|---|---|---|
| Nenhum |
| Tipo | Descrição |
|---|---|
| Cadeia de caracteres | Representação JSON deste objeto NotifyAction. |
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 da serialização:("fClassName":"NotifyAction", "Factions":[["fClassName":"QueueAction","fDequeue":true,"fQueueName":"myQueue"]) ** Script: Novo resultado da serialização