Avaya Client SDK

< Back to Package Overview

Tutorials

Agent Controller Tutorial

The Sample Application Client allows a user to verify that a AgentController instance has been set up correctly. All the operations that the AgentController supports can be run with the client provided here. The client is a standalone HTML/JavaScript implementation of the AgentController SDK which can be opened by double clicking on index.html beneath the sample directory.

Overview

The following system properties need to be set before instantiating the AgentController Connection.

The only value you will need to set is the clusterIp, if you are using breeze this will be the SIP Entity IP Address that the AgentControllerService svar is deployed on.

For example, to retrieve customerhistory from the AgentController, instantiate the AgentController Connection with following code:


    var _acconfig = new AvayaCustomerInteractionUtilitiesClient.Config.AcConfiguration();
    _acconfig.isGuest = guestUsage;
    if (!guestUsage){
        var token = $('#token').val();
        _acconfig.serverInfo.token = token;
    }

    _acconfig.serverInfo.hostName = clusterIP;
    _acconfig.serverInfo.isSecure = false;
    _acconfig.enabled = true;

SDK operations

An example of the Get Customer History Operation is detailed below

Get CustomerHistory

Get a CustomerHistory object from AgentController by passing in the transcriptId. The transcriptId corresponds to the actionId which can be found in cls.Contacts table in the omnichannel database.

JS file:


function getCustomerHistoryByTranscriptId() {
    var transcriptId = $('#getCustomerHistoryByTranscriptId').val();

    requestDetails('getCustomerHistoryByTranscriptId',"");  
    this.createInstance();
    _acinstance.getCustomerHistoryByTranscriptId(transcriptId).then(onSuccess, onFailure);  
}



//etc

HTML template:

    //index.html

    //Settings panel
    


    // display div for the required operation(s)
    

Get Customer History By Transcript Id