PhoneBook
Class finesse.restservices.PhoneBook
Extends finesse.restservices.RestBase Common ParametersPhoneBook is a list of contacts available to a user for a quick dial. PhoneBooks are assigned globally (to all agents) or to specific teams.
Example
_phoneBooks = _user.getPhoneBooks({
onCollectionAdd: _handlePhoneBookAdd,
onCollectionDelete: _handlePhoneBookDelete,
onLoad: _handlePhoneBooksLoaded
});
_phoneBookCollection = _phoneBooks.getCollection();
for (var phoneBookId in _phoneBookCollection) {
if (_phoneBookCollection.hasOwnProperty(phoneBookId)) {
_phoneBook = _phoneBookCollection[phoneBookId];
etc...
}
}For additional parameters and methods, see RestBase Common Parameters.
Methods
getContacts(handlers)
Retrieves the collection of contact objects that is part of the PhoneBook.
Parameters
|
Name |
Type |
Description |
Required |
|---|---|---|---|
|
handlers |
Object |
An object containing the handlers for the request. For more information on handlers, see Request Handlers. |
Yes |
Returns
{finesse.restservices.Contacts} The Contacts object.
getEmbeddedContacts()
Retrieves either a URI or collection of contacts.
Returns
{String} The URI or finesse.restservices.Contacts object.
getName()
Retrieves the name of the PhoneBook.
Returns
{String} The name of the PhoneBook.
getType()
Retrieves the PhoneBook type. The following are the two types of PhoneBooks.
-
GLOBAL—By default, available to all agents. Cisco Finesse supports a maximum of 10 global PhoneBooks.
-
TEAM—The administrator assigns the PhoneBooks to a specific team. Cisco Finesse supports a maximum of 300 team PhoneBooks.
Returns
{String} The PhoneBook type.