/mcpWhen the User object is initialized (for example, var _user = new finesse.restservices.User()), a GET REST API request is made to /finesse/api/User/<userid>, and its response is used to populate the User object. When a User change event is received, the User object's values are updated accordingly. For example, if the agent state changes, the respective User object's getState() method reflects the change, and returns the latest state of the agent when invoked. Example var _user = new finesse.restservices.User({ id: _id, onLoad: _handleUserLoad, onChange: _handleUserChange }); For additional parameters and methods, see RestBase Common Parameters, on page 450. Methods getDialogs(handlers) Retrieves the collection of voice dialogs associated with the current user. This includes the dialogs that the user is currently active on, being alerted, along with the held dialogs. The terminated dialogs are not part of the list. The dialog list is retrieved by making a GET REST API request to the /finesse/api/User/<id>/Dialogs/ endpoint. The getDialogs are queried only once from the server that is, when the object is created. Example _dialogs = _user.getDialogs({ onCollectionAdd: handleNewDialog, onCollectionDelete: handleEndDialog }); Parameters Required Description Type Name Optional An object containing callback functions which are invoked when the callback scenario is triggered. To find the list of callback scenarios, see RestCollectionBase Common Parameters, on page 452. Object handlers Returns {finesse.restservices.Dialogs} The Dialogs collection object. getDialogsNoCache(handlers) Retrieves the collection of dialogs (calls) associated with the current user. This includes the dialogs that the user is currently active on, being alerted, along with the held dialogs. The terminated dialogs are not part of the list. The difference between the getDialogsNoCache and getDialogs methods is that the GET REST API request is always made for this method. Example Cisco Finesse Web Services Developer and JavaScript Guide, Release 12.5(1) 460 Cisco Finesse JavaScript APIs User