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
nikhild1.3910144768520398E12nikhild1.3910144768520398E12 

SoftPhone Custom Visualforce page not working in Open CTI

Hi,
  We have developed .NET Application & included it in Call center CTI Adapter Url . All the things are working well, when the call comes its searches phone field in objects , get the results & open the record in new tab in Service cloud console with the ANI no.  With standard all the things are working as expected.

But the issue we want to open our Custom VF page when the call comes instead of standard one.So created VF page & controller & that page is poping up instead of standard one. Now the main problem is we are not getting ANI no. neither in VF page nor in Controller .
1 ) We tried get ANI no. in Apex controller via url, host url, current url etc...but nothing is working.
2) In Vf page we tried to get via including interaction.js file & using its methods , but those methods are not getting called on page load.

Has anyone face the same issue in using open CTI in salesforce?

 Can anyone please help me to fix this error.
 


sfdcAnonsfdcAnon
Hi nikhild1.3910144768520398E12,

I'm assuming you are using the searchAndScreenPopAPI. In the case, to pass parameters to the popped visualforce page, use the "params" argument in the API call.

Example -
Screen pop call Signature:
sforce.interaction.searchAndScreenPop(searchParams:string, queryParams:string, callType:string, (optional) callback:function);
Example call :
sforce.interaction.searchAndScreenPop('Acme', 'ANI=41555512121&DNIS=8006661234', 'inbound', callback);

You can pass any data to a Visualforce screen pop via the params argument. Hope that helps.

nikhild1.3910144768520398E12nikhild1.3910144768520398E12
Hi, Thanks. But right now how the search page is opening up automatically with the ANI no. in search box depending on soft phone settings. So this is working fine & you are saying to pass parametets in search pop up function. But currently everything is working fine with standard so we are not going to modify call center adapter URL its fine. All changes will be done in sf. All we need is to get ANI no. in vf page on load. For standard As soon as the call comes & search page open. up & we see the no. with results. So our requirement is to get ANI no. & not to pass the parameter in function . So as soon as the call comes we want to ANI no. On page load So we don't want to pass the parameter we need to get it.
nikhild1.3910144768520398E12nikhild1.3910144768520398E12
So Below page shows where we include our custom vf page in layout & that is opening up when the call comes but we are not getting any data.


User-added image

So, according to your suggestion, the function 
sforce.interaction.searchAndScreenPop('Acme', 'ANI=41555512121&DNIS=8006661234', 'inbound', callback);

will pop up the custom VF page that we have set in above screenshot, and pass the parameters to this page. If this is the case, where do we include this sforce.interaction.searchAndScreenPop function? This certainly cannot be included in the above page, as thepage opens up after the call has come.

also, the parameters that are being passed to this function are to be fetched from call event data. So where do we include these two functions?

Does this means that we need to add this function in CTI Adapter call center Url ?

Currently when we set softphone layout setting to pop to search page we are getting the ANI number as soon as call comes automatically & following tab appears 

User-added image


In this Tab name  is the ANI no. that pre-populates

So could you please tell us how to proceed.






 
sfdcAnonsfdcAnon
Hi Nikhil,

Can you confirm you are using Open CTI? See - http://blogs.salesforce.com/company/2012/08/open-cti-moving-cti-integrations-to-the-cloud.html

If yes, please do the following -
- Select "Pop to visualforce page" in the softphone layout for
--- "Single matching record"
--- "No matching records"
--- and "Multiple matching records"
The target of this should be your "MultiSearchResult" page.

- On an incoming call, invoke the searchAndScreenPop API with sforce.interaction.searchAndScreenPop('Acme', 'ANI=41555512121&DNIS=8006661234', 'inbound', callback);

You will see that the screenpop page is your "MultiSearchResult" page. The URL parameters of this page will have ANI=41555512121&DNIS=8006661234'.

You asked -
If this is the case, where do we include this sforce.interaction.searchAndScreenPop function?

The sforce.interaction.searchAndScreenPop is the function that performs the screenpop. How are you doing a screen pop now? You would call search and screenpop in the same place.

also, the parameters that are being passed to this function are to be fetched from call event data. So where do we include these two functions?
Where you are performing the screenpop currently.
nikhild1.3910144768520398E12nikhild1.3910144768520398E12
Actually we are using the ININ integration (Interactive Intelligence Platform) its Open CTI . This is completely developed in Microsoft’s .NET framework.  There are also ININ Appexchange packages available for salesforce Integartion.
But we are not using the standard Appexchange packages ,we specially configured according to our requirement by contacting them.
So we can't change .net Code & its configuration ,because standard features are working as expected no isues in that.

