function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MaxYMaxY 

How does Open CTI work? Just don't get it (

Hi all. I'm very new to the CTI theme so please excuse me if the question is stupid.

I'm trying to understand how a random telephony system becomes able to communicate with a browser directly. I just don't get it. SalesForce claims that no CTI adapters needed anymore. OK.

Suppose I have an asterisk (3com, panasonic, whatever...) telephony system. Here goes incoming call. What happens next? Can it really send a message to browser (via websockets or what) ?

I doubt that telephony systems can "talk" JS even if there is an active connection from browser to the telephony system somehow. So I guess that there still must be a CTI adapter (middleware), that can talk to telephony system with some TAPI AND can talk to browser with JS through websockets for instanse. And that middleware should be written by me. But the benefit of such an adapter that it doesn't need to be installed at any agent's computer but can be hosted at a server. Right?

I just don't get it how can it work without any middleware and I can't find any explanation on theinternet.

Thanks.

Jean-NoelJean-Noel

Hello,

 

To make it short, there is 2 type of CTI

- CTI plugin (3.x, 4.x) that work as a plugin, you need to have a program on your desktop that make the link between your phone and the browser. Depend on the versio of the CTI, you have a restricted list of browsers that are compatible (https://login.salesforce.com/help/doc/en/cti_toolkits_overview.htm). You need a little bit of C++ skill to create one of those from scratch.

 

- Open CTI, you have a server in the cloud that will talk to your phone and Salesforce, that's the one that is popular. http://blogs.salesforce.com/company/2012/08/open-cti-moving-cti-integrations-to-the-cloud.html

 

MaxY_MaxY_

Hello Jean-Noel. Thanks for you reply.

I've read about these 2 types of CTI as well as the blog post. And I'm interested in Open CTI.

Could you please tell me more about the "server in the cloud" you mentioned. Is it a third party application or software provided by salesforce/telephony company or should I develop it by myself?

 

Does browser communicates with that server in the cloud or with salesforce servers that in turn communicate with the server in the cloud? Is it a websocket connection or what? I just can't figure out that communications magic.

Jean-NoelJean-Noel

Based on Open CTI

 

You can have a solution provided from a supplier, in that case you'll need to check with them the requirement.

 

If you want to build one from scratch, you will need to know how to interface with your phone system and a server that can be visible from internet (In the DMZ will do).

That server will "translate" JS to the language that can be understand by your phone system, most of the time it's based on a API (SOAP, REST, ...) The server will have 2 network access, one with an internal IP to talk to your internal phone system, one with a public IP to talk to Salesforce.

 

You will need to have a login part, to indentify your user and the phone allocated to it.

 

As a sample, let say that your phone api have a LoginUser, PhoneRinging and a MakeCall method.

 

Your login page will ask phone extension, username and password, those information will be sent to the phone API across the LoginUser method.

 

When the PhoneRinging method fire, it will return a phone number, you will send that phone number into a method in Salesforce, sending it to searchAndScreenPop for instance.

 

When a user click on a phone for a click to dial, you'll have a callback to a listener, setup done by onClickToDial, your server will read that method and call the MakeCall method from your phone system. Don't forget to pick up your phone to talk :-)

 

 

 

MaxY_MaxY_

well you make it amost absolutely clear. And it meets my vision of the possible solution. Thanks.

One more moment: when you say "one with a public IP to talk to Salesforce." you mean talk to agent's  browser that runs SF page with JS API that in turn talks to SF, don't you?

Jean-NoelJean-Noel

What I mean with the IP, a server in a DMZ van have 2 IP, a private IP (For instance 10.0.0.1) used by your internal network and a public IP (For instance 174.1.2.3) that is visible for SF. It's better to use name, you could have MyCtiServerInternal for your private network and ForSFToUseCti.MyDomain.Extension for internet.

MaxY_MaxY_

I understand that :)

The question was about "talk to Salesforce". I think my middleware will talk to an agent's browser via websocket rather than to Salesforce. This is what I want to clarify.

Jean-NoelJean-Noel

Your web application on your server will be an open cti. For that reason, it will appear in Salesforce screens directly like a frame.

To talk to Salesforce, you will use JS to send info. JS will also be used to send info to your web apps. Here the quick and dirty page that I've used to understand the link between Salesforce and Open CTI

 

<html>
<head>
      <!-- Imports Open CTI JavaScript library. It should point to a valid Salesforce domain. -->
<script src="https://cs2.salesforce.com/support/api/25.0/interaction.js"></script>
<script type="text/javascript">
             // Callback of API method: isInConsole
             var isInConsoleCallback = function (response) {
                  // Returns true if method is executed in Service Cloud console, false otherwise.
                  if (response.result) {
                      alert('SoftPhone is in Service Cloud console.');
                  } else {
                      alert('SoftPhone is not in Service Cloud console.');
                  }
              };
              // Invokes API method: isInConsole
              function isInConsole() {
                       sforce.interaction.isInConsole(isInConsoleCallback);
              }
              // Callback of API method: getCallCenterSettings
              var getCallCenterSettingsCallback = function (response) {
                     // Result returns call center settings as a JSON string.
                     if (response.result) {
                            alert(response.result);
                     } else {
                            alert('Error retrieving call center settings ' + response.error);
                     }
               };
               // Invokes API method: getCallCenterSettings
               function getCallCenterSettings() {
                        sforce.interaction.cti.getCallCenterSettings(getCallCenterSettingsCallback);
               }
               // Callback of API method: setSoftphoneHeight
               var setSoftphoneHeightCallback = function (response) {
                        // Returns true if SoftPhone height was set successfully, false otherwise.
               if (response.result) {
                       alert('Setting SoftPhone height to 300px was successful.');
               } else {
                      alert('Setting softphone height failed.');
               }
               };
               // Invokes setSoftphoneHeight API method.
               function setSoftphoneHeight() {
                       sforce.interaction.cti.setSoftphoneHeight(300, setSoftphoneHeightCallback);
               }
               // Callback of API method: getPageInfo
               var getPageInfoCallback = function (response) {
                      if (response.result) {
                             alert(response.result);
                      } else {
                             alert('Error occured while trying to get page info: ' + response.error);
                      }
               }
               // Invokes API method getPageInfo
               function getPageInfo() {
                       sforce.interaction.getPageInfo(getPageInfoCallback);
               }
				var listener = function (response) {
					if (response.result) {
						alert('User clicked on a phone number.' + response.result );
					}
				};
				var callbackPOP = function (response) {
				   if (response.result) {
					  alert('Screen pop was set successfully.');
				   }
				   else {
					  alert('Screen pop failed.' + result.error);
				   }
				};
			   function screenPop() {
						//Invokes API method to pop for a related account
						sforce.interaction.screenPop('/001R000000lyzNn', callbackPOP);
				}
var callbackenable = function (response) {
           if (response.result) {
              alert('Click to dial was enabled.');
           } else { 
              alert('Click to dial was not enabled.');
           } 
        };
        function enableClickToDial() {
   //Invokes API method
   sforce.interaction.cti.enableClickToDial(callbackenable);
   }			
	var callbackdisable = function (response) {
		if (response.result) {
			alert('Click to dial was disabled.');
		} else { 
			alert('Click to dial was not disabled.');
		} 
	};
	function disableClickToDial() {
	   //Invokes API method
	   sforce.interaction.cti.disableClickToDial(callbackdisable);
   }   
	var callbackLayout = function (response) {
               alert(response.result);
           } 
		var callbackSearch = function (response) {
           if (response.result) {
                  alert(response.result);
            } else {
                   alert(response.error);
           }
        };
   function searchAndScreenPop() {
			//Invokes API method
			sforce.interaction.searchAndScreenPop('01234567890', 'Key1=value1&Key2=value2', 'inbound', callbackSearch);
	}		   
   //Invokes API method
   sforce.interaction.cti.onClickToDial(listener);			   
      </script>
</head>
<body>
	<button onclick="screenPop();">screen pop to entity Id</button><br>
	<button onclick="enableClickToDial();">enable click to dial</button><br>
	<button onclick="disableClickToDial();">disable click to dial</button><br>
	<button onclick="searchAndScreenPop();">searchAndScreenPop</button>
</body>
</html>

 And the xml definition file

 

<?xml version="1.0" encoding="UTF-8" ?>
<callCenter>
  <section sortOrder="0" name="reqGeneralInfo" label="General Information">
    <item sortOrder="0" name="reqInternalName" label="InternalName">DemoAdapter</item>
    <item sortOrder="1" name="reqDisplayName" label="Display Name">Demo Call Center Adapter</item>
    <item sortOrder="2" name="reqAdapterUrl" label="CTI Adapter URL">http://MyServerOnTheWeb/CtiTest.htm</item>
    <item sortOrder="3" name="reqUseApi" label="Use CTI API">true</item>
    <item sortOrder="4" name="reqSoftphoneHeight" label="Softphone Height">400</item>
    <item sortOrder="5" name="reqSoftphoneWidth" label="Softphone Width">300</item>
  </section>
  <section sortOrder="1" name="reqDialingOptions" label="Dialing Options">
    <item sortOrder="0" name="reqOutsidePrefix" label="Outside Prefix">9</item>
    <item sortOrder="1" name="reqLongDistPrefix" label="Long Distance Prefix">1</item>
    <item sortOrder="2" name="reqInternationalPrefix" label="International Prefix">01</item>
  </section>
</callCenter>

 

 

 

 

 

ChrisRozChrisRoz

Hi,

 

Still not clear how to send events to borwser from a CTI server. Does Salesforce help here ?

MaxYMaxY

Hi.

I asked the question in linkedin group.

