getDirectoryNumbers() for Salesforce Classic
Returns the list of phone numbers from the call center’s directory. This method is only available in API version 31.0 or later.
| Name | Type | Description |
|---|---|---|
isGlobal | boolean | Set to true to return directory numbers from the global call center, or false to return directory numbers specific to a call center. |
callCenterName | string | Specifies the call center name on which to return directory numbers. If isGlobal is false and this field is not specified, all directory numbers are returned. |
callback | function | JavaScript method executed when the API method call is completed. |
resultSetPage | integer | Represents the page number of the list of results to return. This number starts at 0. |
resultSetPageSize | integer | Sets the maximum number of phone numbers to retrieve. Defaults to 5000; maximum is 10000. If hasNext returns true in the callback, use this argument with resultSetPage to get the next page of results. For example, if resultSetPageSize is 5000 and resultSetPage is 0, the first 5000 phone numbers are returned; if resultSetPage is 1, the next 5000 are returned. |
| Name | Type | Description |
|---|---|---|
result | string | Returns a JSON string that represents the list of phone numbers from the specified call center name. Each phone number element contains a call center name, phone, and description. |
error | string | If the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message. |
Example result: