How to use the new CTI method

The new CTI implementation requires a system administrator to configure the CTI application to call a system event before each client system can take telephony calls.

The new CTI method also requires users to append ?telephonyuser=1 to the web tier client URL. When users access the telephony URL from a browser (for example, Internet Explorer) that supports Java applet technology, JVM is started to check the Java version installed on the client system. This checking is not needed for the new CTI method, which does not use the CTI applet. To skip this unnecessary checking, a system administrator must disable the legacy CTI method when using the new method.

Each client system does not require any configurations except that a browser setting must be enabled when Firefox is used as the browser.

The following describes the detailed steps for a system administrator and client users.

Disable the legacy CTI method

Perform the following steps:

  1. In the Service Manager web tier's webtier.properties file, set the enableLegacyTelephony parameter to false:

    enableLegacyTelephony=false

    Note If this parameter is not specified, the default value (true) is used.

  2. Restart the web tier application server.

(Optional) Edit or create system events

The new CTI implementation uses system events to create or edit records in Service Manager. Optionally, a system administrator can edit the out-of-box system events or create new ones to better suit your needs. For information about the out-of-box events, see How the new CTI method works.

You can edit the parameters in an out-of-box system event by updating the same-name script. To do this, follow these steps:

  1. Enter scripts in the Service Manager command line, and then press Enter.
  2. In the Script Name field, enter the script name (for example, ReceiveInteraction), and then click Search.
  3. Click the Pre RAD Statements tab, and then update the parameters and map them to specific fields in the incidents or probsummary dbdict as appropriate.

You can also add new system events. To do this, follow these steps:

  1. Enter db in the Service Manager command line, and press Enter. The Database Manager opens.
  2. In the Table field, enter SystemEvents.
  3. Click Search.
  4. Select an existing record, update the name, and then click Add.
  5. Save the new system event.
  6. Enter scripts in the Service Manager command line, and then press Enter.
  7. In the Script Name field, enter the name of the system event that you created, and then click Add.
  8. On the Pre RAD Statements tab, define your parameters and map them to appropriate fields in the corresponding dbdict.
  9. Save the script.

Next, you need to configure the CTI application to call a function that triggers a desired system event.

Configure the CTI application

A system administrator can perform the following tasks to configure the CTI application.

Configure the CTI application to create or edit a record

To create or edit a record (for example, create a new interaction) with the new method, a system administrator must configure the CTI application by adding the following functions to the telephony call VBA script:

Public Sub SendSystemEvent(params, browser)
    
    baseUrl = "http://smwebtierhost:8080/sm/telephony.html?SystemEvent="
    url = baseUrl & params
    Set ScriptEngine = CreateObject("scriptcontrol")
    ScriptEngine.Language = "JScript"
    url = ScriptEngine.Run("encodeURI", url)
    If browser = "chrome" Then
        OpenChrome (url)
    Else
        If browser = "firefox" Then
            OpenFirefox (url)
        Else
            OpenIE (url)
        End If
    End If
    'MsgBox "Creates an Interaction"
Exit Sub
error_handler:
    Debug.Print Err.Description
End Sub

Public Function OpenIE(url)
    Set IE = CreateObject("InternetExplorer.Application")
    IE.Visible = True
    IE.Navigate (url)

End Function

Public Function OpenChrome(url)
    Shell ("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" & " " & url)
End Function

Public Function OpenFirefox(url)
    Shell ("C:\Program Files (x86)\Mozilla Firefox\firefox.exe" & " " & url)

End Function

Sub ReceiveInteraction()
    params = """ReceiveInteraction"",""Caller Name"",""AGENT, SERVICEDESK"",""Category Type"",""incident"""
    Call SendSystemEvent(params, "chrome")
End Sub

Where you need to configure the following parameter values:

  • Update the baseUrl parameter to http://<your web tier host>:<port>/<web tier name>.

    Example: http://smwebtierhost:8080/webtier-9.60

  • At the end of the script above, ReceiveInteraction represents the out-of-box system event with the same name. You can replace this part with another system event and its parameters. For example, you can replace it with any of the following out-of-box system events:

    Sub ReceiveInteractionList()
        params = """ReceiveInteractionList"",""Caller Name"",""CAFFREY, AARON"",""Open Value"",""Assign"""
        Call SendSystemEvent(params, "chrome")
    End Sub
    
    
    Sub ReceiveInteractionStreamlined()
        params = """ReceiveInteractionStreamlined"",""Caller Name"",""CAFFREY, AARON"",""Category Type"",""incident"""
        Call SendSystemEvent(params, "chrome")
    End Sub
    
    Sub EditInteraction()
        params = """EditInteraction"",""Number"",""SD10002"""
        Call SendSystemEvent(params, "chrome")
    End Sub
    
    Sub ReceiveIncident()
        params = """ReceiveIncident"",""Caller Name"",""CAFFREY, AARON"""
        Call SendSystemEvent(params, "chrome")
    End Sub
    
    Sub EditIncident()
        params = """EditIncident"",""Number"",""IM10002"""
        Call SendSystemEvent(params, "chrome")
    End Sub

    In addition to the parameters defined in the system event script, you also need to specify a browser to send the system event: specify "chrome" for Chrome, "firefox" for Firefox, or "ie" for Internet Explorer.

  • For Internet Explorer, you do not need to specify the browser installation path. If using Chrome or Firefox, you need to update the browser installation path to your own in the OpenChrome(url) function or the OpenFirefox(url) function, repectively.

    Note This configuration requires that all telephony web clients use the same browser and the same browser installation path. If this is not the case, you need to configure the CTI application to allow each user to specify their specific browser and browser installation path.

Configure the CTI application to execute a transaction

The new CTI method also enables the CTI application to execute the Transact capability, which performs the action of a toolbar button or More menu option on a record detail form, such as an Interaction or Incident record detail form.

To do this, call the following sub function:

Sub ButtonTransferCallFromCTI()
    params = """Transact"",""3"""
    Call SendSystemEvent(params, "chrome")
End Sub

Where:

  • The Transact parameter value ("3" in the example above) represents the option ID of a button or menu option. You need to replace it with the option ID of your desired toolbar button or More menu option. For example, on the Interaction form, the Back button has an option ID of "3".

    Note This function is supported for all modules, not only the Interaction module. Additionally, multi-level menu options are supported.

  • The parameter value of "chrome" represents the browser that the web client is using. Change it to "ie" or "firefox" if Internet Explorer or Firefox is used.

How to determine the option ID of a button or menu option

Each option ID is defined either in the corresponding Display Screen record or in the corresponding Process Designer workflow (the Actions tab). The following are two examples.

The following figure shows that the option ID of the Back button is defined in the sd.new Display Screen record.

The following figure shows that the option ID of the Escalate button is defined in the ServiceDesk workflow.

Configure the client system when using Firefox

The new CTI implementation does not require any configurations on each web client system. The user is only required to log in to the web tier client with ?telephonyuser=1 appended to the web tier client URL.

However, when using Firefox, when the client system takes a telephony call, a blank page opens and remains open. This could be annoying when the client system takes multiple calls. To avoid this from happening, enable the dom.allow_scripts_to_close_windows setting in Firefox. To do this, follow these steps:

  1. In the Firefox address bar, type about:config.
  2. Change the dom.allow_scripts_to_close_windows setting from false to true.

When this setting is true, the blank page is closed immediately after it opens.

Note You can test the new CTI method using Microsoft Word and a web browser. For details, see How to test the new CTI method.