Look at http://goo.gl/HY5bL .Look for "Hi all. I'm very new to the CTI theme so please". That was my post with answers. Later I made a couple of diagrams there. May be they will help you.

sfdcAnonsfdcAnon
Thanks Max! Very helpful. 
Kiran PandiyanKiran Pandiyan
Hi Jean-Noel ,
 we are planning to do CTI integration for our SFDC org , should i go for CTI pluggin or Open CTI , based on the current scenario ?
Spencer Scott 13Spencer Scott 13
Here are a few third party applications that focus on Salesforce.com integration. 

Loup - https://loupdb.com - Focuses on high-level integration and offers a Google Chrome Extension (https://chrome.google.com/webstore/detail/loup/mfgkhhngedlohgfcjdakliikkgihpjii) that connects systems without having to install a third party application. Loup is an extremely simple integration application that works with a wide variety of PBXs and CRMs.  

gUnify - http://gunify.com - Focuses on deep integration with the ability to log calls into third party applications. gUnify also offers a Google Chrome Extension that requires authentication to the PBX and the application of choice. https://chrome.google.com/webstore/detail/gunify-salesforce-connect/fllpmnnphikdeefmmhmhbikpiiljfhme

Tenfold - http://tenfold.com - Is the premium UCaaS integration company with deep integration into a wide variety of applications and PBXs. Tenfold is advertised as a client relations tool designed to offer sophisticated dashboard to replace any PBX portals. 

Go Integrator - http://gointegrator.com - Offers a third party application that sits on the desktop and is designed to connect systems. Go Integrator is one of the older integration companies out there and work with many legacy CRM and database providers.

Sincerely,
Spencer Scott
spenc.scott@gmail.com
Øyvind Rotnes 12Øyvind Rotnes 12
Did you ever get to the bottom of this MaxY? I would love to know how the incoming call part works.
Firoz MirzaFiroz Mirza
@ChrisRoz I am also looking for a similar solution. Were you able to get the information about sending events to browser from CTI server ?
sfdcAnonsfdcAnon
*So I guess that there still must be a CTI adapter (middleware), that can talk to telephony system with some TAPI AND can talk to browser with JS through websockets for instanse. And that middleware should be written by me. But the benefit of such an adapter that it doesn't need to be installed at any agent's computer but can be hosted at a server. Right?* Correct. This is what a number of partners on the AppExchange deliver. There are technologies such as COMET and web sockets that allow communication between your middleware and the browser.
Firoz MirzaFiroz Mirza
Salesforce has also provided Open CTI adapters for Classic and Lightning to begin with. However, its not that straight forward in the sense that the integration with external CTI is not so well documented. I have been strugling with Lightning adaptor to get to work via websocket.
Spencer Scott 13Spencer Scott 13
@Firoz Mirza
There are a number of software companies that can connect your phone system to Salesforce without you having to write any code. Picking the right partner depends on how much data you want to be transferred into SFDC. See Below

Loup - www.loupdb.com - Offers click to dial and screen pops through a Google Chrome extension
Tenfold - www.tenfold.com - Offers call logging and note taking
Go Integrator - www.gointegrator.com - Offers a desktop integration application

Let me know if you need any help connecting your phone system to the CRM. I use to run Enterprise Sales at Vonage Business and quit to launch Loup (seen above) which does exactly that. We have a pretty talented dev team that would love to help out if we haven't already solved your problem. 

If you have any questions shoot me an email at spencer@loupdb.com

Cheers!
 
BOCHRA GOLLIBOCHRA GOLLI
please I need  help regarding the salesforce API  call center,I want to   :
1-When a call from a customer is answered, the customer file will open up in Salesforce – if that is not possible, open up when the call is incoming
for every customer call, the call is logged (start, duration, optionally some comment) to the customer account in Salesforce
2-When a customer calls, the customer service sees the name of the customer account (as stored in Salesforce)
3-When an internal number calls, we see the internal name (so the starface address book is still intact)


I used STARFACE UCI java (https://www.starface.de/de/Solutions/integration/interfaces.php) code but I didn't know how I can include it in salesforce any help, please?
 
david beckham 29david beckham 29
Open CTI, short for Open Computer Telephony Integration, is a framework that enables developers to create custom integrations between their web applications and computer telephony systems (CTI). This integration is achieved through a set of JavaScript APIs provided by Open CTI that developers can use to interact with the CTI system, allowing them to initiate calls, receive call events, and control call routing.
For more Details checkout this blogs  - Effectively Manage Call Volume and Resolve Inquiries Faster with Telephony (https://360smsapp.com/blog/360-sms-cti-scale-communications-and-manage-calls-effectively/)
                                                            - Need Salesforce CTI? Here’s How an Ideal Salesforce CTI Integration Should be (https://360smsapp.com/blog/need-salesforce-cti-heres-how-an-ideal-salesforce-cti-integration-should-be/)