Class Index | File Index

Classes


Class finesse.restservices.Media


Extends finesse.restservices.RestBase.
A Media represents a non-voice channel, for example, a chat or a email.
Defined in: finesse.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Fields borrowed from class finesse.restservices.RestBase:
ajaxRequestTimeout, restResponseStatus
Method Summary
Method Attributes Method Name and Description
 
Returns the action to be taken in the event the agent logs out with dialogs associated with this media.
 
Returns the id.
 
Returns the action to be taken in the event this media is interrupted.
 
Returns true if this media is interruptible
 
Returns maximum number of dialogs allowed on this Media
 
getMediaDialogs(handlers)
Returns a MediaDialogs collection object that is associated with User on this Media.
 
Returns the Media id
 
Returns the name.
 
Returns the reason code id.
 
Returns the reason code label.
 
Returns true if the user is routable on this Media
 
Returns the state of the User on this Media.
 
Returns true if the user interruptible on this Media.
 
Returns true if the user in work state on this Media.
 
Returns true if the user in any state except LOGOUT on this Media.
 
Returns true if the user is routable on this Media.
 
login(params)
Log the agent into this media.
 
logout(reasonCode, params)
Perform a logout for a user on this media.
 
refresh(retries)
Refresh this media object and optionally refresh the list of media dialogs associated with this object.
 
Refresh the dialog collection associated with this media.
 
setMediaOptions(mediaOptions)
Set the maxDialogLimit, interruptAction, and dialogLogoutAction settings that the application will use for this media.
 
setRoutable(options)
Sets the routable status of this media .
 
setState(newState, reasonCode, params)
Set the state of the user on this Media.
Methods borrowed from class finesse.restservices.RestBase:
addHandler, getBaseRestUrl, getData, getProperty, getRestUrlAdditionalParameters, hasProperty, isLoaded, removeHandler
Class Detail
finesse.restservices.Media()
Method Detail
{*|Object} getDialogLogoutAction()
Returns the action to be taken in the event the agent logs out with dialogs associated with this media. The action will be one of the following:
Returns:
{*|Object}

{String} getId()
Returns the id.
Returns:
{String} The id.

{*|Object} getInterruptAction()
Returns the action to be taken in the event this media is interrupted. The action will be one of the following:
Returns:
{*|Object}

{Boolean} getInterruptible()
Returns true if this media is interruptible
Returns:
{Boolean} true if interruptible; false otherwise

{String} getMaxDialogLimit()
Returns maximum number of dialogs allowed on this Media
Returns:
{String} The maximum number of Dialogs on this Media

{finesse.restservices.MediaDialogs} getMediaDialogs(handlers)
Returns a MediaDialogs collection object that is associated with User on this Media.
 First call:
     _mediaDialogs = _media.getMediaDialogs({
                     onLoad : _handleMediaDialogsLoad,
                     onChange : _handleTeamChange,
                     onAdd: _handleMediaDialogAdd,
                     onDelete: _handleMediaDialogDelete,
                     onError: _errorHandler
     });
 Subsequent calls on the same object, after the media dialogs are loaded:
     ...
     _mediaDialogsNew = _media.getMediaDialogs();
     _dialogsCollection = _mediaDialogsNew.getCollection();
     ...
Parameters:
{finesse.interfaces.RestObjectHandlers} handlers Optional
Object that sets callback handlers (only applicable when Object has not been previously created).
Returns:
{finesse.restservices.MediaDialogs} A MediaDialogs collection object.

{String} getMediaId()
Returns the Media id
Returns:
{String} The Media id

{String} getName()
Returns the name.
Returns:
{String} The name.

{String} getReasonCodeId()
Returns the reason code id.
Returns:
{String} The reason code id.

{String} getReasonCodeLabel()
Returns the reason code label.
Returns:
{String} The reason code label.

{Boolean} getRoutable()
Returns true if the user is routable on this Media
Returns:
{Boolean} true if routable, false otherwise

{String} getState()
Returns the state of the User on this Media.
Returns:
{String} The current (or last fetched) state of the User on this Media
See:
finesse.restservices.Media.States

{Boolean} isInterruptible()
Returns true if the user interruptible on this Media.
Returns:
{Boolean} true if interruptible; false otherwise

{boolean} isInWorkState()
Returns true if the user in work state on this Media.
Returns:
{boolean} true if the media is in work state; false otherwise

{boolean} isLoggedIn()
Returns true if the user in any state except LOGOUT on this Media.
Returns:
{boolean} returns true if the agent is in any state except LOGOUT in this media

{Boolean} isRoutable()
Returns true if the user is routable on this Media.
Returns:
{Boolean} true if routable, false otherwise

{finesse.restservices.Media} login(params)
Log the agent into this media.
Parameters:
{Object} params
An object with the following properties:
  • maxDialogLimit:The maximum number of tasks that is allowed to handle concurrently
  • interruptAction: Accept or ignore interrupts
  • dialogLogoutAction: transfer or close the task at logout time
  • finesse.interfaces.RequestHandlers handlers: An object containing the handlers for the request
If maxDialogLimit, interruptAction, and dialogLogoutAction are not present, loginOptions specified in the call to finesse.restservices.MediaList.getMedia() will be used.
Returns:
{finesse.restservices.Media} This Media object, to allow cascading
See:
finesse.restservices.MediaList#getMedia

{finesse.restservices.Media} logout(reasonCode, params)
Perform a logout for a user on this media.
Parameters:
{String} reasonCode
The reason code for this user to logging out of this media. Pass null for no reason.
{Object} params
An object with the following properties:
Returns:
{finesse.restservices.Media} This Media object, to allow cascading

refresh(retries)
Refresh this media object and optionally refresh the list of media dialogs associated with this object.
Parameters:
{Integer} retries
the number of times to retry synchronizing this media object.

refreshMediaDialogs()
Refresh the dialog collection associated with this media. The refresh will happen only if the media dialogs have been initialized.

setMediaOptions(mediaOptions)
Set the maxDialogLimit, interruptAction, and dialogLogoutAction settings that the application will use for this media. In the event of a failure, these options will be set on the new Finesse server.
Parameters:
{Object} mediaOptions
an object with the following properties:
  • maxDialogLimit:The maximum number of tasks that is allowed to handle concurrently
  • interruptAction: Accept or ignore interrupts
  • dialogLogoutAction: transfer or close the task at logout time

{finesse.restservices.Media} setRoutable(options)
Sets the routable status of this media .
Parameters:
{Object} options
An object with the following properties:
Returns:
{finesse.restservices.Media} This Media object, to allow cascading

{finesse.restservices.Media} setState(newState, reasonCode, params)
Set the state of the user on this Media.
    _media.setState(finesse.restservices.Media.States.NOT_READY, 
        {
            id: _reasonCodeId
        },
        {
            handlers: {
                success: _handleStateChangeSuccess,
                error : _handleStateChangeError
            }
        });
Parameters:
{String} newState
The new state to be set.
{ReasonCode} reasonCode
The reason code for the state change for this media. Pass null for no reason.
{Object} params
An object with the following properties:
  • maxDialogLimit:The maximum number of tasks that is allowed to handle concurrently
  • interruptAction: Accept or ignore interrupts
  • dialogLogoutAction: transfer or close the task at logout time
  • finesse.interfaces.RequestHandlers handlers: An object containing the handlers for the request
Returns:
{finesse.restservices.Media} This Media object, to allow cascading
See:
finesse.restservices.User.States

Documentation generated by JsDoc Toolkit 2.3.2 on Thu Jan 02 2020 09:55:47 GMT-0500 (EST)