Finesse Connector is necessary for tightly integration of Сontact Сenter operator`s workstation and Finesse web-application.
Application features are:
- Make call via Finesse by clicking on URL with tel:// protocol (Click-To-Call);
- Proxy requests to Finesse API;
- (will be added later)...
npm install
yarn install
Historically project used npm
, but electron-builder required yarn
, so now on project uses both package managers.
To make distributable package for Windows run yarn dist
. This command creates NSIS installer with ClickOnce feature.
Application can be packaged to run at Linux and MacOS by electron-builder, but it's requires some additional step with help of electron-builder documentation.
After installation application folder must have such structure:
- FinesseConnector
- resources
- app.asar.unpacked
- cert
- certificate.pem - certificate for server validation
- key.pem - certificate private key
- config
- cert
- app.asar.unpacked
- resources
Configuration parameters are:
httpPort
- HTTP port to listen requests on;httpsPort
- HTTPS port to listen requests on;longpollingTimeout
- after getting request application will waits for data to send as response for specified milliseconds (for example waits command to perform Click-To-Call);clickToCallCommandTtl
- after operator clicktel://
URL appropriate command will waits incoming HTTP request for specified time in milliseconds. If come no request then command will be forgotten;finesseApiCommandTtl
- after external application sends Finesse API request via Finesse Connector appropriate command will waits incoming HTTP request for specified time in milliseconds. If come no request then command will be forgotten;logger
- application trace configuration (based on rotating-file-stream, electron-log and morgan):fileName
- path and name of logging file. Can be relative or absolute path;logLevel
- debug, info, warn, error;size
- specifies the file size to rotate the file;interval
- specifies the time interval to rotate the file;maxSize
- specifies the maximum size of rotated files to keep;morganFormat
- HTTP request/response output format.
After start application runs Web Server and listen requests on specified at configuration file HTTP and HTTPS ports (must be specified at least one of them). Recommended to use HTTPS port because of security consideration and better browsers support.
Note
HTTP will not work at Internet Explorer if Finesse works under HTTPS.
For working under HTTPS you must:
-
Create HostA record for 127.0.0.1 at DNS. For example it may be record with name "local";
-
Create certificate for server validation with "Issued To" equals to FQDN of HostA from step 1;
Certificate can be created by technical department of your organization.
As an alternative you can create self-signed certificate using OpenSSL CLI:
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out certificate.pem -days XXX
-
Copy generated certificate and it's private key to application's folder ".\resources\app.asar.unpacked\cert".
At Windows 7 required no additional steps to register Finesse Connector as tel:// protocol handler.
At Windows 10 you must add some records to registry (bug report at electron project - #14108). As an example you should use this .reg file (you must write correct path to application at keys "\DefaultIcon" and "\shell\open\command").
Additional info can be found here.
- Open project folder in VSCode
- Debug->Add Configuration...
- add this code to the opened file:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}\\main.js",
"stopOnEntry": false,
"args": [],
"cwd": "${workspaceRoot}",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron",
"runtimeArgs": [
".",
"--enable-logging"
],
"env": {},
"externalConsole": false,
"sourceMaps": false,
"outDir": null
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 9998,
"sourceMaps": false,
"outDir": null
}
]
}
- Debug-> Start Debugging (F5)