Jodo API Guide

Document History

Jodo Introduction

Jodo World (“Jodo”) is a Cloud Workplace Technology Framework designed to handle all present and future business communication media and channels by directly embedding communications within software applications and platforms (browser-driven or mobile apps). Jodo handles communication traffic distribution globally, via multi-lingual automation tools and monitors traffic handling via dispersed, multi-device global teams.

Jodo handles business phone calls from multiple geographies (distributed architecture), social media channels, email, chat, digital voice and video channels and SMS. Jodo handles all communication media on the Cloud and communication media events, actions and controls are offered within any business applications via Jodo API.

Jodo Web Service End Point

Customer Web Service

API URL

https://demo2.avhan.com:9443/CustomerWebServices/handleCustomerWS?data={JSON request }

CuRL Tool can be used to test API

				
					curl -d "data={JSON request}" POST
				
			

https://demo2.avhan.com:9443/CustomerWebServices/handleCustomerWS

It is also possible to use WGET to test API

				
					wget --post-data "data={JSON request}" POST
				
			


https://demo2.avhan.com:9443/CustomerWebServices/handleCustomerWS

SOAP UI, Postman are other tools that can be used to test API

Common Status Code Information

Customer Data Handler

Import Process Data (Push API)

Purpose: This function is used to push customer data to Jodo Application.

If Media is voice & contact Number is valid, data push for dialing.

Pre-requisite for TTS

Status :: 10500 After TTS covert, status changed to 1001

TTS web hook need to map with Process + Data Import event

TTS Web Hook :: Commercial service and need separate subscription.

Use Cases:

  1. Start Call in Jodo Platform for CRM pushed specific data (Customer to be called).

  2. Inbound Case :: Customer data store to Avhan and populate using Call Guide. Media :: 11 – Voice In :: Developer team will verify code

  1. Start call via automated voice using Text to Speech (Jodo Messenger Dialer with TTS)

    1. In this case Jodo receives Customer First Name & Last Name via Push API in real-time.

    2. Jodo pushes data to target TTS Engine API. (user defined in configuration)

    3. After TTS API response received, Jodo dials contact number passed in request and start interactive message flow at scheduled time.

User Input Parameters:

Multiple trunks handle prefix for domestic and international calling differently and based on the Trunks used in your operations you will need to standardise the data in your applications with the appropriate prefix.

e.g. GSM trunks / Gateways can process + for international dialing as a prefix while TELCO trunks need you to assign 00 as prefix for international dialing. Similarly domestic dialing code prefix may be different in parts of the world.

Developer change ::: To allow mobile number +

Output Parameters:

Return Value:

This API returns one of response listed belowin JSON format.

Request with updateparam mobilenumber:

				
					{
"method":"ImportProcessData",
"reqdatetime":"2018-11-12 14:00:05",
"servicekey":"VoiceProcess",
"apikey":"test_org",
"media":"11",
"updateparam":"mobilenumber",
"data"
[

{ "fname":"suvarna", "lname":"gadakh",
"mobilenumber":"00918452892308",
"extra_params":"xyz",
"call_type":"5"},
{ "fname":"suvarna", "lname":"gadakh",
"mobilenumber":"00918452892308",
"extra_params":"xyz",
"call_type":"5"}

]
}
				
			

Request with updateparam customercode:

				
					{
"method":"ImportProcessData",
"reqdatetime":"2018-11-12 14:00:05",
"servicekey":"process1",
"apikey":"MsQgi5/gKVZusW5XziRf76nHbn9JxU4VDSWwongD5dU=",
"media":"11",
"updateparam":"customercode",
"data"
[
{
"leadnumber":"1"
"customercode":"1"
"name":"Ram",
"mobilenumber":"1234567890"
"emailid":"v@avhan.com"
},
{
"leadnumber":"2"
"customercode":"2"
"name":"abc"
"mobilenumber":"1234567891"
"emailid":"v1@avhan.com"
}
]
}
				
			

