API CTI – Shuttle 2.4.0 onwards
...
The notification method is used to send a notification to the agent
Panelcode | ||
---|---|---|
| ||
var notification = function(peer, type, title, body) { socket.emit('AgentCTINotification', { peer: peer, type: type, title: title, body: body }); }; |
where
peer: the Agent interface
...
Push the event into the Integration Realtime section of the Administrator
These data will populate the following section of xCALLY Realtime:
...
bgColor | #E6E6FA |
---|
The pushevent method is used to display trigger action event in Realtime section
Code Block | ||
---|---|---|
| ||
var pushevent = function(appname, data, reference, url) { data.time = new Date(); socket.emit('RealtimeCTI', { type: appname, channel: data, reference: reference, url: url }); }; |
where
appname: name of the Integration
data: object containing information about the call
reference: CTI creation id
url: the address of the CTI
Example
...
For each event you can define which action you want the integration to perform.
In this example we associate to the UP event the CTI opening to an Agent, if the call belongs to the Sales Queue.
We also pass to the Agent a custom variable called ordernumber that we have created into the Shuttle -> Settings -> Integrations -> Custom variables section.
Panelcode | ||
---|---|---|
| ||
event.up = function(data) { var order = customvariables[data.uniqueid]['ordernumber']; if if(data.queue == ‘Sales’){ wakeup('http://webservice1/sales?ordernumber='+order, data.peer, 'new_frame');} } }; |
Add a custom integration service
...