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
|
Method Attributes | Method Name and Description |
---|---|
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.
|
|
Gets the user's Not Ready reason code.
|
|
getNotReadyReasonCodes(handlers)
Performs a GET against Finesse server retrieving all the Not Ready reason codes.
|
|
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 supervised Teams this User (Supervisor) supervises, if any
|
|
getWrapUpReasons(handlers)
Getter for a WrapUpReasons collection object that is associated with User.
|
|
Is user an agent?
|
|
hasRole(theRole)
Checks to see if user has "theRole"
|
|
Is user a supervisor?
|
|
Returns true if the user is in the HOLD or TALKING state.
|
|
login(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.
|
|
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
Method Detail
{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
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:
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
{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.
{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
isOnHoldOrTalking()
Returns true if the user is in the HOLD or TALKING state.
{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}
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
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