Request with updateparam crmuniquefield:

				
					{
"method":"ImportProcessData",
"reqdatetime":"2018-11-12 14:00:05",
"servicekey":"process1",
"apikey":"MsQgi5/gKVZusW5XziRf76nHbn9JxU4VDSWwongD5dU=",
"media":"11",
"updateparam":"crmuniquefield",
"data"
[
{
"leadnumber":"1",
"customercode":"1",
"name":"Ram",
"mobilenumber":"1234567890",
"emailid":"v@avhan.com",
"callDateTime":"2018-06-20 09:07:00",
"calltype":"71",

},
{
"leadnumber":"2",
"customercode":"2",
"name":"abc",
"mobilenumber":"1234567891",
"emailid":"v1@avhan.com",
"callDateTime":"2018-06-20 09:07:00",
"calltype":"41",

}
]
}



ImportProcessData  JSON Response

{
"method":"ImportProcessData",
"resdatetime":"2018-11-12 14:00:05",
"statuscode":"001",
"statusdesc":"success"
}


ImportProcessData  JSON Fail Response
{
"method":”ImportProcessData”,
"revisionno":"1",
"status":5,
"statusdesc":"fail",
"resdatetime":"2018-11-12 14:00:05"
}

				
			

Status Code Information

CALL Type Code Information

Media type:

Pull Data

Purpose:

This method used to pull customer data from DB.

Use Case:

When CRM / Business application want to fetch data from Jodo, this method should be used.

In this request either daterange(fromdate, todate), mobilenumber, customercode, crmuniquefield will be send as searchparam values which are used as input string to pull out data from DB. At a time only one value should be pass else web service will pull data on all given criteria.

Here Searchparam consider as unique field for process data.

This getProcessData method accepts JSON string as input and returns response as JSON string .

Input Value:

M – mandatory parameter

O – Optional parameter

Note:

  • searchparam is case sensitive.

  • If searchparam is mobilenumber then webservice fetch mobilenumber value from request and pull out customer data from Jodo World DB on contact1 field

  • If searchparam is daterange then webservice fetch fromdate and todate values from request and pull out customer data from Jodo World DB on storedatetime field

  • If searchparam is customercode then webservice fetch customercode value from request and pull out customer data from Jodo World DB on customer_code field

  • If searchparam is crmuniquefield then webservice fetch crmuniquefield value from request and pull out customer data from Jodo World DB on process associated unique CRM field.

Output Value:

This function returns JSON String with unique id generated by web service. This is used to track details of the request send to the web service

Data as per Form Template definition. Refer Push Data API DATA faq point.

JSON request Response

This method accepts StrRequest JSON string as input and returns response as JSON string .

Sample JSON Request With search param mobilenumber

				
					{
"method":"getProcessData",
"reqdatetime":"2016-01-19 12:00:00",
"servicekey":"Policy",
"apikey":"MsQgi5/gKVZusW5XziRf76nHbn9JxU4VDSWwongD5dU=",
"searchparam":"mobilenumber",
"mobilenumber":
["9000100200",  "9000100201","9000100203"]
}
				
			

Sample JSON Request With search param customercode

				
					{
"method":"getProcessData",
"reqdatetime":"2016-01-19 12:00:00",
"servicekey":"Policy",
"apikey":"MsQgi5/gKVZusW5XziRf76nHbn9JxU4VDSWwongD5dU=",
"searchparam":"customercode",
"customercode":"1"
}

				
			

Sample JSON Request With search param crmuniquefield

				
					{
"method":"getProcessData",
"reqdatetime":"2016-01-19 12:00:00",
"servicekey":"Policy",
"apikey":"MsQgi5/gKVZusW5XziRf76nHbn9JxU4VDSWwongD5dU=",
"searchparam":"crmuniquefield",
"crmuniquefield":"1"

}
				
			

Sample JSON Request With search param crmuniquefield

