Versions Compared

Key

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

API CTI  – Shuttle 2.4.0 onwards

...

You can download the template.js file here and the service file here

Attachments
uploadfalse
oldfalse

...

Push the event into the Integration Realtime section of the Administrator

These data will populate the following section of xCALLY Realtime:


 

Panel
bgColor#E6E6FA
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.

...

Panel
bgColor#E6E6FA

event.up = function(data) {
    var order = customvariables[data.uniqueid]['ordernumber'];
    if(data.queue == ‘Sales’){
         wakeup('http://webservice1/sales?ordernumber=' + order, data.peer, 'new_frame');}
    }
};

 

Add a custom integration service


1. Download the service file ’template’ and save it into the directory /etc/init.d/ of your xCALLY Shuttle server
2. Rename the ‘template’ file with your custom name
3. Open the ’template’ file and change all occurrences of '<name-file>’ with the name of the JavaScript file (template.js) you previously save into /var/www/html
4. Change the permission of the ‘template’ file: chmod 755 /etc/init.d/template (change template with the right name)
5. Add the ’template’ service: chkconfig —add template (change template with the right name)
6. Start the service: service template start (change template with the right name)

With this configuration, your custom service will runs in parallel to xCALLY Shuttle Realtime service.