알림 작업 - 전역

  • 릴리스 버전: Xanadu
  • 업데이트 날짜 2024년 08월 01일
  • 읽기43분
  • NotifyAction API를 사용하면 전화 통신 공급자에게 보낼 작업을 정의할 수 있습니다.

    각 작업 유형에 대해 각 add 함수를 호출하여 NotifyAction 개체에 작업을 추가합니다. 각 add 함수는 addSay() 메서드에 대한 SayAction 객체와 같은 Action 객체를 반환합니다. 반환된 개체에 대한 자세한 내용은 각 메서드 예제를 참조하십시오.

    주:
    NotifyAction API는 전역 애플리케이션 내에서만 유효합니다. 범위가 지정된 애플리케이션 내에서 이러한 유형의 기능을 활용하려면 사용자 지정 알림 워크플로우 활동을 만들어야 합니다. 이러한 활동을 만드는 방법에 대한 자세한 내용은 워크플로우 활동 알림을 참조하십시오.

    알림 작업 - addConference()

    현재 통화를 현재 전화 회의로 이동하는 전화 회의를 추가합니다.

    표 1. 매개변수
    이름 유형 설명
    없음
    표 2. 반환
    유형 설명
    ConferenceAction (회의작업) NotifyAction 개체에 추가된 작업입니다. ConferenceAction 개체를 사용하여 전화 회의 이름과 참가자가 참가하거나 나갈 때의 전화 회의 동작을 정의할 수 있습니다.

    이 예제에서는 회의 동작을 추가하고 회의 이름을 설정하는 방법을 보여 줍니다.

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

    알림 작업 - addConference.setEndOnExit(부울 endOnExit)

    지정된 호출자가 전화 회의에서 퇴장할 때 전화 회의를 끝낼지 여부를 정의합니다.

    표 3. 매개변수
    이름 유형 설명
    endOnExit (종료시) 부울 지정된 호출자가 현재 전화 회의에서 퇴장할 때 전화 회의를 끝낼지 여부를 나타내는 플래그입니다.
    • True: 지정된 호출자가 컨퍼런스 회의에서 나가면 컨퍼런스 회의를 종료합니다.
    • false: 기본값. 모든 참가자가 나가면 전화 회의 종료
    표 4. 반환
    유형 설명
    void

    이 예제에서는 전화 회의 동작을 추가한 다음 지정된 호출자가 종료할 때 전화 회의가 종료되도록 설정하는 방법을 보여 줍니다.

    // 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(부울 hangupOnStar)

    참가자가 별표(*) 키를 누를 때 컨퍼런스 회의를 종료할지 여부를 정의합니다.

    표 5. 매개변수
    이름 유형 설명
    hangupOnStar 부울 참가자가 별표(*) 키를 누를 때 컨퍼런스 회의를 종료할지 여부를 나타내는 플래그입니다.

    유효한 값은 다음과 같습니다.

    • True: 컨퍼런스 회의를 종료합니다.
    • false: 기본값. 전화 회의를 종료하지 않음
    표 6. 반환
    유형 설명
    void

    이 예제에서는 전화 회의 동작을 추가한 다음 전화 회의를 녹음하는 방법을 보여 줍니다.

    // 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(부울 음소거됨)

    지정된 호출자가 현재 전화 회의에서 음소거되어야 하는지 여부를 정의합니다.

    이 메서드를 호출하지 않으면 호출자는 기본적으로 음소거되지 않습니다.

    표 7. 매개변수
    이름 유형 설명
    음소거 부울 지정된 호출자를 현재 전화 회의에서 음소거해야 하는지 여부를 나타내는 플래그입니다.
    • True: 호출자가 음소거 상태여야 합니다.
    • false: 기본값. 호출자는 음소거되어서는 안 됩니다.
    표 8. 반환
    유형 설명
    void

    이 예제에서는 회의 동작을 추가한 다음 지정된 호출자를 음소거하는 방법을 보여 줍니다.

    // 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(문자열 이름)

    현재 전화 회의의 이름을 지정된 이름으로 설정합니다.

    표 9. 매개변수
    이름 유형 설명
    이름 문자열 현재 컨퍼런스 회의에 연결할 이름입니다.
    표 10. 반환
    유형 설명
    void

    이 예제에서는 전화 회의 동작을 추가하고 전화 회의 이름을 설정하는 방법을 보여 줍니다.

    // 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(부울 기록)

    관련된 전화 회의를 기록할지 여부를 정의합니다.

    이 메서드를 호출하지 않으면 기본적으로 전화 회의가 녹음되지 않습니다.

    표 11. 매개변수
    이름 유형 설명
    기록 부울 현재 전화 회의를 기록해야 하는지 여부를 나타내는 플래그입니다.
    • True: 전화 회의 기록을 시작합니다.
    • false: 기본값. 컨퍼런스 회의가 녹음되지 않습니다. 현재 기록 중이면 기록이 중지됩니다.
    표 12. 반환
    유형 설명
    void

    이 예제에서는 전화 회의 동작을 추가한 다음 전화 회의를 녹음하는 방법을 보여 줍니다.

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

    알림 작업 - addConference.setStartOnEnter(부울 startOnEnter)

    지정된 호출자가 전화 회의에 참가할 때 전화 회의를 시작해야 하는지 여부를 정의합니다.

    기본적으로 호출자가 두 명 이상일 때마다 전화 회의가 시작됩니다. 특정 호출자가 참가할 때만 전화 회의가 시작되도록 하려면 다른 각 호출자에 대해 이 메서드를 호출하고 값을 "false"로 설정해야 합니다. 이렇게 하면 원하는 사람이 전화 회의에 참가할 때까지 전화 회의가 시작되지 않습니다.

    표 13. 매개변수
    이름 유형 설명
    시작온엔터 부울 선택한 호출자가 현재 전화 회의에 참가할 때 전화 회의를 시작해야 하는지 여부를 나타내는 플래그입니다.
    • true: 기본값입니다. 지정된 호출자가 전화 회의에 참가하면 전화 회의를 시작합니다.
    • false: 추가된 컨퍼런스 회의 시작
    표 14. 반환
    유형 설명
    void

    이 예제에서는 전화 회의 동작을 추가한 다음 지정된 호출자가 참가할 때까지 전화 회의가 시작되지 않도록 설정하는 방법을 보여 줍니다.

    // 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()

    지정된 전화 번호 또는 알림 클라이언트로 호출을 전달합니다.

    addDial 액션이 생성되면 연결된 전화번호(setPhoneNumber()) 또는 알림 클라이언트(setClientRecord())도 설정해야 합니다.

    표 15. 매개변수
    이름 유형 설명
    없음
    표 16. 반환
    유형 설명
    DialAction NotifyAction 개체에 추가된 작업입니다.

    이 예에서는 아웃바운드 전화를 걸고 통화를 녹음하는 방법을 보여줍니다.

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

    알림 작업 - addDial.setCallerID(문자열 callerID)

    발신 콜의 발신자 ID를 정의합니다.

    표 17. 매개변수
    이름 유형 설명
    callerID 문자열 발신 콜에 대해 설정할 발신자 식별자입니다.
    표 18. 반환
    유형 설명
    void

    이 예에서는 아웃바운드 호출을 하고 통화 시간 제한을 설정하는 방법을 보여줍니다.

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

    알림 작업 - addDial.setClientRecord(문자열 tableName, 문자열 sysID)

    알림 발신자 기록과 발신자의 고유 식별자를 찾을 테이블을 지정하여 현재 발신자를 알림 발신자로 설정합니다.

    표 19. 매개변수
    이름 유형 설명
    tableName 문자열 원하는 호출자의 정보가 들어 있는 테이블의 이름입니다.
    sysID 문자열 원하는 알림 호출자의 고유 식별자(sys_id)입니다.
    표 20. 반환
    유형 설명
    void

    이 예제에서는 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(문자열 값)

    통화가 연결될 때 재생할 DTMF 신호음을 정의합니다.

    표 21. 매개변수
    이름 유형 설명
    문자열 통화가 연결될 때 재생할 유효한 DTMF 숫자입니다.
    표 22. 반환
    유형 설명
    void

    이 예에서는 아웃바운드 통화를 하는 방법을 보여 주며 통화가 연결될 때 재생할 DTMF 신호음을 정의합니다.

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

    알림 작업 - addDial.setHangupOnStar(부울 hangupOnStar)

    별표(*) 키를 누를 때 호출을 종료할지 여부를 정의합니다.

    표 23. 매개변수
    이름 유형 설명
    hangupOnStar 부울 별표(*) 키를 누를 때 호출을 종료해야 하는지 여부를 나타내는 플래그입니다.
    • true: 통화를 종료합니다.
    • false: 통화를 종료하지 않음
    표 24. 반환
    유형 설명
    void

    이 예에서는 아웃바운드 전화를 걸고 전화 끊기 키를 별표로 설정하는 방법을 보여줍니다.

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

    호출할 전화 번호를 정의합니다.

    표 25. 매개변수
    이름 유형 설명
    phoneNumber 문자열 발신 대상 E.164 호환 전화 번호입니다.
    표 26. 반환
    유형 설명
    void

    이 예에서는 아웃바운드 호출을 하고 통화 시간 제한을 설정하는 방법을 보여줍니다.

    // 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(부울 기록)

    발신 통화를 기록할지 여부를 정의합니다.

    표 27. 매개변수
    이름 유형 설명
    기록 발신 통화를 녹음해야 하는지 여부를 나타내는 플래그입니다.

    유효한 값은 다음과 같습니다.

    • True: 발신 통화를 녹음합니다.
    • false: 발신 통화를 녹음하지 않습니다.
    표 28. 반환
    유형 설명
    void

    이 예에서는 아웃바운드 전화를 걸고 통화를 녹음하는 방법을 보여줍니다.

    // 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(정수 시간 제한)

    발신 콜이 시간 초과될 때까지의 시간(초)을 설정합니다.

    표 29. 매개변수
    이름 유형 설명
    시간 제한 정수 발신 콜이 시간 초과될 때까지의 시간(초)입니다. 기본값: 30
    표 30. 반환
    유형 설명
    void

    이 예에서는 아웃바운드 호출을 하고 통화 시간 제한을 설정하는 방법을 보여줍니다.

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

    알림 작업 - addGather()

    지정된 대화형 전화 메뉴를 발신자에게 제공합니다.

    표 31. 매개변수
    이름 유형 설명
    없음
    표 32. 반환
    유형 설명
    개더액션(GatherAction) NotifyAction 개체에 추가된 작업입니다. GatherAction 개체를 사용하여 사용자에게 표시할 메뉴 설정 및 옵션을 정의합니다.
    // 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()

    통화 시 오디오 파일을 재생합니다.

    지원되는 자식 메서드에 대한 설명은 NotifyAction addPlay() 메서드를 참조하십시오.

    표 33. 매개변수
    이름 유형 설명
    없음
    표 34. 반환
    유형 설명
    플레이액션 NotifyAction 개체에 추가된 작업입니다. PlayAction 개체를 사용하여 오디오 파일 URL과 오디오를 반복할 횟수를 정의합니다.
    // 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()

    통화 시 읽을 텍스트 음성 변환을 정의합니다.

    지원되는 자식 메서드에 대한 설명은 NotifyAction addSay() 메서드를 참조하십시오.

    표 35. 매개변수
    이름 유형 설명
    없음
    표 36. 반환
    유형 설명
    세이액션(SayAction) NotifyAction 개체에 추가된 작업입니다. SayAction 개체를 사용하여 읽을 텍스트와 언어를 정의합니다.
    // 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');
    

    알림 작업 - addGather.setFinishKey(문자열 finishKey)

    호출자가 입력의 끝을 나타내기 위해 입력하는 키를 정의합니다.

    표 37. 매개변수
    이름 유형 설명
    finishKey 문자열 호출자 입력의 끝을 나타내는 키입니다.

    유효한 값은 다음과 같습니다.

    • 0-9
    • #(기본값)
    • *
    표 38. 반환
    유형 설명
    void

    이 예제에서는 수집 작업을 추가하고 호출자 입력의 끝을 나타내는 키를 정의하는 방법을 보여 줍니다.

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

    NotifyAction - addGather.setNumberOfDigits(정수 numberOfDigits)

    수집할 자릿수를 정의합니다.

    표 39. 매개변수
    이름 유형 설명
    numberOfDigits (숫자의숫자) 정수 수집할 자릿수입니다. 0은 잘못된 값입니다.
    표 40. 반환
    유형 설명
    void

    이 예제에서는 수집 작업을 추가하고 수집할 키 입력 수를 정의하는 방법을 보여 줍니다.

    // 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(정수 시간 제한)

    입력 수집이 시간 초과되기까지의 시간을 정의합니다.

    표 41. 매개변수
    이름 유형 설명
    시간 제한 정수 시간이 초과되기 전에 호출자 입력을 기다리는 시간(초)입니다. 기본값: 10
    표 42. 반환
    유형 설명
    void

    이 예제에서는 수집 작업을 추가하고 입력 시간 제한 값을 정의하는 방법을 보여 줍니다.

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

    알림 작업 - addHangUp()

    활성 전화 통화를 종료합니다.

    표 43. 매개변수
    이름 유형 설명
    없음
    표 44. 반환
    유형 설명
    행업액션 NotifyAction 개체에 추가된 작업입니다.
    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();
    
    // hang up
    notifyAction.addHangUp();

    NotifyAction - addQueue()

    통화를 대기시키면 통화가 보류됩니다.

    표 45. 매개변수
    이름 유형 설명
    없음
    표 46. 반환
    유형 설명
    큐액션(QueueAction) NotifyAction 개체에 추가된 작업입니다. QueueAction 개체를 사용하여 큐 이름, 큐 또는 큐 제거 동작을 정의합니다.

    이 예에서는 지정된 큐에 호출을 추가하는 방법을 보여줍니다.

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();
    
    // queue the call
    var queue = notifyAction.addQueue();
    queue.setName('my queue');

    이 예에서는 대기열에서 통화를 제거하는 방법을 보여줍니다.

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();
    
    // dequeue the call
    var queue = notifyAction.addQueue();
    queue.setDequeue(true);

    NotifyAction - addQueue.setDequeue(부울 큐에서 제거)

    현재 통화 큐에서 호출을 제거합니다("보류 상태에서 해제").

    표 47. 매개변수
    이름 유형 설명
    부울 큐에서 현재 호출을 제거할지 여부를 나타내는 플래그입니다.
    • true: 큐에서 호출을 제거합니다.
    • false: 호출이 큐에 놓입니다.
    표 48. 반환
    유형 설명
    void

    이 예에서는 대기열에서 통화를 제거하는 방법을 보여줍니다.

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();
    
    // dequeue the call
    var queue = notifyAction.addQueue();
    queue.setDequeue(true);

    NotifyAction - addQueue.setName(문자열 이름)

    큐와 연결된 이름을 정의합니다.

    표 49. 매개변수
    이름 유형 설명
    이름 문자열 큐와 연결할 이름입니다.
    표 50. 반환
    유형 설명
    void

    이 예제에서는 큐의 이름을 정의하는 방법을 보여 줍니다.

    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();
    
    // queue the call
    var queue = notifyAction.addQueue();
    queue.setName('my queue');

    NotifyAction - addPlay()

    통화 시 오디오 파일을 재생합니다.

    표 51. 매개변수
    이름 유형 설명
    없음
    표 52. 반환
    유형 설명
    플레이액션 NotifyAction 개체에 추가된 작업입니다. PlayAction 개체를 사용하여 오디오 파일 URL과 오디오를 반복할 횟수를 정의합니다.
    // 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(정수 루프)

    오디오 파일을 재생(루프 스루)하는 횟수를 정의합니다.

    표 53. 매개변수
    이름 유형 설명
    루프 정수 오디오 파일을 재생하는 횟수입니다.
    표 54. 반환
    유형 설명
    void
    // 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)

    재생할 오디오 파일을 가져올 URL을 정의합니다.

    표 55. 매개변수
    이름 유형 설명
    URL 문자열 재생할 오디오 파일의 URL입니다.
    표 56. 반환
    유형 설명
    void
    // 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);

    알림 작업 - addRecord()

    현재 NotifyAction 객체에 대한 호출을 기록하는 작업을 추가합니다.

    호출이 완료되거나 지정된 종료를 누르면 녹음이 자동으로 종료됩니다(setFinishKey()). 그런 다음 연결된 호출의 notify_record 테이블에 기록이 배치됩니다.

    표 57. 매개변수
    이름 유형 설명
    없음
    표 58. 반환
    유형 설명
    void

    이 예제에서는 통화를 녹음하는 방법을 보여 줍니다.

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

    알림 작업 - addRecord.setFinishKey(문자열 finishKey)

    녹음을 종료하는 키를 정의합니다.

    표 59. 매개변수
    이름 유형 설명
    finishKey 문자열 녹음을 종료하는 키입니다.

    유효한 값은 다음과 같습니다.

    • 0-9
    • #(기본값)
    • *
    표 60. 반환
    유형 설명
    void

    이 예제에서는 통화를 녹음하고 통화 종료 키를 설정하는 방법을 보여 줍니다.

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

    알림 작업 - addRecord.setMaxDuration(정수 초)

    기록의 최대 길이를 정의합니다.

    표 61. 매개변수
    이름 유형 설명
    정수 기록의 최대 길이(초)입니다. 기본값: 3600
    표 62. 반환
    유형 설명
    void

    이 예제에서는 통화를 녹음하고 통화 종료 키를 설정하는 방법을 보여 줍니다.

    // 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(정수 시간 제한)

    녹음이 종료된 후 무음 시간(초)을 설정합니다.

    표 63. 매개변수
    이름 유형 설명
    시간 제한 정수 녹음이 종료되기까지 통화 음소거 시간(초)입니다. 기본값: 10
    표 64. 반환
    유형 설명
    void

    이 예제에서는 통화를 녹음하고 녹음 시간 제한 값을 설정하는 방법을 보여 줍니다.

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

    알림 작업 - addReject()

    수신 콜을 거부합니다.

    표 65. 매개변수
    이름 유형 설명
    없음
    표 66. 반환
    유형 설명
    거부 작업 NotifyAction 개체에 추가된 작업입니다. RejectAction 개체를 사용하여 호출을 거부하는 이유를 정의합니다.
    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();
    
    // reject the call
    var rejectAction = notifyAction.addReject();
    rejectAction.setReason('busy'); // 'busy' or 'rejected'

    NotifyActon - addReject.setReason(문자열 이유)

    호출이 거부된 이유를 정의합니다.

    표 67. 매개변수
    이름 유형 설명
    이유 문자열 콜이 거부된 이유입니다.

    유효한 값은 다음과 같습니다.

    • 통화 중
    • 거부됨
    다른 모든 값은 무시됩니다.
    표 68. 반환
    유형 설명
    void
    // instantiate NotifyAction
    var notifyAction = new SNC.NotifyAction();
    
    // reject the call
    var rejectAction = notifyAction.addReject();
    rejectAction.setReason('busy'); // 'busy' or 'rejected'

    NotifyAction - addSay()

    통화 시 읽을 텍스트 음성 변환을 정의합니다.

    텍스트 음성 변환에서는 여러 언어가 지원됩니다. 사용 가능한 언어는 전화 통신 공급자에 따라 다릅니다.

    표 69. 매개변수
    이름 유형 설명
    없음
    표 70. 반환
    유형 설명
    세이액션(SayAction) NotifyAction 개체에 추가된 작업입니다. SayAction 개체를 사용하여 읽을 텍스트와 언어를 정의합니다.

    이 예제에서는 여러 언어로 된 텍스트를 읽는 방법을 보여 줍니다.

    // 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(문자열 언어)

    텍스트를 말할 언어를 정의합니다.

    이 메서드를 setText() 메서드와 함께 사용하여 말할 표현을 정의합니다.

    표 71. 매개변수
    이름 유형 설명
    언어 문자열 관련 텍스트를 말하는 데 사용할 언어를 정의하는 ISO 3166 언어 코드입니다. 예를 들어 "en-US" 또는 "nl-NL"입니다.
    표 72. 반환
    유형 설명
    void

    이 예제에서는 여러 언어로 된 텍스트를 읽는 방법을 보여 줍니다.

    // 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(문자열 텍스트)

    현재 호출 내에서 읽을 텍스트를 정의합니다.

    setLanguage() 메서드와 함께 이 메서드를 사용하여 제공된 텍스트를 말할 언어를 정의합니다.

    표 73. 매개변수
    이름 유형 설명
    텍스트 문자열 현재 통화 내에서 소리 내어 읽을 텍스트입니다.
    표 74. 반환
    유형 설명
    void

    이 예제에서는 여러 언어로 된 텍스트를 읽는 방법을 보여 줍니다.

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

    알림 작업 - addSMS()

    SMS 메시지를 보냅니다.

    주:
    활성 호출과 함께 이 함수를 사용하는 경우 반환된 SMSAction 개체에서 setTo 함수를 호출할 필요가 없습니다. SMS가 발신자에게 자동으로 전송됩니다.
    표 75. 매개변수
    이름 유형 설명
    없음
    표 76. 반환
    유형 설명
    SMSAction (SMSAction) NotifyAction 개체에 추가된 작업입니다. SMSAction 개체를 사용하여 메시지 텍스트와 메시지를 보낼 전화 번호를 정의합니다.
    // 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(문자열 메시지)

    보낼 SMS 메시지의 텍스트를 정의합니다.

    표 77. 매개변수
    이름 유형 설명
    메시지 문자열 보낼 SMS 메시지의 텍스트입니다.
    표 78. 반환
    유형 설명
    void
    // 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);

    알림 작업 - addSMS.setTo(문자열 to)

    SMS 메시지를 보낼 전화 번호를 설정합니다.

    표 79. 매개변수
    이름 유형 설명
    대상 문자열 SMS 메시지를 보낼 E.164 호환 전화 번호입니다.
    표 80. 반환
    유형 설명
    void
    // 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 - 추가(NotifyAction 작업)

    지정된 NotifyAction 개체를 현재 클라이언트의 NotifyAction 개체에 추가합니다.

    NotifyActions에는 터미널과 비터미널의 두 가지 유형이 있습니다. 클라이언트의 NotifyAction 개체에 터미널 작업을 추가한 후에는 추가 작업을 추가할 수 없습니다. 터미널이 아닌 작업에는 다음이 포함됩니다.
    • 플레이액션
    • 레코드 동작
    • 세이액션(SayAction)
    • SMSAction (SMSAction)

    다른 모든 NotifyActions는 터미널입니다. 터미널 작업 후에 다른 NotifyAction을 추가하려고 하면 호출이 실패합니다.

    표 81. 매개변수
    이름 유형 설명
    작업 알림 작업 현재 호출자의 NotifyAction 개체에 추가할 NotifyAction 개체입니다.
    표 82. 반환
    유형 설명
    void

    알림 작업 - fromJson(문자열 json)

    JSON 문자열에서 NotifyAction 개체를 역직렬화합니다.

    표 83. 매개변수
    이름 유형 설명
    JSON 문자열 NotifyAction 개체의 JSON 문자열 표현입니다.
    표 84. 반환
    유형 설명
    void

    이 예제에서는 NotifyAction 개체를 deserialize하는 방법을 보여 줍니다.

    var json = ".... some json obtained from toJson ....";
    
    // instantiate notify action
    var notifyAction = new SNC.NotifyAction();
    
    // deserialize and reconstruct the notify action instance
    notifyAction.fromJson(json);

    이 예제에서는 NotifyAction 개체를 serialize 및 deserialize하는 방법을 보여 줍니다.

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

    출력: *** 스크립트: serialization 결과: {"fClassName":"NotifyAction","fActions":[{"fClassName":"QueueAction","fDequeue":true,"fQueueName":"myQueueName"}]} *** 스크립트: 새 serialization 결과: {"fClassName":"NotifyAction","fActions":[{"fClassName":"QueueAction","fDequeue":true,"fQueueName":"myQueueName"}]} *** 스크립트: 동일: true

    알림 작업 - setCallRecord(GlideRecord callRecord)

    후속 작업을 추가할 알림 통화 기록을 정의합니다.

    표 85. 매개변수
    이름 유형 설명
    callRecord GlideRecord 작업을 추가할 호출자의 기록(notify_call 테이블 내)을 포함하는 GlideRecord입니다. 이 호출자는 이 메서드가 다른 호출자와 함께 다시 호출될 때까지 계속 적용됩니다.
    표 86. 반환
    유형 설명
    void

    이 예제에서는 작업을 추가할 호출자를 설정하는 방법을 보여 줍니다.

    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()

    NotifyAction 개체를 JSON 문자열로 직렬화합니다.

    표 87. 매개변수
    이름 유형 설명
    없음
    표 88. 반환
    유형 설명
    문자열 이 NotifyAction 개체의 JSON 표현입니다.

    이 예제에서는 NotifyAction 개체를 serialize하는 방법을 보여 줍니다.

    // instantiate notify action
    var notifyAction = new SNC.NotifyAction();
    
    // add one or more notify actions
    // ...
    
    // and serialize to json
    var json = notifyAction.toJson();

    이 예제에서는 NotifyAction 개체를 serialize 및 deserialize하는 방법을 보여 줍니다.

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

    출력: *** 스크립트: serialization 결과: {"fClassName":"NotifyAction","fActions":[{"fClassName":"QueueAction","fDequeue":true,"fQueueName":"myQueueName"}]} *** 스크립트: 새 serialization 결과: {"fClassName":"NotifyAction","fActions":[{"fClassName":"QueueAction","fDequeue":true,"fQueueName":"myQueueName"}]} *** 스크립트: 동일: true