getCallCenterSettings() for Salesforce Classic

Usage

Returns the call center settings in the call center definition file as a JSON string. For more information, see Call Center Definition Files.

Syntax

sforce.interaction.cti.getCallCenterSettings(callback:function)

Arguments

Name Type Description
callback function JavaScript method executed when the API method call is completed.

Sample Code–JavaScript

<!-- javascript set_clipboard -->
<html>
<head>
   <script type="text/javascript" src="http://domain:port/support/api/25.0/interaction.js"></script>
   <script type="text/javascript">
       var callback = function (response) {
       alert(response.result);
   } 

   //Calls getCallCenterSettings
   sforce.interaction.cti.getCallCenterSettings(callback);
   </script>
</head> 
<body></body>
</html>

Response

This method is asynchronous. The response is returned in an object passed to a callback method. The response object contains the following fields.

Name Type Description
result string If the API call was successful, the call center settings definition is returned as a JSON string. If the API call failed, null is returned.
error string If the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message.