---
schema_version: "1"
id: f3e642724d93c0354ca2b1e4ae282847927732d84bb3837ddf3819f0060eea6d
title: isInConsole() for Salesforce Classic
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-isinconsole.md
canonical_url: https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-isinconsole.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 8d8d2126bcee14132d2df94368294082c53e8c9c2bf90aa4a7e5696f4aa49959
products:
  - Open CTI Developer Guide
  - Service Cloud Developer Content
---

# isInConsole() for Salesforce Classic

## Usage

Indicates if the softphone is in the Salesforce console.

**note:** If this method is used in a Salesforce console where multi-monitor components is turned on, any popped out softphone components are indicated as in the console.

## Syntax

```javascript
sforce.interaction.isInConsole(callback:function)
```

## Arguments

|Name|Type|Description|
|------|------|-------------|
|`callback`|function|JavaScript method executed when the API method call is completed.|


## Sample Code–JavaScript

<!-- javascript set_clipboard -->
```javascript
<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) {
           if (response.result) {
              alert('User is in console.');
           }
           else {
              alert('User is not in console.');
           }
        };
</script>
</head>
<body>
       <button onclick="sforce.interaction.isInConsole(callback);">isInConsole</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|
|------|------|-------------|
|`result`|boolean|`true` if the softphone was in the Salesforce console, `false` if the softphone wasn’t in the Salesforce console.|
|`error`|string|If the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message.|


