Brekeke Contact Center Suite Wiki

CIM - Send Inbound Call Info When a Call is Received

 
Step 1. Add the following script named as “widget” at the [Script] menu on CIM.

var calloffered= function(widget,ev){
    //inbound or acd is target
    if(ev.firstAgentCallType != 0 && ev.firstAgentCallType != 2){
        return;
    }
    //get agentid and customer
    var obj = {};
    obj.agentId = widget.getAgentInfo().agentId;
    obj.customer = ev.customerNumber;
   
    //debug
    Brekeke.debug('json=' + JSON.stringify(obj));
    //http request(not test,please confirm it by yourself)
    fetch('/xxxx', { // url
        method: 'post', // method
        header: {
          'Content-Type': 'application/json' // JSON header
        },
        body: JSON.stringify(obj)
      }).then(function(response){
            return response.json();
          });
}

 

Step 2. Add the following properties at the [Admin Menu] > [Settings] > [Advanced Settings] on CIM.
widget.scripting.source=widgetwidget.scripting.event.calloffered.function=calloffered

 

Yes No
Suggest Edit