API Reference Guide

Jodo World Toolbar Widget

This is simple but very powerful option of tight integration. System Integrator / ISV can implement following functionality using widgets

  • Login & Logout to Jodo World

  • Receive Call and Screen Pop-up

  • Make Call to Customer Contacts

  • End Active Call

  • Hold & Unhold Call

  • Change Status – Presence Status

  • Save Selected Disposition

Following features are available from Toolbar

  • Transfer Call

  • Conference Call

Following events can be received

  • Status changed

  • New Call Received

  • Active Call Terminated

  • Hold / Unhold Success & Failure

How to include Jodo World Toolbar Widget in CRM / Business Applicatio?

To include Jodo World Toolbar Widget in CRM / Business Application, following javascript should be added at end of project. It is essential to not refresh page. If page is reloaded, it will reload widget and agent will be logged out. It is recommended to follow IFRAME approach for CRM / Business Application so entire page is not reloaded.

				
					<script type="text/javascript" src="https://serverip:portnumber/toolbarwidget/js/jodocloudtoolbar.js"></script>
<script type="text/javascript" src="https://serverip:portnumber/toolbarwidget/js/HandleCRMRequest.js"></script>
<script type="text/javascript" src="js/CRM.js"></script>
				
			

Method: Login()

				
					var loginrequest = {
	"Login_ID": StrLogin,
	"Password": Strpasswd
};
sendLoginParameters(loginrequest);
				
			

Description: This method is used to login into Jodo World. CRM / Business Application can invoke this method with user name & password. When logged in successfully, CRM / Business Application can receive events and invoke methods. Jodo World does not honor any requests till Login() method is invoked.

Method: Logout()

Parameters: None

Description: This method is used to logout from Jodo World. User must be logged in to Jodo World before invoking this API. After successful logout, Jodo World Widget stops sending events and processing requests.

Method: DisposeCall()

Purpose: This method is used to dispose interaction (call). Once Disposition is saved, user can receive / initiate next interaction. Jodo World User must be in Wrap-Up / AUX state to invoke this method. Method fails if user is in different status.

Jodo World processes request and return result as per parameter value. If call is disposed successfully on Jodo World end, Jodo World sends available / ready status if configured for auto available or remain in same status when auto ready / auto available is disabled.

Input Parameters:

Sr No.ParameterDescriptionData TypeExample
1dispoMasterIdDisposition Master valueint6
2dispoReasonIdDisposition reason valueint12
3dispomatertextHuman readable value of DispositionStringNot Interested
4disporeasontextHuman readable value of ReasonStringCall after 3 months
5callbackDateSelected date for only Call back and Sale / Lead call type status Date Format yyyy-MM-dd HH:mm:ss 2013-11-10 23:10:10 dd-MMM-yyyy HH:mm:ss 10-NOV-13 23:10:10Date31/03/12 01:08
6CallbackContactNoCallback Contact Number for call back status.String09878564321
7nAuditCodeAudit Flag – identified if interaction needs to be auditedNumber
8remarktextRemarks to be savedStringRemarks about interaction

Sample Request

				
					var saverequest = {
	“dispoMasterId”: 10,
	“dispoReasonId”:5,
	“dispomatertext”:”Not Interested”,
	“disporeasontext”:”Call after 3 months”,
	“CallbackContactNo”:”0987xxxx545”,
	“callbackDate”:”10-Dec-2016 11:00:15”,
	“nAuditCode”:0,
	“remarktest”:”Recently purchased product”
}
DisposeCall (saverequest);
				
			

Response is communicated in event handler

CommandDescription
callsavesuccessCall data is saved successfully
callsavedfailedFailed to save data

Method: MakePhoneCall()

Purpose: This method is used to initiate phone call directly from CRM / Business Application.

CRM / Business Application has to send following parameters to dial a call

Sr. No.ParameterDescriptionData TypeExample
1phoneNoPhone number to be dailedText0676779289
2processldJodo World Process Identifierint12

Sample Request:

				
					var request = {
	“phone_no”:”875485485345”,
	“processid”:10
}
MakePhoneCall (request);
				
			

Method: EndCall()

Purpose: This method is used to end active call. It can be invoked any time when call is in progress or active / connected

EndCall();

Response is communicated in event handler

CommandDescription
EndCallCall is terminated successfully
EndCallFailedFailed end data

Method: HoldCall()

Purpose: This method is used to put active call on hold.

HoldCall();

Response is communicated in event handler

CommandDescription
holdsuccessCall is placed on hold
holdfailedFailed to place call on hold

Method: UnholdCall()

Purpose: This method is used to unhold call, which was kept on hold previously.

Sample Request:

UnholdCall();

Response is communicated in event handler

CommandDescription
unholdsuccessCAll is unhold from hold successfully
unholdfailedFailed to unhold call

Method: ChangeStatus()

Purpose: This method to change status / mode of logged in user. We need to pass status code as parameter.

Parameters:
Sr No.ParameterDescriptionData TypeExample
1NstatusStatus Codeint12
Request
				
					var newstatus = {
	“status”;1
}
				
			

Agent Status Codes

Status CodeDescription
1Available/ Ready
11Not Available / Not Ready
12User defined code 1
13User defined code 2

Response is communicated in event handler

astatusDescription
astatusIndicate Change in Agent Status
MessageIndicate actual status Available NotAvailable Talking Dialing preview calltransfer

How to implement Event Handler?