Sample JSON Request With search param daterange

				
					{
"method":"getProcessData",
"reqdatetime":"2016-01-19 12:00:00",
"servicekey":"Policy",
"apikey":"MsQgi5/gKVZusW5XziRf76nHbn9JxU4VDSWwongD5dU=",
"searchparam":"daterange",
"fromdate":"2016-01-19 12:00:00",
"todate":"2016-01-22 12:00:00"
}
				
			

Sample JSON Response

				
					{
"method":"getProcessData",
"resdatetime":"2016-01-19 12:00:00",
"statuscode":"001",
"statusdesc":"success",
"data":
[
{
"leadnumber":"1",
"name":"Avhan Technologies",
"mobilenumber":"1234567890",
"emailid":"v@avhan.com",
"callDateTime":"2013-06-20 09:07:00",
"policyexpirydate":"2013-02-22",
"dateofleadcreation":"2012-02-22",
"timeofleadcreation":"12:00:00",
"extrafield1":"1",
"extrafield2":"2",
"extrafield3":"3"
},{
"leadnumber":"2",
"name":"Avhan Technologies 1",
"mobilenumber":"1234567891",
"emailid":"v1@avhan.com",
"callDateTime":"2013-06-20 09:07:00",
"policyexpirydate":"2013-02-22",
"dateofleadcreation":"2012-02-22",
"timeofleadcreation":"12:00:00",
"extrafield1":"11",
"extrafield2":"21",
"extrafield3":"31"
}
]
}
				
			

Reallocate data

Purpose: This function is used to reallocate data or task to a particular user.

Use Case:

This is used when a user is absent or has left organization and will not be able to handle scheduled calls during their absence. In such cases, data needs to be reallocated to other Jodo users to meet the scheduled call goal.

Option to reallocate data should be added to CRM / Business application.

User Input Parameters:

Output Parameters:

Return Value:

This API returns in one format I.e. JSON format.

Reallocate data JSON Request

				
					{
"method":"reallocatedata",
"apikey":"test_org",
"servicekey":"VoiceProcess",
"contactnumber":"7507959484",
"login":"tanmay.k",
"calldatetime":"2018-11-10 09:00:00",
"customercode":0,
"reqdatetime":"2018-11-12 14:00:05"
}

				
			

Reallocate data JSON Response

				
					{
"method":"reallocatedata",
"statuscode":"001",
"resdatetime":"2018-11-12 14:00:05",
"statusdesc":"Success"
}
				
			

Reallocate data JSON Fail Response

				
					{
"method":”reallocatedata”,
"revisionno":"1",
"status":5,
"statusdesc":"fail",
"resdatetime":"2018-11-12 14:00:05"
}
				
			

Status Code Information

 

				
					{
 "method":"saveDisposition",
"login":"dinesh.s@avhan.com",
 "apikey":"test_org",
"servicekey":"VoiceProcess",
"dispomasterid":1,
"disporeasonid":1,
"remarks":"This is testing remarks",
 "selecteddatetime":"2018-11-01 17:00:00",
"contactvalue":"9874561320",
"media": “Voice In”, 
"reqdatetime":"2018-11-01 17:00:00",
}
				
			

Request JSON Response

				
					{
"method":"saveDisposition",
 "statusdesc":"success",
"status":3, 
"resdatetime":"2018-11-01 17:00:00"
 }

				
			

Report request JSON Fail Response

				
					{
"method":"savedisposition",
"reasonid":31,
"statusdesc":"fail",
 "status":4,
 "resdatetime":"2018-11-01 17:00:00"
}

				
			

Status codes :

Call Recordings Module

Customer recording

Purpose: This function is used to get recording link of a particular voice call unique systemcallid.

Use Case:

  1. Playback of media sessions e.g. calls to be played within the CRM/ Business application.

  2. Send links to users / customers of the media session recorded

User Input Parameters:

Output Parameters:

Return Value:

This API returns response in JSON format.

Customer recording JSON Request

				
					{
"method":"customer_recording",
"apikey":"test_org",
"servicekey":"VoiceInOut",
"sessionid":483,
"systemcallid":"140912183554281005" ,
"reqdatetime":"2018-11-12 14:00:05"
}

				
			

