MediaDialog

Class finesse.restservices.MediaDialog

Extends finesse.restservices.DialogBase

Represents a non-voice media dialog and also exposes the methods to perform actions on the media dialog. For example, accepting, starting, pausing, resuming, transferring, closing, and so on.

Example
Code Snippet
Copy_MediaDialogs = _media.getMediaDialogs({
    onCollectionAdd: _handleDialogAdd,
    onCollectionDelete: _handleDialogDelete,
    onLoad: _handleMediaDialogsLoaded
});
_dialogCollection = _MediaDialogs.getCollection();
for (var mediadialogId in _dialogCollection) {
    if (_dialogCollection.hasOwnProperty(dialogId)) {
        _mediadialog = _dialogCollection[mediadialogId];
        etc...
    }
}

For additional parameters and methods, see RestBase Common Parameters.

Methods

setTaskState(action, handlers, target)

Sets the state on a media dialog based on the action given.

Example
Code Snippet
Copy_mediaDialog.setTaskState(finesse.restservices.MediaDialog.TaskActions.ACCEPT, {
        success: _handleAcceptSuccess,
        error: _handleAcceptError
    },
    null)

Parameters

Name

Type

Description

Required

action

String

The action is invoked when the media dialog is set.

Yes

handlers

Object

An object containing the handlers for the request.

For more information on handlers, see Request Handlers.

Yes

target

String

The script selector or dialed number to which the dialog is being transferred. Pass the target as null if the task is not related to transfer.

Yes

transfer(target, handlers)

Transfers a media dialog to the specified target.

Name

Type

Description

Required

target

String

The script selector or dialed number to which the dialog is being transferred.

Yes

handlers

Object

An object containing the handlers for the request.

For more information on handlers, see Request Handlers.

Yes

transferWithWrapup(wrapUpreason, handlers, target)

Transfers a media dialog to the specified target with the wrap-up reason selected by agents.

Code Snippet
Copydialog.transferWithWrapUp(task.selectedWrapupReason, target ,  {
success: _handleAcceptSuccess,
error: _handleAcceptError
},
null)

Name

Type

Description

Required

wrapUpreason

String

The wrap-up reason selected by agents.

Yes

handlers

Object

An object containing the handlers for the request.

For more information on handlers, see Request Handlers.

Yes

target

String

The script selector or dialed number to which the dialog is being transferred. Pass the target as null if the task is not related to transfer.

Yes

closeWithWrapUp(wrapUpreason, handlers, target)

Close a media dialog with the wrap-up reason selected by agents.

Code Snippet
Copy_mediaDialog.closeWithWrapUp('wrapupreason' , {
success: _handleAcceptSuccess,
error: _handleAcceptError
},
null) 

Name

Type

Description

Required

wrapUpreason

String

The wrap-up reason selected by agents.

Yes

handlers

Object

An object containing the handlers for the request.

For more information on handlers, see Request Handlers.

Yes

target

String

The script selector or dialed number to which the dialog is being transferred. Pass the target as null if the task is not related to transfer.

Yes