Event handler is important part of communication between Jodo and Business Application. Events sent by Jodo are received in this method and processed as required. It is recommended not to block this method and push events in queue for processing if it takes longer time.

				
					function callURL(a)
{
    console.log("Response from Jodo World ::" + a);
    var data = JSON.parse(a);
    var ncommand = JSON.stringify(data.command);
    var message = JSON.stringify(data.message);
    console.log("command: " + ncommand + " message: " + message);
    try
    {
        if (data.command === "astatus")
        {
            if (data.message === "Available" || data.message === "available")
            {
                callflag = 0;
                // Agent is available to receive calls
                console.log("Agent is available to receive calls");
                document.getElementById("acsstatus").innerHTML = "Available";
                // disable / hide Avaiable button and show / enable Not Available button
            }
            if (data.message === "NotAvailable" || data.message === "notavailable")
            {
                // Agent is available to receive calls
                console.log("Agent is Not available to receive calls");
                document.getElementById("acsstatus").innerHTML = "Not Available";
                // disable / hide Not Avaiable button and show / enable Available button
            }
            else if (data.message === "Dialing" || data.message === "dialing")
            {
                // Call is being dialed
                document.getElementById("acsstatus").innerHTML = "Dialing";
                // disable / hide Not Avaiable / Avaiable / Dial button
            }
            else if (data.message === "Talking" || data.message === "talking")
            {
                // Agent is talking to customer
                // Show & Enable Hold Button
                document.getElementById("acsstatus").innerHTML = "Talking";
                // disable / hide Not Avaiable / Avaiable / Dial button
                $("#callend").show();
                 $("#callhold").show();
                $("#callunhold").hide();
            }
            else if (data.message === "preview")
            {
                // Agent entered in preview mode
                document.getElementById("acsstatus").innerHTML = "Preview";
            }
            else if (data.message === "calltransfer")
            {
                // Agent entered in calltransfer mode
                document.getElementById("acsstatus").innerHTML = "calltransfer";
            }
            else if (data.message === "EndCall")
            {
                // End call successful
                // Enable MakeCall button
                $("#callend").hide();
                $("#callhold").hide();
                $("#callunhold").hide();
                $("#dispoLable").show();
                $("#masterid").show();
                $("#resonId").show();
                $("#idSavebtn").show();
            }
            else if (data.message === "EndCallFailed")
            {
                // End call failed               
            }
            else if (data.message === "WrapUp" || data.message === "wrapup")
            {
                // Agent staus changed to Wrapup / AUX
                // Show Disposition List
                document.getElementById("acsstatus").innerHTML = "Wrapup";
            }
        }
        else if (data.command === "holdsuccess")
        {
            // disable hold button & enable unhold button
        }
        else if (data.command === "holdfailed")
        {
            // disable hold button & enable unhold button
        }
        else if (data.command === "unholdsuccess")
        {
            // enble hold button & disable unhold button
        }
        else if (data.command === "unholdfailed")
        {
            // enble hold button & disable unhold button
        }
        else if (data.command === "docpush")
        {
            // received request to show document
            // To be added in future release
        }
        else if (data.command === "video")
        {
            // received request to show video
            // To be added in future release
        }
        else if (data.command === "callsavesuccess")
        {
            $("#dispoLable").hide();
            $("#masterid").hide();
            $("#resonId").hide();
            $("#idSavebtn").hide();
            alert("Data Saved Successfully");
        }
        else if (data.command === "callsavefailed")
        {
            alert("Failed to save data");
        }
        else if (data.command === "ivrinputs")
        {
            // IVR Inputs
            // Show in List
            // To be added in future release
        }
        else if (data.command === "screenpop")
        {
            a = JSON.parse(message);
            var currenttryno = a.currenttryno;
            var sessionid_calllist = a.sessionid_calllist;
            var customercode = a.customercode;
            var systemuniquecallid = a.systemuniquecallid;
            var screenpopfile = a.screenpopfile;
            var timezone = a.timezone;
            var acssessionid = a.acssessionid;
            var command = a.command;
            var languageid = a.languageid;
            var end = a.end;
            var dnis = a.dnis;
            var crmuniqueid = a.crmuniqueid;
            var hold = a.hold;
            var screenpoptype = a.screenpoptype;
            var requestdatetime = a.prrequestdatetimeocessid;
            var calluniqueid = a.calluniqueid;
            var usertransfer = a.usertransfer;
            var autoflag = a.autoflag;
            var screenconnector = a.screenconnector;
            var calltypedescription = a.calltypedescription;
            var crmsave = a.crmsave;
            var mediatype = a.mediatype;
            var processid = a.processid;
            var phone_no = a.telephoneno;
            var calltype = a.calltypeid;
            document.getElementById('phoneNo').value = phone_no;
        }
    }
    catch (e) {
    }
}
///// Set event callback handler
onJodoEventReceived (callURL);
				
			

Events

EventDescription
screenpopThis event is triggered when new call is received. Customer phone number is received in this event
ivriputsThis event is triggered when input entered by caller are sent
astatusThis event is triggered when user status is changed at server end. Different status reasons are sent in the event which needs to be processed
holdsuccessRequest to Hold Call was successful
holdfailedRequest to Hold Call was failed
unholdsuccessRequest to Unhold Call was successful
unholdfailedRequest to Unhold Call was failed
docpushReceived doccument from other end
videoReceived video call request from other end
callsavesuccessSave call request was successful