Customer recording JSON Response

				
					{
"method":"customer_recording",
"recordingfilepath":"http:\/\/192.168.2.127\/recordings\/\/1\/1\/2014\/09\/12\/18\/140912183554281005_0000.MP3",
"revisionno":1,
"statusdesc":"success",
"status":3,
"resdatetime":"2018-11-12 14:00:05"
}
				
			

Customer recording JSON Fail Response

				
					{
"method":”customer_recording”,
"revisionno":"1",
"status":5,
"statusdesc":"fail",
"resdatetime":"2018-11-12 14:00:05"
}
				
			

Status info for Recording Module

Customer Multiple Recording

Purpose:

This function is used to get recording link of multiple calls

Use Case:

When CRM / Business application need to fetch recording of multiple calls, either for playback or analytic purpose, this method can return URL of multiple calls.

User Input Parameters:

Output Parameters:

Return Value:

This API returns in one format I.e. JSON format.

Customer multiple recording JSON Request

				
					{ "method":"customer_multiple_recordings",
 "apikey":"test_org",
 "servicekey":"voiceprocess",
 "systemcallids":[ "180717171728015031", "180719161420031002" ], "reqdatetime":"2018-11-12 14:00:05"
}

Customer recording JSON Response
{ "method":"customer_multiple_recordings",
"resdatetime":"2018-12-18 12:39:05",

"statusdata":[
{"systemcallid":"180717171728015031",
"statusdesc":"success",
"status":3,
"recordingfilepath":
"http://192.168.2.127/recordings/1/1/2018/07/17/17/180717171728015 031_1001_1500_1_2500_1728015.MP3"
},
{
 "systemcallid":"180719161420031002",
 "statusdesc":"Data not found",
"status":67,
"recordingfilepath":"" }
 ]
}

				
			

Status info for Recording Module

User Module

 

API is to manage users in Jodo Platform

To handle Jodo User functionality using Web service application

To Add / Edit User

Purpose: This function is used to add new user or edit existing user in Jodo

Use Case: When new user is created in CRM / Business application, it is pushed to Jodo using this API

User Input Parameters:

Output Parameters:

User type:

Media type:

Contact ID Info :

Table: contact_types

JSON Add User Request Format

				
					{
"method":"addEditUser",
"apikey":"test_org",
"action":"add",
"userimage":"c2c_clicktocall_201601051003844.jpg",
"username":"Batman12",
"loginid":"Batman12@avhan.com",
"usertype":"user",
"newpassword":"ecc4208a7778c1d76e7e89c5253128c5",
"confirmpassword":"ecc4208a7778c1d76e7e89c5253128c5",
"mediadetails":[{"media":"Email In"},{"media":"Email Out"}],
"customercode":100783,
"groups":["Avhan_group","Batman_group"],
"gender":"Male",
"dob":"1990-11-13",
"doj":"2014-11-13 ",
"address":"Postal colony, chembur"
"country":"India",
"state":"Maharashtra",
"city":"Chembur",
"language":[
{"languageid":"1","language":"English"},
{"languageid":"2","language":"Hindi"}
],
"contactdetails":[
{"contactid":"facebook","contacttype":"testdemo987@avhan.com"},
{"contactid":"mobile number","contacttype":"8465982541"}
],
"skilldetails":[
{"skillname":"language","skilldetail":"hindi","proficiencyvalue":"4"},
{"skillname":"product","skilldetail":"old","proficiencyvalue":"4"}
],
"reqdatetime":"2018-11-12 14:00:05"
}
				
			

JSON Add User Response format

				
					{
"method":”addUser”,
"userid":124,
"revisionno":1,
"status":3,
"statusdesc":"success",
"resdatetime":"2018-11-12 14:00:05"
}
				
			

