Tutorial: 01_Configuration

01_Configuration

The integration contains basic elements which must be inside a html page.

It is very important that the requests made won't cause the page to reload since the integration will lost communication and log back in will be needed.
<script src="cw-galatea-integration-api-js-bundle.min.js"></script>
<script src="Method.js"></script>
<script src="CORE_APIEvents.js"></script>

The first thing to do is get the integration connected and in order to do that, you need to have both the integration and the agent opened on the same browser so it can execute the different methods and receive the events.

It will show the agent status as: logout since no agent has logged in.

Something important to consider is that if the agent status is: NotConnected even after you clicked on the Connect button, you want to make sure that NuxibaTokenAgent is visible at the local storage section on the dev tools of the browser. If you can not find it, you need to check the netwotk requests and verify that the page: integrationToken.html is not being blocked and if it is, it will be needed to modify the Agent Kolob's web.config file.

Validate Connection

Integration Kolob Diagram

Integration Diagram

In the file Method.js there is a variable called: server it is used to load the html page and at the development phase, you will use it to specify the domain or IP where your agent is located.

function connectToServer() {
    server = window.location.hostname;
    secureConnection = window.location.protocol.indexOf("https")>=0;
    nuxibaIntegration = new IntegrationEntryPoint.IntegrationApiFactory().buildClient();

    if (server.indexOf("127.0.0.1") >= 0 || server.indexOf("localhost") >= 0) {
        server = "105.nuxiba.com";
        secureConnection = server.indexOf(".nuxiba.com") > 0
    }

    console.info(`Connect ${server}, isSSL:${secureConnection}`);
    // integration.WSParameters.serverIntegrationToken = "http://192.168.0.105/AgentKolob/IntegrationToken.html";
    nuxibaIntegration.WSParameters.server = server;
    nuxibaIntegration.WSParameters.secureConnection = secureConnection;
    nuxibaIntegration.connectToServer();
}