Class finesse.restservices.User
JavaScript representation of a User object. Also exposes methods to operate
on the object against the server.
Defined in: User.js.
Constructor Attributes | Constructor Name and Description |
---|---|
finesse.restservices.User(options)
|
Field Attributes | Field Name and Description |
---|---|
<static> |
finesse.restservices.User.States
State constants
|
<static> |
finesse.restservices.User.WorkMode
Mobile agent/supervisor work modes.
|
Method Attributes | Method Name and Description |
---|---|
getClientLog(callbacks)
Getter for a ClientLog object that is associated with User.
|
|
getDialogs(callbacks)
Getter for a Dialogs collection object that is associated with User.
|
|
Getter for the extension of this User
|
|
Getter for the firstName of this User
|
|
Getter for the lastName of this User
|
|
getMediaPropertiesLayout(callbacks)
Getter for a MediaPropertiesLayout object that is associated with User.
|
|
Getter for the mobile agent dial number.
|
|
Getter for the mobile agent work mode.
|
|
Gets the user's Not Ready reason code.
|
|
getNotReadyReasonCodes(handlers)
Performs a GET against Finesse server retrieving all the Not Ready reason codes.
|
|
getPhoneBooks(handlers)
Getter for a PhoneBooks collection object that is associated with User.
|
|
getQueues(callbacks)
Getter for a Queues collection object that is associated with User.
|
|
getReasonCodeById(handlers, reasonCodeId)
Performs a GET against the Finesse server looking up the reasonCodeId specified.
|
|
getSignoutReasonCodes(handlers)
Performs a GET against Finesse server retrieving all the Signout reason codes.
|
|
getState()
Getter for the state of this User
|
|
Getter for the state change time of this User
|
|
Getter for the supervised Teams this User (Supervisor) supervises, if any
|
|
getWrapUpReasons(handlers)
Getter for a WrapUpReasons collection object that is associated with User.
|
|
overloading this to return URI
|
|
Is user an agent?
|
|
hasRole(theRole)
Checks to see if user has "theRole"
|
|
Is user a supervisor?
|
|
Checks to see if the user is considered a mobile agent by checking for
the existance of the mobileAgent node.
|
|
Returns true if the user's current state will result in a pending state change.
|
|
login(extension, handlers)
Perform an agent login for this user, associating him with the
specified extension.
|
|
loginMobileAgent(extension, mode, extension, handlers)
Perform an agent login for this user, associating him with the
specified extension.
|
|
logout(reasonCode, handlers)
Perform an agent logout for this user.
|
|
makeBargeCall(number, dialogUri, handlers)
Make a silent monitor call to a particular agent's phone number.
|
|
makeCall(The, handlers)
Make call to a particular phone number.
|
|
makeSMCall(number, handlers)
Make a silent monitor call to a particular agent's phone number.
|
|
setState(newState, reasonCode, handlers)
Set the state of the user.
|
Class Detail
finesse.restservices.User(options)
- Parameters:
- {Object} options
- An object with the following properties:
- id: The id of the object being constructed
- onLoad(this): (optional) when the object is successfully loaded from the server
- onChange(this): (optional) when an update notification of the object is received
- onAdd(this): (optional) when a notification that the object is created is received
- onDelete(this): (optional) when a notification that the object is deleted is received
- onError(rsp): (optional) if loading of the object fails, invoked with the error response object:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response
- error: {Object} Wrapped exception that was caught:
- errorType: {String} Type of error that was caught
- errorMessage: {String} Message associated with error
- parentObj: (optional) The parent object
Field Detail
<static>
finesse.restservices.User.States
State constants
<static>
finesse.restservices.User.WorkMode
Mobile agent/supervisor work modes.
Method Detail
{ClientLog}
getClientLog(callbacks)
Getter for a ClientLog object that is associated with User.
- Parameters:
- callbacks
- Returns:
- {ClientLog} A ClientLog collection object.
{Dialogs}
getDialogs(callbacks)
Getter for a Dialogs collection object that is associated with User.
- Parameters:
- callbacks
- Returns:
- {Dialogs} A Dialogs collection object.
{String}
getExtension()
Getter for the extension of this User
- Returns:
- {String} The extension, if any, of this User
{String}
getFirstName()
Getter for the firstName of this User
- Returns:
- {String} The firstName for this User
{String}
getLastName()
Getter for the lastName of this User
- Returns:
- {String} The lastName for this User
{finesse.restservices.MediaPropertiesLayout}
getMediaPropertiesLayout(callbacks)
Getter for a MediaPropertiesLayout object that is associated with User.
- Parameters:
- callbacks
- Returns:
- {finesse.restservices.MediaPropertiesLayout} The MediaPropertiesLayout object associated with this user
{String}
getMobileAgentDialNumber()
Getter for the mobile agent dial number.
- Returns:
- {String} If available, return the mobile agent dial number, otherwise null.
{String}
getMobileAgentMode()
Getter for the mobile agent work mode.
- Returns:
- {String} If available, return the mobile agent work mode, otherwise null
getNotReadyReasonCodeId()
Gets the user's Not Ready reason code.
- Returns:
- undefined if not set or indeterminate
getNotReadyReasonCodes(handlers)
Performs a GET against Finesse server retrieving all the Not Ready reason codes.
- Parameters:
- {Object} handlers
- An object containing the following (optional) handlers for the request:
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response
- A error callback function for an unsuccessful request to be invoked with the
error response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response (HTTP errors)
- error: {Object} Wrapped exception that was caught:
- errorType: {String} Type of error that was caught
- errorMessage: {String} Message associated with error
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
{PhoneBooks}
getPhoneBooks(handlers)
Getter for a PhoneBooks collection object that is associated with User.
- Parameters:
- handlers
- Returns:
- {PhoneBooks} A PhoneBooks collection object.
{Queues}
getQueues(callbacks)
Getter for a Queues collection object that is associated with User.
- Parameters:
- callbacks
- Returns:
- {Queues} A Queues collection object.
getReasonCodeById(handlers, reasonCodeId)
Performs a GET against the Finesse server looking up the reasonCodeId specified.
- Parameters:
- {Object} handlers
- An object containing the following (optional) handlers for the request:
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response
- A error callback function for an unsuccessful request to be invoked with the
error response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response (HTTP errors)
- error: {Object} Wrapped exception that was caught:
- errorType: {String} Type of error that was caught
- errorMessage: {String} Message associated with error
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
- {String} reasonCodeId
- is the id for the reason code to lookup
getSignoutReasonCodes(handlers)
Performs a GET against Finesse server retrieving all the Signout reason codes.
- Parameters:
- {Object} handlers
- An object containing the following (optional) handlers for the request:
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response
- A error callback function for an unsuccessful request to be invoked with the
error response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response (HTTP errors)
- error: {Object} Wrapped exception that was caught:
- errorType: {String} Type of error that was caught
- errorMessage: {String} Message associated with error
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
{String}
getState()
Getter for the state of this User
- Returns:
- {String} The current (or last fetched) state of this User
{String}
getStateChangeTime()
Getter for the state change time of this User
- Returns:
- {String} The state change time of this User
{Array}
getSupervisedTeams()
Getter for the supervised Teams this User (Supervisor) supervises, if any
- Returns:
- {Array} An array of teams supervised by this User (Supervisor)
{WrapUpReasons}
getWrapUpReasons(handlers)
Getter for a WrapUpReasons collection object that is associated with User.
- Parameters:
- handlers
- Returns:
- {WrapUpReasons} A WrapUpReasons collection object.
getXMPPNodePath()
overloading this to return URI
{boolean}
hasAgentRole()
Is user an agent?
- Returns:
- {boolean} if user has role of agent
{boolean}
hasRole(theRole)
Checks to see if user has "theRole"
- Parameters:
- theRole
- Returns:
- {boolean}
{boolean}
hasSupervisorRole()
Is user a supervisor?
- Returns:
- {boolean} if user has role of supervisor
{Boolean}
isMobileAgent()
Checks to see if the user is considered a mobile agent by checking for
the existance of the mobileAgent node.
- Returns:
- {Boolean} True if this agent is a mobile agent.
isPendingStateChange()
Returns true if the user's current state will result in a pending state change. A pending state
change is a request to change state that does not result in an immediate state change. For
example if an agent attempts to change to the NOT_READY state while in the TALKING state, the
agent will not change state until the call ends.
The current set of states that result in pending state changes is as follows:
TALKING
HOLD
RESERVED_OUTBOUND_PREVIEW
{finesse.restservices.User}
login(extension, handlers)
Perform an agent login for this user, associating him with the
specified extension.
- Parameters:
- {String} extension
- The extension to associate with this user
- {Object} handlers
- An object containing the following (optional) handlers for the request:
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response
- A error callback function for an unsuccessful request to be invoked with the
error response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response (HTTP errors)
- error: {Object} Wrapped exception that was caught:
- errorType: {String} Type of error that was caught
- errorMessage: {String} Message associated with error
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
- Returns:
- {finesse.restservices.User} This User object to allow cascading
{finesse.restservices.User}
loginMobileAgent(extension, mode, extension, handlers)
Perform an agent login for this user, associating him with the
specified extension.
- Parameters:
- {String} extension
- The extension to associate with this user
- {String} mode
- The mobile agent work mode as defined in finesse.restservices.User.WorkMode.
- {String} extension
- The external dial number desired to be used by the mobile agent.
- {Object} handlers
- An object containing the following (optional) handlers for the request:
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response
- A error callback function for an unsuccessful request to be invoked with the
error response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response (HTTP errors)
- error: {Object} Wrapped exception that was caught:
- errorType: {String} Type of error that was caught
- errorMessage: {String} Message associated with error
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
- Returns:
- {finesse.restservices.User} This User object to allow cascading
{finesse.restservices.User}
logout(reasonCode, handlers)
Perform an agent logout for this user.
- Parameters:
- {String} reasonCode
- The reason this user is logging out. Pass null for no reason.
- {Object} handlers
- An object containing the following (optional) handlers for the request:
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response
- A error callback function for an unsuccessful request to be invoked with the
error response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response (HTTP errors)
- error: {Object} Wrapped exception that was caught:
- errorType: {String} Type of error that was caught
- errorMessage: {String} Message associated with error
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
- Returns:
- {finesse.restservices.User} This User object to allow cascading
makeBargeCall(number, dialogUri, handlers)
Make a silent monitor call to a particular agent's phone number.
- Parameters:
- number
- to call
- {String} dialogUri
- The associated uri of SUPERVISOR_MONITOR call
- {Object} handlers
- An object containing the following (optional) handlers for the request:
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response
- A error callback function for an unsuccessful request to be invoked with the
error response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response (HTTP errors)
- error: {Object} Wrapped exception that was caught:
- errorType: {String} Type of error that was caught
- errorMessage: {String} Message associated with error
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
makeCall(The, handlers)
Make call to a particular phone number.
- Parameters:
- {String} The
- number to call
- {Object} handlers
- An object containing the following (optional) handlers for the request:
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response
- A error callback function for an unsuccessful request to be invoked with the
error response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response (HTTP errors)
- error: {Object} Wrapped exception that was caught:
- errorType: {String} Type of error that was caught
- errorMessage: {String} Message associated with error
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
makeSMCall(number, handlers)
Make a silent monitor call to a particular agent's phone number.
- Parameters:
- number
- to call
- {Object} handlers
- An object containing the following (optional) handlers for the request:
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response
- A error callback function for an unsuccessful request to be invoked with the
error response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response (HTTP errors)
- error: {Object} Wrapped exception that was caught:
- errorType: {String} Type of error that was caught
- errorMessage: {String} Message associated with error
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
{finesse.restservices.User}
setState(newState, reasonCode, handlers)
Set the state of the user.
- Parameters:
- {String} newState
- The state you are setting
- {ReasonCode} reasonCode
- The reason this user is logging out. Pass null for no reason.
- {Object} handlers
- An object containing the following (optional) handlers for the request:
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response
- A error callback function for an unsuccessful request to be invoked with the
error response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response (HTTP errors)
- error: {Object} Wrapped exception that was caught:
- errorType: {String} Type of error that was caught
- errorMessage: {String} Message associated with error
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
- Returns:
- {finesse.restservices.User} This User object to allow cascading