Thursday, October 17, 2013

Who's Going to Dreamforce 13?

92,000 registrants last year. It's AWESOME. 

There will be a lot of console and cti / opencti venders and demos and technical sessions. 

Even if you are not interested, do you know the pass for keynote and expo only is FREE? 


See ya

Thursday, May 23, 2013

Use A Free Account and Start Developing for Service Cloud Console and Open Cti

Got some emails from some developers, thanks for the feedback. It seems that a lot of people may not know a developer account is totally free. You can sign up for a developer org here.

With the account, you'll then follow the instructions to setup service cloud console. Remember to make the app available to your user account like this (Create -> Apps -> [Edit] Sample Console):



Once you have the service cloud console app created, you can follow the instruction to setup open cti:
Setup Open CTI Call Center and Developer Environment

You may also find our How To Build An Open Cti Integration From Scratch series useful.

Happy developing.

Sunday, May 19, 2013

How To Build An Open Cti Integration From Scratch In Service Cloud Console -- The Step by Step Guide. #2 Dynamically Get Context Data


If you haven't, please check out the "part 1, hello world" if necessary.




Get the current console page dynamically:


The open cti apis has a very important function: getPageInfo(). It returns information about the current page as a JSON string. Let's try to use it:
Let's edit the openctiDemo.html in part 1. Make the content look like:

<html>
<head>
</head>
<body>
<input type="button" onclick="javascript:alertPageInfo()" value="PageInfo"/>
</body>
<script type="text/javascript" src="https://MyInstance.salesforce.com/support/api/27.0/interaction.js"></script>
<script type="text/javascript" src="./js/demo.js"></script>
</html>

We'll also need a demo.js file:

var alertPageInfo  = function () {
sforce.interaction.getPageInfo(getPageInfoCallback);
}

var getPageInfoCallback = function (response) {
if (response.result) {
pageInfo = response.result;
alert(pageInfo);
} else {
alert(response.error);
}
}

Now if we open our console, you have a dummy button. Clicking on it you'll see this:


Nothing to be excited yet, but at least we are getting the context when we trigger an action.

Get relavant data from salesforce:


Another important/useful function in the open cti apis is runApex(). The function Executes an Apex method from an Apex class that’s exposed in Salesforce. If you are not sure what Apex is, see “Apex Code Overview” in the Salesforce online help.

The syntax of runApex is:
sforce.interaction.runApex(apexClass:string, methodName:string, methodParams:string, (optional) callback:function)

In this example, I have a pre-defined apex class MyUtils, which contains a method called getPhoneNumberByEntityId. This method will return a phone number associated with the record we pass in.

Now let's modify our demo.js file's getPageInfo() callback like:

var getPageInfoCallback = function (response) {
if (response.result) {
pageInfo = response.result;
               var entityId = JSON.parse(pageInfo).objectId;

sforce.interaction.runApex('MyUtil', 'getPhoneNumberByEntityId', "entityId=" + entityId, apexCallback);
else {
alert(response.error);
}
}

Next step is more exciting: we'll add an apexCallback to handle the data from the salesforce system. We'll cover it in the next article.

Wednesday, April 17, 2013

How To Build An Open Cti Integration From Scratch In Service Cloud Console -- The Step by Step Guide. #1 HelloWorld


This Guide is based on a few assumptions

:


  1. Reader has some javascript experience. (don’t need much)
  2. Reader is familiar with Salesforce Service Cloud
  3. Reader knows the basic concept of Call Centers and Open Cti
  4. Reader is interested to use Open Cti in the Service Cloud Console.
  5. We may need to use salesforce APEX to achieve some functions. It’s not necessary to write any code in APEX but reader needs to be comfortable with this language.

Feel free to skip this part if you are somewhat familiar with all 1 to 5.

Whitelist your softphone domain


Assuming we are using 27.0 version of api as this article is written, we need to first add the domain which your softphone will be to the Service Cloud Console white list. You can do this by: Setup -> Create Apps -> Edit [Your Console App Name] -> Whitelist Domains.

If you haven’t setup your softphone or call center yet, please refer to the earlier article in this blog.

Hello World
Let’s assume the softphone file you setup in the call center is http://mycompany.com/openctiDemo.html. We’ll start with a dummy softphone:

<!DOCTYPE html>
<html>
<head>
</head>
<body>
   <div>Hello World</div>
</body>
</html>

Trying Out Some Apis

First we need to include the integration api:


   <!-- Imports Open Cti AND Console JavaScript library. It should point to a valid Salesforce domain. -->
   <script src="http://yourSFDC/support/api/27.0/interaction.js"></script>
   <script src="http://yourSFDC/support/console/27.0/integration.js"></script>

Now we are ready to test if the apis work:

     <button onclick="sforce.interaction.cti.disableClickToDial();">disable ClickToDial</button></br>
     <button onclick="sforce.interaction.cti.enableClickToDial();">enable ClickToDial</button></br>

At this moment, you should have 2 buttons which will enable and disable the phone numbers on your console pages.

The full list
<!DOCTYPE html>
<html>
<head>
<!-- Imports Open Cti AND Console JavaScript library. It should point to a valid Salesforce domain. -->
   <script src="http://yourSFDC/support/api/27.0/interaction.js"></script>
   <script src="http://yourSFDC/support/console/27.0/integration.js"></script>
</head>
<body>
   <div>Hello World</div>
   <button onclick="sforce.interaction.cti.disableClickToDial();">disable ClickToDial</button></br>
    <button onclick="sforce.interaction.cti.enableClickToDial();">enable ClickToDial</button></br>
</body>
</html>

Monday, March 25, 2013

Open CTI - An Introduction

What is CTI?

CTI stands for "Computer Telephony Integration". Typically, the technology that allows interactions on a telephone and a computer to be integrated or coordinated. The term is predominantly used to describe desktop-based interaction for helping users be more efficient, though it can also refer to server-based functionality such as automatic call routing.

What is Open CTI?

Differentiate itself from desktop CTI, open CTI from salesforce.com doesn't need any desktop integration. It's a "CTI in the cloud".

It has all the features of traditional Desktop CTI like:
  1. Screen popping - Call information display (caller's number (ANI), number dialed (DNIS), and Screen pop on answer, with or without using calling line data. Generally this is used to search a business application for the caller's details.
  2. Dialing - Automatic dialing and computer-controlled dialing (power dial, preview dial, and predictive dial).
  3. Phone control - Includes call control (answer, hang up, hold, conference, etc.) and feature control (DND, call forwarding, etc.).
  4. Transfers - Coordinated phone and data transfers between two parties (i.e., pass on the Screen pop with the call.).
  5. Call center - Allows users to log in as a call center agent and control their agent state (Ready, Busy, Not ready, Break, etc.).

Also,  its ability to incorporate any web-based 3rd party application opens up a realm of possibilities for developers, partners and customers. Developers can expect to design, maintain, innovate a more robust CTI solution. 

Where is the technical architecture Open CTI?

This article on salesforce.com site has a very good overview of open CTI. 


What can I learn from this blog?

We plan to also expand CTI to SMS, Chat, or even video conferences as our blog explores the technology more. Be sure to stay tuned for more articles to come.