JSON Add User Failed Response format

				
					{
"method":”addUser”,
"revisionno":1,
"status":5,
"statusdesc":"fail",
"resdatetime":"2018-11-12 14:00:05"
}

				
			

JSON Edit User Request Format

				
					{
"method":"addEditUser",
"apikey":"test_org",
"action":"edit",
"userimage":"c2c_clicktocall_201601051003844.jpg",
"username":"Batman12",
"loginid":"Batman12@avhan.com",
"usertype":"user",
"newpassword":"ecc4208a7778c1d76e7e89c5253128c5",
"confirmpassword":"ecc4208a7778c1d76e7e89c5253128c5",
"mediadetails":[{"media":"Email In"},{"media":"Email Out"}],
"customercode":100783,
"groups":["Avhan_group","Batman_group"],
"gender":"Male",
"dob":"1990-11-13",
"doj":"2014-11-13 ",
"address":"Postal colony, chembur"
"country":"India",
"state":"Maharashtra",
"city":"Chembur",
"language":[
{"languageid":"1","language":"English"},
{"languageid":"2","language":"Hindi"}
],
"contactdetails":[
{"contactid":"facebook","contacttype":"testdemo987@avhan.com"},
{"contactid":"mobile number","contacttype":"8465982541"}
],
"skilldetails":[
{"skillname":"language","skilldetail":"hindi","proficiencyvalue":"4"},
{"skillname":"product","skilldetail":"old","proficiencyvalue":"4"}
],
"reqdatetime":"2018-11-12 14:00:05"
}
				
			

JSON Edit User Response format

				
					{
"method":”addEditUser”,
"userid":136,
"revisionno":1,
"status":3,
"statusdesc":"success",
"resdatetime":"2018-11-12 14:00:05"
}
				
			

Status Code Information

Delete user

Purpose:

This function is used to delete users in Jodo.

Whenever user is deleted in the business application, the application must invoke this API to execute same action in Jodo platform.

Use Case:

When users are deleted in business applications – they will be automatically deleted in Jodo Platform as well.

User Input Parameters:

Output Parameters:

Return Value:

This API returns in one format I.e. JSON format.

Delete user JSON Request

				
					{
"method":"deleteUser",                
"apikey":"test_org",
"loginid":"Batman12@avhan.com",
"reqdatetime": "2018-11-12 14:00:05"
}

				
			

Delete User JSON Response

				
					{
"method":"deleteUser",
"revisionno":"1",
"status":1,
"statusdesc":"success",
"resdatetime":"2018-11-12 14:00:05"
}

				
			

Delete User JSON Fail Response

				
					{
"method":”deleteUser”,
"revisionno":"1",
"status":5,
"statusdesc":"fail",
"resdatetime":"2018-11-12 14:00:05"
}			
				
			

Status Code Information

User Current Status

Purpose: This function is used to get real-time staus of Jodo user . Also it use to allocate data after check user status.

Use Case:

This API is used by CRM / Business Application to get realtime status of Jodo user .

It should be called before call disposition API.

Based on status, CRM / Business Application can take next action – push new data for processing / calling.

User Input Parameters:

Output Parameters:

Return Value:

This API returns in one format I.e. JSON format.

JSON Request

				
					{
 "method":"userStatus",
 "apikey":"test_org",
 "servicekey":"VoiceProcess",
 "loginids":["rupesh.v@avhan.com","user10"],
"reqdatetime": "2017-11-20 10:00:05"
}
				
			

JSON Response

				
					{ "statusdata":[
{"duration":100,"currentstatus":1,
"currentstatusdesc":"Ready",
"statuschangetime":"07-Mar-19 11:59:59 PM", "login":"user1","statusdesc":"Success","status":3}
{"duration":11,"currentstatus":11,
"currentstatusdesc":"System Sent NA",
"statuschangetime":"07-Mar-19 11:59:59 PM", "login":"user10","statusdesc":"Success","status":3}
],
 "method":"userStatus",
 "timestamp":"2019-03-08 11:53:02"
 }

				
			

User Status Code Information