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
SivarajanSivarajan 

OpenCTI - SaveLog method does not work

We use Third party call center tool . I use OpenCTI to update the calldata once a call is completed . I included all the library files but the following SaveLog not at all getting called hence Account record is not created.

    var callback = function (response) {
            if (response.result) {
                      alert(response.result);
               } else { 
                      alert(response.error);
               }
           }
     sforce.interaction.saveLog('Account','Name=NewAccountName&Phone=4155551212',callback);

I included the following script in the top of the visualforce.
     <apex:includescript value="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" />
    <apex:includescript value="/support/console/33.0/integration.js" />
    <apex:includeScript value="{!URLFOR($Resource.cnx__CnxSfdcResources,'js/ConnectsIntegrationAPI.min.js')}"/>
    <apex:includescript value="/soap/ajax/33.0/connection.js" />
    <apex:includescript value="/support/api/33.0/interaction.js" />
  
In the Console, It does not return any message.
Any help much appreciated.
 
SandhyaSandhya (Salesforce Developers) 
Hi,

Try to put 
sforce.interaction.saveLog('Account','Name=NewAccountName&Phone=4155551212',callback);

In Function
 
function saveLog() {

           //Invokes API method
                sforce.interaction.saveLog('Account','Name=NewAccountName&Phone=4155551212', callback);

Please refer below link for the same.

https://developer.salesforce.com/docs/atlas.en-us.api_cti.meta/api_cti/sforce_api_cti_savelog.htm
 
Hope this helps you!

Please mark it as Best Answer if my reply was helpful. It will make it available for other as the proper solution.
 
Thanks and Regards
Sandhya

 
SivarajanSivarajan
Thanks Sandya for your response.

I already tried this one but does not work.