This article covers the basic information and instructions needed to setup an open CTI environment in Salesforce. Most of the information are available in Salesforce document. The purpose is just to summarize and save reader time to jump through several docs.
- Go to the setup page (right upper coner, click your name, then setup).
- Find or type Call Centers in quick find.
- Hit Import.
- Import the file.
<callCenter>
<section sortOrder="0" name="reqGeneralInfo" label="General Information">
<item sortOrder="0" name="reqInternalName" label="InternalName">My Open Adapter</item>
<item sortOrder="1" name="reqDisplayName" label="Display Name">My Open CTI Call Center</item>
<item sortOrder="2" name="reqAdapterUrl" label="CTI Adapter URL">http://MYSERVER/MySoftPhone.html</item>
<item sortOrder="3" name="reqUseApi" label="Use CTI API">true</item>
<item sortOrder="4" name="reqSoftphoneHeight" label="Softphone Height">300</item>
<item sortOrder="5" name="reqSoftphoneWidth" label="Softphone Width">500</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>
5. Add yourself as a user by clicking on “Manage Call Center Users” button.
6. Now let’s develop a very easy softphone for your open cti. We want to save it to your url specified above: http://MYSERVER/MySoftPhone.html
<html>
<head>
<!-- Imports Open CTI JavaScript library. It should point to a valid Salesforce domain. -->
<script src="http://YOURURL.TO.salesforce.com/support/api/27.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);
}
//dial a number
function dial() {
var number = document.getElementById("dialPadText").value;
alert("dialing number: " + number);
}
</script>
</head>
<body>
<input type="text" id="dialPadText"/><button onclick="dial()">dial</button><br/>
<button onclick="isInConsole();">isInConsole</button></br>
<button onclick="getCallCenterSettings();">getCallCenterSettings</button></br>
<button onclick="setSoftphoneHeight();">setSoftphoneHeight(300)</button></br>
<button onclick="getPageInfo();">getPageInfo</button>
</body>
</html>
Now you have your basic open CTI in Salesforce. We'll discuss more about open CIT later.

