getSoftphoneLayout() for Salesforce Classic
Returns the softphone layout as a JSON string. This method is only available in API version 27.0 or later.
| Name | Type | Description |
|---|---|---|
callback | function | JavaScript method executed when the API method call is completed. |
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 softphone layout definition is returned as a JSON string. If the API call failed, null is returned. |
error | string or undefined | If the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message. |
The returned JSON string contains three elements, one for each call type:
"Internal""Inbound""Outbound"
Each call type contains three subsections:
"callRelatedFields"—An array of call-related fields selected to display. Possible values are"ANI","DNIS","SEGMENT", and"QUEUE"."objects"—The set of Salesforce objects selected to display, along with theField LabelandField Name(API name) selected to display from each object."screenPopSettings"—Contains a"screenPopsOpenWithin"field with a value of either"ExistingWindow"or"NewWindow", and settings for each screen pop match type:"NoMatch","SingleMatch", and"MultipleMatches". Each match type contains a"screenPopType"field and may also contain a"screenPopData"field. If"screenPopType"is"PopToEntity", then"screenPopData"contains the target object name. If it is"PopToVisualforce", then"screenPopData"contains the target Visualforce page name. If it is"PopToSearch", there is no"screenPopData"field.
Example result: