---
schema_version: "1"
id: e9b037e5d2c82d4606c4db44151db855ae231413f2a4c08030ce9fe1793b0675
title: isSoftphonePanelVisible() for Lightning Experience
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/api-cti/guides/sforce-api-cti-issoftphonepanelvisible-lex.md
canonical_url: https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-issoftphonepanelvisible-lex.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 0fe8e423f966e624ed4a45c1f3c8084249c67b4ab640364f847cd56f8d8e6d79
products:
  - Open CTI Developer Guide
  - Service Cloud Developer Content
---

# isSoftphonePanelVisible() for Lightning Experience

## Usage

Use this method to return the visibility status of the softphone panel. Returns `true` if the softphone panel is visible and `false` if it’s minimized. This method is available in API version 38.0 or later.

## Syntax

```javascript
sforce.opencti.isSoftphonePanelVisible({
     callback: FUNCTION
});
```

## Arguments

|Name|Type|Description|
|------|------|-------------|
|`callback`|function|JavaScript method executed when the API method call is completed.|


## Sample Code–HTML and JavaScript with a callback

<!-- html set_clipboard -->
```html
<html>
  <head>
    <script type="text/javascript" src="https://domain:port/support/api//lightning/opencti_min.js"></script>
    <script type="text/javascript">
      var callback = function(response) {
         if (response.success) {
            console.log('API method call executed successfully! returnValue:', response.returnValue);
         } else { 
            console.error('Something went wrong! Errors:', response.errors);
         }
      };

      function isSoftphonePanelVisible() {
          sforce.opencti.isSoftphonePanelVisible({callback: callback});
      }
     </script>
  </head>
  <body>
    <button onclick="isSoftphonePanelVisible();">isSoftphonePanelVisible()</button>
  </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|
|------|------|-------------|
|`success`|boolean|Returns `true` if the API method call was invoked successfully, `false` otherwise.|
|`returnValue`|object|Contains the boolean property `visible` which indicates the visibility status of the softphone panel. It’s `true` if the softphone is visible and `false` if it’s minimized.|
|`errors`|array|If the API call was successful, this variable is `null`. If the API call failed, this variable returns an array of [error messages](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-error-messages-lightning.md).|


