Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

API CTI  – Shuttle 2.4.0 onwards

...

The notification method is used to send a notification to the agent

Panelcode
bgColorlanguage#E6E6FAjs
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:

Image Removed

...

bgColor#E6E6FA

The pushevent method is used to display trigger action event in Realtime section

Code Block
languagejs
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
bgColorlanguage#E6E6FAjs
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

...