cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
975
Views
5
Helpful
1
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Juan Othmaro Menjivar on 16-05-2013 05:33:28 PM
I'm in the process of writing my first Finesse Gadget and I'm trying to read Agent's PhoneBook, reading API documentation it points that I need to create an user object which I already did and it works because I'm pulling state and firstname and in order to read phone books I'm executing the following code:
 
var colPhoneBook;
colPhoneBook = user.getPhoneBooks();
alert (colPhoneBook.lenght); /** I'm never seeing this popup **/
 
Any help would be appreciated.
 
PS. I already checked and I do have 2 phone books created and accessibility set to ALL USERS.

Subject: RE: Finesse API
Replied by: David Lender on 21-05-2013 09:28:48 AM
The user.getPhoneBooks api requires you specify callback handlers like this:   _phoneBooks = user.getPhoneBooks({            onLoad : _handlePhoneBooksLoaded,             onError : _handlePhoneBooksError           });    

Subject: RE: Finesse API
Replied by: David Lender on 21-05-2013 04:34:30 PM
The Finesse javascript library has been updated to include support for the PhoneBooks/PhoneBook APIs and is now available for download under the Tools directory.  I have also attached a PhoneBook sample to this post that is a modification of SampleGadget_Final to display the User's phonebook contacts at the bottom of the gadget.   If you have questions about using the PhoneBooks/PhoneBook API let us know.

Subject: RE: Finesse API
Replied by: Juan Othmaro Menjivar on 21-05-2013 04:44:34 PM
Thank you very much for your help David, I'll be checking this code later today and will let you know any progress.
I'm curious about the syntaxes’ because I'm using the html API reference available through the web site and it doesn't detail about handlers in the getPhoneBook method. How are we supposed to know which are the required handles for any method?
You’re collaboration would be much appreciated.
 
Juan
Comments
tgledbetter
Level 1
Level 1

Thanks David, the PhoneBook example is great. Are there any good examples for building queue objects? I'd like to pop an alert based on .getStatistics().startTimeOfLongestCallInQueue.

Looking at the JsDoc; I would think Queues could be handled in much the same way as PhoneBook. But I'm struggling with the queues object syntax. Any help is appreciated!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links