Class finesse.restservices.User
Extends
finesse.restservices.RestBase.
The User represents a Finesse Agent or Supervisor.
Defined in: finesse.js.
Constructor Attributes | Constructor Name and Description |
---|---|
finesse.restservices.User(options)
|
- Fields borrowed from class finesse.restservices.RestBase:
- ajaxRequestTimeout, restResponseStatus
Method Attributes | Method Name and Description |
---|---|
getDialogs(handlers)
Getter for a Dialogs collection object that is associated with User.
|
|
getDialogsNoCache(handlers)
Getter for a Dialogs collection object that is associated with User.This will always query from server
|
|
Getter for the extension of this User.
|
|
Getter for the firstName of this User.
|
|
Getter for the full name of this User.
|
|
Getter for the lastName of this User.
|
|
getMediaList(handlers)
Getter for Media collection object that is associated with User.
|
|
getMediaPropertiesLayout(handlers)
Getter for a UserMediaPropertiesLayout object that is associated with User.
|
|
getMediaPropertiesLayouts(handlers)
Getter for a UserMediaPropertiesLayouts object that is associated with User.
|
|
Getter for the media state of this 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 the Finesse server and retrieves all of the Not Ready
reason codes.
|
|
Getter for the pending state of this User.
|
|
Getter for the pending state reasonCode of this User.
|
|
getPhoneBooks(handlers)
Getter for a PhoneBooks collection object that is associated with User.
|
|
getQueues(handlers)
Getter for a Queues collection object that is associated with User.
|
|
Getter for the reasonCode of this User.
|
|
getReasonCodeById(handlers, reasonCodeId)
Performs a GET against the Finesse server looking up the reasonCodeId specified.
|
|
Gets the user's Reason Code label.
|
|
getSignoutReasonCodes(handlers)
Performs a GET against the Finesse server and retrieves all of the Not Ready
reason codes.
|
|
getState()
Getter for the state of this User.
|
|
Getter for the state change time of this User.
|
|
Getter for the Teams managed by this User(Supervisor), if any.
|
|
Getter for the id of the Team of this User
|
|
Getter for the name of the Team of this User
|
|
Getter for the wrap-up mode of this User for incoming calls.
|
|
Getter for the wrap-up mode of this User for outgoing calls.
|
|
getWrapUpReasons(handlers)
Getter for a WrapUpReasons collection object that is associated with User.
|
|
Getter for the work mode timer for the user
|
|
Is user an agent?
|
|
Is user a supervisor?
|
|
Checks to see if the user is considered a mobile agent by checking for
the existence of the mobileAgent node.
|
|
Returns true if the user's current state will result in a pending state change.
|
|
Getter for the reasonCode of this User.
|
|
isWrapUp()
Returns true if the user's current state is WORK or WORK_READY.
|
|
Is User required to go into wrap-up?
|
|
login(extension, handlers)
Perform an agent login for this user, associating him with the
specified extension.
|
|
loginMobileAgent(extension, mode, extension, handlers, reasonCode)
Perform an agent login for this user, associating him with the
specified extension.
|
|
logout(reasonCode, handlers)
Perform an agent logout for this user.
|
|
makeBargeCall(The, 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(The, handlers)
Make a silent monitor call to a particular agent's phone number.
|
|
setState(newState, reasonCode, handlers)
Set the state of the user.
|
|
updateToMobileAgent(mode, dialNumber, handlers)
Update user object in Finesse with agent's mobile login information (Refer defect CSCvc35407)
|
- Methods borrowed from class finesse.restservices.RestBase:
- addHandler, getBaseRestUrl, getData, getId, getProperty, getRestUrlAdditionalParameters, hasProperty, isLoaded, refresh, removeHandler
Class Detail
finesse.restservices.User(options)
_user = new finesse.restservices.User({ id: _id, onLoad : _handleUserLoad, onChange : _handleUserChange });
- Parameters:
- {Object} options
- An object with the following properties:
- id: The id of the object being constructed
- onLoad(this): (optional) callback handler for when the object is successfully loaded from the server
- onChange(this): (optional) callback handler for when an update notification of the object is received
- onAdd(this): (optional) callback handler for when a notification that the object is created is received
- onDelete(this): (optional) callback handler for when a notification that the object is deleted is received
- onError(rsp): (optional) callback handler for 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
Method Detail
{finesse.restservices.Dialogs}
getDialogs(handlers)
Getter for a Dialogs collection object that is associated with User.
- Parameters:
- {finesse.interfaces.RestObjectHandlers} handlers Optional
- Object that sets callback handlers (only applicable when Object has not been previously created).
- Returns:
- {finesse.restservices.Dialogs} A Dialogs collection object.
{finesse.restservices.Dialogs}
getDialogsNoCache(handlers)
Getter for a Dialogs collection object that is associated with User.This will always query from server
- Parameters:
- {finesse.interfaces.RestObjectHandlers} handlers Optional
- Object that sets callback handlers
- Returns:
- {finesse.restservices.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}
getFullName()
Getter for the full name of this User.
The full name is of the format "FirstName LastName" (for example: "John Doe")
- Returns:
- {String} The full name of this User.
{String}
getLastName()
Getter for the lastName of this User.
- Returns:
- {String} The lastName for this User
{finesse.restservices.MediaList}
getMediaList(handlers)
Getter for Media collection object that is associated with User.
- Parameters:
- {finesse.interfaces.RestObjectHandlers} handlers Optional
- Object that sets callback handlers (only applicable when Object has not been previously created).
- Returns:
- {finesse.restservices.MediaList} A Media Dialogs collection object.
{finesse.restservices.UserMediaPropertiesLayout}
getMediaPropertiesLayout(handlers)
Getter for a UserMediaPropertiesLayout object that is associated with User.
- Parameters:
- {finesse.interfaces.RestObjectHandlers} handlers Optional
- Object that sets callback handlers (only applicable when Object has not been previously created).
- Returns:
- {finesse.restservices.UserMediaPropertiesLayout} The UserMediaPropertiesLayout object associated with this user
{finesse.restservices.UserMediaPropertiesLayout}
getMediaPropertiesLayouts(handlers)
Getter for a UserMediaPropertiesLayouts object that is associated with User.
- Parameters:
- {finesse.interfaces.RestObjectHandlers} handlers Optional
- Object that sets callback handlers (only applicable when Object has not been previously created).
- Returns:
- {finesse.restservices.UserMediaPropertiesLayout} The UserMediaPropertiesLayout object associated with this user
{String}
getMediaState()
Getter for the media state of this User.
- Returns:
- {String} The current (or last fetched) media state of this User Will be applicable only in CCX deployments When the agent is talking on a manual outbound call, it returns busy The value will not be present in other cases.
{String}
getMobileAgentDialNumber()
Getter for the mobile agent dial number.
- Returns:
- {String} If available, return the mobile agent dial number, otherwise null.
{finesse.restservices.User.WorkMode}
getMobileAgentMode()
Getter for the mobile agent work mode.
- Returns:
- {finesse.restservices.User.WorkMode} If available, return the mobile agent work mode, otherwise null.
{String}
getNotReadyReasonCodeId()
Gets the user's Not Ready reason code.
- Returns:
- {String} Reason Code Id, or undefined if not set or indeterminate
getNotReadyReasonCodes(handlers)
Performs a GET against the Finesse server and retrieves all of the Not Ready
reason codes. Note that there is no return value; use the success handler to
process a valid return.
_user.getNotReadyReasonCodes({ success: handleNotReadyReasonCodesSuccess, error: handleNotReadyReasonCodesError });
- Parameters:
- {finesse.interfaces.RequestHandlers} handlers
- An object containing the handlers for the request
{String}
getPendingState()
Getter for the pending state of this User.
- Returns:
- {String} The pending state of this User
{Object}
getPendingStateReasonCode()
Getter for the pending state reasonCode of this User.
- Returns:
- {Object} The reasonCode for the pending state of the User.
The contents may include the following:- uri: The URI for the reason code object.
- id: The unique ID for the reason code.
- category: The category. Can be either NOT_READY or LOGOUT.
- code: The numeric reason code value.
- label: The label for the reason code.
- forAll: Boolean flag that denotes the global status for the reason code.
- systemCode: Boolean flag which denotes whether the reason code is system generated or custom one.
{finesse.restservices.PhoneBooks}
getPhoneBooks(handlers)
Getter for a PhoneBooks collection object that is associated with User.
- Parameters:
- {finesse.interfaces.RestObjectHandlers} handlers Optional
- Object that sets callback handlers (only applicable when Object has not been previously created).
- Returns:
- {finesse.restservices.PhoneBooks} A PhoneBooks collection object.
{finesse.restservices.Queues}
getQueues(handlers)
Getter for a Queues collection object that is associated with User.
- Parameters:
- {finesse.interfaces.RestObjectHandlers} handlers Optional
- Object that sets callback handlers (only applicable when Object has not been previously created).
- Returns:
- {finesse.restservices.Queues} A Queues collection object.
{Object}
getReasonCode()
Getter for the reasonCode of this User.
- Returns:
- {Object} The reasonCode for the state of the User
The contents may include the following:- uri: The URI for the reason code object.
- id: The unique ID for the reason code.
- category: The category. Can be either NOT_READY or LOGOUT.
- code: The numeric reason code value.
- label: The label for the reason code.
- forAll: Boolean flag that denotes the global status for the reason code.
- systemCode: Boolean flag which denotes whether the reason code is system generated or custom one.
getReasonCodeById(handlers, reasonCodeId)
Performs a GET against the Finesse server looking up the reasonCodeId specified.
Note that there is no return value; use the success handler to process a
valid return.
- Parameters:
- {finesse.interfaces.RequestHandlers} handlers
- An object containing the handlers for the request
- {String} reasonCodeId
- The id for the reason code to lookup
{String}
getReasonCodeLabel()
Gets the user's Reason Code label. Works for both Not Ready and
Logout reason codes
- Returns:
- {String} the reason code label, or empty string if none
getSignoutReasonCodes(handlers)
Performs a GET against the Finesse server and retrieves all of the Not Ready
reason codes. Note that there is no return value; use the success handler to
process a valid return.
_user.getSignoutReasonCodes({ success: handleSignoutReasonCodesSuccess, error: handleSignoutReasonCodesError });
- Parameters:
- {finesse.interfaces.RequestHandlers} handlers
- An object containing the handlers for the request
{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 Teams managed by this User(Supervisor), if any.
- Returns:
- {Array} of objects containing id, name, uri of the Teams managed by this User(Supervisor).
The object content includes the following:- id: The unique ID for the team.
- name: The team name for the team.
- uri: The URI for the team.
{String}
getTeamId()
Getter for the id of the Team of this User
- Returns:
- {String} The current (or last fetched) id of the Team of this User
{String}
getTeamName()
Getter for the name of the Team of this User
- Returns:
- {String} The current (or last fetched) name of the Team of this User
{String}
getWrapUpOnIncoming()
Getter for the wrap-up mode of this User for incoming calls.
- Returns:
- {String} The wrap-up mode of this user that is a value of finesse.restservices.User.WrapUpMode
{String}
getWrapUpOnOutgoing()
Getter for the wrap-up mode of this User for outgoing calls.
- Returns:
- {String} The wrap-up mode of this user that is a value of finesse.restservices.User.WrapUpMode
{finesse.restservices.WrapUpReasons}
getWrapUpReasons(handlers)
Getter for a WrapUpReasons collection object that is associated with User.
- Parameters:
- {finesse.interfaces.RestObjectHandlers} handlers Optional
- Object that sets callback handlers (only applicable when Object has not been previously created).
- Returns:
- {finesse.restservices.WrapUpReasons} A WrapUpReasons collection object.
{String}
getWrapUpTimer()
Getter for the work mode timer for the user
- Since:
- 12.0.1
- Returns:
- {String} The WrapUpTimer for the user
{Boolean}
hasAgentRole()
Is user an agent?
- Returns:
- {Boolean} True if user has role of agent, else false.
{Boolean}
hasSupervisorRole()
Is user a supervisor?
- Returns:
- {Boolean} True if user has role of supervisor, else false.
{Boolean}
isMobileAgent()
Checks to see if the user is considered a mobile agent by checking for
the existence of the mobileAgent node.
- Returns:
- {Boolean} True if this agent is a mobile agent.
{Boolean}
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
- Returns:
- {Boolean} True if there is a pending state change.
{Boolean}
isReasonCodeReserved()
Getter for the reasonCode of this User.
- Returns:
- {Boolean} True if the reason code for the state of the user is a system generated reason code.
{Boolean}
isWrapUp()
Returns true if the user's current state is WORK or WORK_READY. This is used so
that a pending state is not cleared when moving into wrap up (work) mode.
Note that we don't add this as a pending state, since changes while in wrap up
occur immediately (and we don't want any "pending state" to flash on screen.
- Returns:
- {Boolean} True if user is in wrap-up mode.
{Boolean}
isWrapUpRequired()
Is User required to go into wrap-up?
- Returns:
- {Boolean} True if this agent is required to go into wrap-up.
{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
- {finesse.interfaces.RequestHandlers} handlers
- An object containing the handlers for the request
- Returns:
- {finesse.restservices.User} This User object, to allow cascading
{finesse.restservices.User}
loginMobileAgent(extension, mode, extension, handlers, reasonCode)
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.
- {finesse.interfaces.RequestHandlers} handlers
- An object containing the handlers for the request
- {Object} reasonCode
- An object containing the reasonCode for the login request
- 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.
- {finesse.interfaces.RequestHandlers} handlers
- An object containing the handlers for the request
- Returns:
- {finesse.restservices.User} This User object, to allow cascading
{finesse.restservices.User}
makeBargeCall(The, dialogUri, handlers)
Make a silent monitor call to a particular agent's phone number.
- Parameters:
- {String} The
- number to call
- {String} dialogUri
- The associated dialog uri of SUPERVISOR_MONITOR call
- {finesse.interfaces.RequestHandlers} handlers
- An object containing the handlers for the request
- Returns:
- {finesse.restservices.User} This User object, to allow cascading
- See:
- finesse.restservices.dialog
{finesse.restservices.User}
makeCall(The, handlers)
Make call to a particular phone number.
- Parameters:
- {String} The
- number to call
- {finesse.interfaces.RequestHandlers} handlers
- An object containing the handlers for the request
- Returns:
- {finesse.restservices.User} This User object, to allow cascading
{finesse.restservices.User}
makeSMCall(The, handlers)
Make a silent monitor call to a particular agent's phone number.
- Parameters:
- {String} The
- number to call
- {finesse.interfaces.RequestHandlers} handlers
- An object containing the handlers for the request
- Returns:
- {finesse.restservices.User} This User object, to allow cascading
{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.
- {finesse.interfaces.RequestHandlers} handlers
- An object containing the handlers for the request
- Returns:
- {finesse.restservices.User} This User object, to allow cascading
{finesse.restservices.User}
updateToMobileAgent(mode, dialNumber, handlers)
Update user object in Finesse with agent's mobile login information (Refer defect CSCvc35407)
- Parameters:
- {String} mode
- The mobile agent work mode as defined in finesse.restservices.User.WorkMode.
- {String} dialNumber
- The external dial number desired to be used by the mobile agent.
- {finesse.interfaces.RequestHandlers} handlers
- An object containing the handlers for the request
- Returns:
- {finesse.restservices.User} This User object, to allow cascading