Opening which tab when call comes is completely handle by Salesforce i.e Softphone layout settings . When we set layout to open search page on multiresult its opens with ANI number  & when we set to open VF page on layout its opens up but we didn't get any ANI number in URL paramers.
In Apex Controller when we try to get URl paramters we see URL as instance/apex/ourpage? some standard paramters....in this we didn't get any incoming call number details .

So could you please tell us how to proceed now.
kevin.glinski1.3916118500634734E12kevin.glinski1.3916118500634734E12
We don't currently support sending parameters into a VF page when it is used in this manner.  It was an oversight in our implementation.  I've only seen one other customer run into this and the way to work around it is to set the sf_url* call attributes on the call and use that to always pop the VF page, then you can do your own search and redirect to a standard page if a match was found.  
nikhild1.3910144768520398E12nikhild1.3910144768520398E12
So you mean to say that , we should not use standard Salesforce Softphone layout settings to open custom VF page & set apex page link from the  .net code when call comes i.e from iframe call window.

Can u please explain us this in detail , on how to achieve this ?
kevin.glinski1.3916118500634734E12kevin.glinski1.3916118500634734E12
page 37 of the admin guide discusses the SF_URLPop and SF_URLPopLink call attributes which need to be used.  In the example in the guide, it shows using the attribute to pop a new contact page and pre populate some information, so just change the url to be apex/yourpagehere
SaurabhGupta_SaurabhGupta_
Hi Nikhil,

Did you find any solution for this?
Actually I am also facing the same issue . I used a custom vf page but not able to get the ANI value.
Sales RepSales Rep
Hi Nikhill/Saurab,

  I came across the same issue. Does any of the you have got the solution for this.appreciate any help on this. Thank you.

Hi Keving,
 
   you mentioned page 37 of the admin guide. Could you please let me know which admin guide you are referring to. Thank you
Kevin GlinskiKevin Glinski
I was refering to the Interactive Intelligence Admin guide for the CTI integration, that was the specific adapter that Nikhill was using.  It is on our short term roadmap to clear this use case up (dev work to be done in the next couple of weeks)
Surendran K 9Surendran K 9
Hi Nikhil / Kevin,

I am started working on the Opne CTI.

For incoming call notification,  i developed the REST API and give it to the vendor to give the request with param. i got the request as well. but at the time request how we can popop the VF page.

Is there any configuration required at the vendor level(who will provice the CTI service).
Kevin GlinskiKevin Glinski
The screen pop has to be issued client side. The server can not issue the screenpop. 
Surendran K 9Surendran K 9
Hi Kevin,

Thanks. Is Streaming API will helpful in this place for popup notifications?
sfdcAnonsfdcAnon
Streaming API has an SLA of 3 seconds. Are you okay with softphone updates having a lag for that duration ? This doesn't work out too well. Streaming API also has a governor limit (don't know what that is?. Will your customer be in that limit?
Surendran K 9Surendran K 9
Hi sfdcAnon,

Thanks.
Actually i am working on the incoming call notification using Open CTI with third party telephony vendor. We are using the REST API for connectivity. 

For inbound call, they are passing the params(caller number and agent extension) to the REST service which i have developed in SF. 
SF also able th receive the params but how it will notify(linked to) the adapter. how the pop up will come out. i dont have idea on this. So i just tried with Streaming API.

Please Suggest. Thanks in advance. 

Regards,
Suren
Deepak GulianDeepak Gulian

@Surendran Did you find any solution to the same? I am working on lightning open CTI Integration with Twilio and Salesforce. I have started a basic set up of this integration from this Moometric.com (https://moometric.com/integrations/sf/salesforce-open-cti-lightning-with-twilio-tutorial/). Using Twilio I am sending the inbound/outbound call data to the Apex Rest Webservice but not sure how can we pass this information further to the Visualforce page and execute a screen pop method. Any sort of ideas or information is most welcome.

Thanks & Regards
DG

Shashank Todwal 3Shashank Todwal 3
Hi,

Looking for a similar solution, where when a call lands on my Telephony provider, we are informed about the call events to our REST API configured in Telephony Provider, however how do we show a screen pop on the agent's machine who is being called? Considering the REST API is on our server and screen_pop is a client side function.

How can I make my server API tell the Salesforce about an inbound call, ad pop relevant information?