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.
Constructor Attributes | Constructor Name and Description |
---|---|
- Fields borrowed from class finesse.restservices.RestBase:
- ajaxRequestTimeout, restResponseStatus
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.
|
|
getId()
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
|
|
getName()
Returns the name.
|
|
Returns the reason code id.
|
|
Returns the reason code label.
|
|
Returns true if the user is routable on this Media
|
|
getState()
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
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:
- CLOSE: the dialog will be closed.
- TRANSFER: the dialog will be transferred to another agent.
- 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:
- ACCEPT: the interrupt will be accepted and the agent will not work on tasks in this media until the media is no longer interrupted.
- IGNORE: the interrupt will be ignored and the agent is allowed to work on the task while the media is interrupted.
- 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
{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
- Returns:
- {finesse.restservices.Media} This Media object, to allow cascading
{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:
- finesse.interfaces.RequestHandlers handlers: An object containing the handlers for the request
- 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:
- routable: true if the agent is routable, false otherwise
- finesse.interfaces.RequestHandlers handlers: An object containing the handlers for the request
- 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