How to configure and use the AgentWebSocketPlugin
AgentWebSocketPlugin is a plugin for the Agent Application that enables control of the application via WebSocket.
Installation
The AgentWebSocketPlugin is part of the Agent Application but is not enabled by default.
In latest versions of Contact Expert, the plugin is installed by the Agent Application installer into the plugins\AgentWebSocketPlugin
directory of the application installation directory.
Note
The plugin is not installed by default in older versions of Contact Expert. In this case, the plugin needs to be installed manually by copying the plugin files provided in AgentWebSocketPlugin.zip
package into the plugins\AgentWebSocketPlugin
directory of the application installation directory.
In this case, make sure the plugin files are not blocked by Windows. To unblock the files, right-click on each file, select Properties, and click Unblock.
How to enable the plugin
The plugin can be enabled by changing the following parameters of the AgentClientApp.Config.xml
file:
...
<ConfigParam name="GC_AGENT_PLUGIN_1" ignore="no" value="C:\Geomant\CE\Servers\AgentClientApp.Net\plugins\AgentWebSocketPlugin\AgentWebSocketPlugin.dll">
<Description> Plugin to be loaded by agent application. Plugins must extend the Com.Geomant.CE.AgentPlugin.AgentPluginBase abstact class defined in AgentPlugin.dll</Description>
</ConfigParam>
...
Ensure that the ignore
attribute of the GC_AGENT_PLUGIN_1
parameter is set to no
, and the value
attribute of the GC_AGENT_PLUGIN_1
parameter points to the correct location of the plugin.
Plugin configuration
Plugin configuration is done via the AgentWebSocketPlugin.dll.config
file located in the plugins\AgentWebSocketPlugin
directory of the application installation directory.
This configuration file controls the parameters of the WebSocket server hosted by the plugin.
You can change the address and port of the server, and can set up a secure websocket connection.
Note
To discover the connection details to the plugin's WebSocket server, refer to the parameters specified in the AgentWebSocketPlugin.dll.config
file.
For instance, if the webSocketIP
parameter is set to '0.0.0.0', the webSocketPort
parameter is set to '8082', and the webSocketUseSSL
parameter is set to 'false', the WebSocket server will be accessible at 'ws://localhost:8082'.
Usage of the plugin
The plugin exposes the Agent Automation API via WebSocket. The API is presented as a collection of JSON messages that can be transmitted and received through the WebSocket server.
There is 3 types of messages:
Request - a message sent from the client to the server to request some action to be performed. The server will respond with a response message. The request message must include a
request
field describing the type of request and arequestId
field used to match the request with the response, ensuring the uniqueness of each request. The request message may include additional fields describing the request. Example:{ "request": "InitiateCustomerCall", "requestId": "3bd83580-e942-4b4c-bf14-2affb2eccf71", "campaignId": 1, "uri": "+123456789" }
Response - a message sent from the server to the client in response to a request. The response message consistently comprises several fields: a
response
field describing the request type, arequestId
field matching the response with the request, arequestResult
field indicating the request outcome, afailureReason
field detailing the reason for request failure, and optionally, adata
field containing additional descriptive fields related to the response. Example:{ "response": "InitiateCustomerCall", "requestId": "3bd83580-e942-4b4c-bf14-2affb2eccf71", "requestResult": "Success" }
{ "response": "GetBusinessTags", "requestId": "3f157e38b-4c11-4090-b6f6-538d248664c5", "requestResult": "Success", "data": { "businessTags": [ { "campaign": 1, "label": "Tag1" } ] } }
Event - a message sent from the server to the client to notify about some event. The event message always includes an
event
field specifying the event type, along with supplementary descriptive fields associated with the event. Example:{ "event": "AgentStateChanged", "timestamp": "2024-01-02T15:32:02.3351685Z", "media": "Voice", "state": "Idle", "transitionReason": "Unspecified" }
For a complete list of available messages, contact your Geomant representative.
Known issues
'Abandoned at agent' closure code is not available:
The 'Abandoned at agent' closure code iss not accessible via the AgentWebSocketPlugin interface. As a result, users of the AgentWebSocketPlugin cannot select this closure code.
No information available about the selected work code:
The selected work code can not be synchronized between the Agent Application and the user of AgentWebSocketPlugin.