You need to sign in to do that
Don't have an account?

CTI adapter js code implemented in a visualforce page works in SF but doesn't work in SF Console
Hi all,
I have a problem and I haven't found too many topics on this subject.
On a custom visualforce page I had to implement CTI Click to dial links for some phone fields. To make it work, because I discover that the CTI adapter won't recognize those fields as phone numbers on custom vf pages (and I use the Contact standard Phone field), I had to add a link on the phone number something like this:
<a href="javascript:sendCTIMessage(%27/CLICK_TO_DIAL?DN=%27%2BencodeURIComponent(%27(801)%20440-5157%27)%2B%27&ID=003M0000003ytsbIAA&ENTITY_NAME=Contact%27);">(801) 440-5157</a>
And this works like a charm in that visualforce page but, the client wants to use it in the Console. And when I open the same page there and I click the link the CTI adapter has no reaction at all... nothing happens.
Any idea on this one?
Thanks!
Hi Mirela,
In the Console the parent page is in the SFDC domain, while the Visualforce page is in the Visualforce domain. These 2 domains cannot communicate with each other.
When sendCTIMessage is called, the message is sent up to the browser window housing the softphone. For the Console, this is in the salesforce domain. When you call it from a Visualforce page, that communication cannot happen.
In the standard application both the softphone and calling element are in the same frame and same domain. The message is sent successfully.
There is a way to get around this. Have a look here - How to build a Custom Interaction Log.
http://blogs.salesforce.com/product/2012/02/custominteractionlog.html
There's a new method in the Service Cloud Console Integration Toolkit call sendCTIMessage. Use that instead of the direct JavaScript call.
All Answers
Hi Mirela,
In the Console the parent page is in the SFDC domain, while the Visualforce page is in the Visualforce domain. These 2 domains cannot communicate with each other.
When sendCTIMessage is called, the message is sent up to the browser window housing the softphone. For the Console, this is in the salesforce domain. When you call it from a Visualforce page, that communication cannot happen.
In the standard application both the softphone and calling element are in the same frame and same domain. The message is sent successfully.
There is a way to get around this. Have a look here - How to build a Custom Interaction Log.
http://blogs.salesforce.com/product/2012/02/custominteractionlog.html
There's a new method in the Service Cloud Console Integration Toolkit call sendCTIMessage. Use that instead of the direct JavaScript call.
Thanks a lot gvasudev! That was very useful and I managed to make it work in Console. So, thanks again!
Gautam,
I'm sorry, but I've read your blog (about creating a CIL) and I still don't understand how I can use it in my scenario.
Can you (or Mirela?) post a sample of the code that will allow a visualforce page displaying within the service console to enable click to dial links for fields that are of type 'phone'.
I have a test visual force page that is being displayed as part of the contact page layout. The VF page is simply :
thanks very much for your help
Charlie
Hi Charlie,
This code worked for me in the service console (the second part, as you will notice is just an image added as a resource to make it look like a normal click-to-dial link, what realy matters is the href part). Hope this will be helpfull for you too, I've spent days searching for a solution on this one.
Thanks for your suggestion - I had seen your earlier post, and I had managed to get something very similar working.
The problem is that this still isn't as clever as the way the standard page layout works. In a standard page layout (with inline editing) the users are able to double click near a phone number to edit it, or click on it to click-to-dial.
The solution that you suggested creates a simple link - it is not editable. So I have to display the field twice on the same page layout: Once so that the user can edit it, and once so that they can click to dial.
It is a waste of space, and it seems a shame that the new pretty CTI can't be used within visualforce pages...