CTI Integration Not Working in Kingston Upgrade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2018 04:43 AM
Hello All,
We have upgraded our Helsinki instance to Kingston. Now, OOTB CTI integration is not working properly, have checked and found some changes have been done from Istanbul release. Due to these changes, current URL is pointing to Incident form not on New Call form.
In Helsinki instance we were using only 1 OOTB Script Include and then providing CTI.do in the url, it was working. But from the current documents it seems we need to use BR as well and that BR is InActive.
Could anyone please suggest the correct way, how we can fix this issue.
Regards,
Ishan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2018 07:13 AM
You can use the OOB BR (CTI Processing) and you still need to use it, but there is limitations on what you can do in it. I also noticed that I needed to put the variables fetching parameters inside try/catch otherwise it will break if the urls doesn't contain the parameter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2018 11:34 PM
Ok. Can you tell me what did you use in your CTI integration and how did you use it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2018 10:10 AM
I'll try to put something here. Can't put all code in here.
Mainly use the url like you wrote. And in the CTI Processing BR:
function cti() {
var url = null;
var ctiArgs = {};
var fQuery = '';
var result = '';
var table = 'task';
try{
ctiArgs.taskType = sysparm_tasktype;
if (ctiArgs.taskType == 'case'){
table = 'sn_customerservice_case';
}
}catch(err){
gs.error("CTI Error framed: " + err);
}
try{
ctiArgs.framed = sysparm_framed;
}catch(err){
gs.error("CTI Error framed: " + err);
}
try {
ctiArgs.cti_consumer = sysparm_consum;
if (ctiArgs.cti_consum){
var ctiEvaluator = new CTIEvaluator("new CTIUtils().getConsumer()", ctiArgs);
result = ctiEvaluator.evaluate();
if (result != null && result != '')
fQuery += "consumer=" + result;
}
} catch (err) {
gs.error("CTI Error consumer: " + err);
}
....And when all code is done...
answer = url;
return url;
}
If I didn't put each "fetch" of sys_parm in a try&Catch. Then it would break if that parameter wasn't in the URL
Then we have the CTIUtils script include that is like any other script include.
ex:
var CTIUtils = Class.create();
CTIUtils.prototype = {
initialize: function() {
},
getConsumer: function() {
var consumer = new GlideRecord("TABLE_NAME");
consumer.addQuery("FIELD_NAME", cti_consumer);// Here you see that cti_consumer is the value we put in ctiArgs.cti_consumer in the GR.
consumer.query();
return (consumer.next()) ? consumer.getUniqueValue() : null;
},
type: 'CTIUtils'
};
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2018 12:15 AM
Hi Goran,
Thanks for providing the above details.
Now, issue has been sorted out. As we were not using OOTB BR previously, so what we have done - we make our CTI Script Include as Client Callable and move all those code to another script include that does Glide Action such as Insert, Update or Delete.
After that, last action was pending to call our new Script Include (Non Client Callable) in the CTI Script Include (Client Callable), which we are able to do it with the help of this KB article - KB0620953 and the below format of code given in the KB article.
***********************
In the client-callable BR/SI, create a simple JavaScript object and populate it with the incoming values needed by the code moved to the script include. When populating this object, use the same variable names used in the script include:
var ctiArgs = {}; // JavaScript object to pass name/value pairs to CTIEvaluator with
ctiArgs.cti_caller_name = sysparm_caller_name;
ctiArgs.cti_caller_phone = sysparm_caller_phone;
ctiArgs.cti_taskID = sysparm_task_id;
ctiArgs.cti_userID = userID;
Create an instance of CTIEvaluator and pass in the expression developed in the previous step and the arguments object developed. For example:
var ctiEvaluator = new CTIEvaluator( "new CTIUtils().doXXX()”, args);
var result = ctiEvaluator.evaluate(); // assumes that doXXX() returns something, which we capture in ‘result'
**********************
Regards,
Ishan Bajaj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2018 02:08 AM