Agent cobrowse API
Methods
-
cancelRequestControl() → {AvayaCoBrowseClientServices.Base.CobrowsePromise}
-
Cancel a Request for a control to customer.
Returns:
{ AvayaCoBrowseClientServices.Base.CobrowsePromise }On success the promise will be resolved with AvayaCoBrowseClientServices.Base.CobrowseSessionInfo
On error the promise will be rejected with an AvayaCoBrowseClientServices.Base.CoBrowseError.
-
clearAllAgentAnnotations() → {void}
-
clear all agent annotations on the webpage.
Returns:
{ void }
-
disableElementHighlight() → {void}
-
enable highlight Element feature
Returns:
{ void }
-
disableHighlight() → {void}
-
disable highlight text feature, default is enabled
Returns:
{ void }
-
disableMarker() → {Object}
-
disable data marker feature
Returns:
{ Object }promise object on which methods can be attached
-
disableTitle() → {void}
-
disable Title feature of element to be co-browsed, default is enabled
Returns:
{ void }
-
enableElementHighlight() → {void}
-
enable highlight Element feature
Returns:
{ void }
-
enableHighlight() → {void}
-
enable highlight text feature, default is enabled.
Returns:
{ void }
-
enableMarker() → {Object}
-
enable data marker feature
Returns:
{ Object }promise object on which methods can be attached
-
enableTitle() → {void}
-
enable Title feature of element to be co-browsed, default is enabled.
Returns:
{ void }
-
getAgentData() → {AvayaCoBrowseClientServices.Base.CobrowseSessionInfo}
-
get the Agent cobrowse session data
Returns:
-
hideAllAgentAnnotations() → {AvayaCoBrowseClientServices.Base.CobrowsePromise}
-
hide agent's annotations.
Returns:
{ AvayaCoBrowseClientServices.Base.CobrowsePromise }On success the promise will be resolved with {String}
On error the promise will be rejected with an AvayaCoBrowseClientServices.Base.CoBrowseError
-
hideAllAgentMarkers() → {AvayaCoBrowseClientServices.Base.CobrowsePromise}
-
hide agent side markers.
Returns:
{ AvayaCoBrowseClientServices.Base.CobrowsePromise }On success the promise will be resolved with {String}
On error the promise will be rejected with an AvayaCoBrowseClientServices.Base.CoBrowseError
-
hideAllCustomerAnnotations() → {AvayaCoBrowseClientServices.Base.CobrowsePromise}
-
hide customer side annotations.
Returns:
{ AvayaCoBrowseClientServices.Base.CobrowsePromise }On success the promise will be resolved with {String}
On error the promise will be rejected with an AvayaCoBrowseClientServices.Base.CoBrowseError
-
hideAllCustomerMarkers() → {AvayaCoBrowseClientServices.Base.CobrowsePromise}
-
hide customer side markers.
Returns:
{ AvayaCoBrowseClientServices.Base.CobrowsePromise }On success the promise will be resolved with {String}
On error the promise will be rejected with an AvayaCoBrowseClientServices.Base.CoBrowseError
-
joinLiveSession(name, sessionKey, emailId) → {AvayaCoBrowseClientServices.Base.CobrowsePromise}
-
join existing cobrowse session created by Customer.
Parameters:
Name Type Argument Description name
String Name of the Agent to join an existing cobrowse session.
sessionKey
String shared by Customer to join an existing cobrowse session
emailId
String <optional>
email id to create a cobrowse session
Returns:
{ AvayaCoBrowseClientServices.Base.CobrowsePromise }On success the promise will be resolved with AvayaCoBrowseClientServices.Base.CobrowseSessionInfo
On error the promise will be rejected with an AvayaCoBrowseClientServices.Base.CoBrowseError.
-
joinSession(sessionKey) → {AvayaCoBrowseClientServices.Base.CobrowsePromise}
-
request to Join a session after request Session
Parameters:
Name Type Description sessionKey
String sessionKey generated through the agent request session
Returns:
{ AvayaCoBrowseClientServices.Base.CobrowsePromise }On success the promise will be resolved with AvayaCoBrowseClientServices.Base.CobrowseSessionInfo
On error the promise will be rejected with an AvayaCoBrowseClientServices.Base.CoBrowseError.
-
logoutSession(logoutReason) → {AvayaCoBrowseClientServices.Base.CobrowsePromise}
-
stop the cobrowse Session
Parameters:
Name Type Argument Description logoutReason
String <optional>
Reason for Logout
Returns:
{ AvayaCoBrowseClientServices.Base.CobrowsePromise }On success the promise will be resolved with AvayaCoBrowseClientServices.Base.CobrowseSessionInfo
On error the promise will be rejected with an AvayaCoBrowseClientServices.Base.CoBrowseError.
-
onDemandUpdate() → {AvayaCoBrowseClientServices.Base.CobrowsePromise}
-
request to synchronize the latest customer DOM
Returns:
{ AvayaCoBrowseClientServices.Base.CobrowsePromise }On success the promise will be resolved with AvayaCoBrowseClientServices.Base.CobrowseSessionInfo
On error the promise will be rejected with an AvayaCoBrowseClientServices.Base.CoBrowseError.
-
releaseControl() → {AvayaCoBrowseClientServices.Base.CobrowsePromise}
-
request to release control
Returns:
{ AvayaCoBrowseClientServices.Base.CobrowsePromise }On success the promise will be resolved with AvayaCoBrowseClientServices.Base.CobrowseSessionInfo
On error the promise will be rejected with an AvayaCoBrowseClientServices.Base.CoBrowseError.
-
removeAllAgentMarkers() → {void}
-
remove all agent markers on the webpage.
Returns:
{ void }
-
requestControl() → {AvayaCoBrowseClientServices.Base.CobrowsePromise}
-
Request for a control to customer.
Returns:
{ AvayaCoBrowseClientServices.Base.CobrowsePromise }On success the promise will be resolved with AvayaCoBrowseClientServices.Base.CobrowseSessionInfo
On error the promise will be rejected with an AvayaCoBrowseClientServices.Base.CoBrowseError.
-
requestSession(name, locale, emailId) → {AvayaCoBrowseClientServices.Base.CobrowsePromise}
-
request to create a cobrowse session
Parameters:
Name Type Argument Description name
String Name of Agent to initiate a cobrowse session.
locale
AvayaCoBrowseClientServices.Services.Cobrowse.LocaleField Locale for langualge selection
emailId
String <optional>
email id to create a cobrowse session
Returns:
{ AvayaCoBrowseClientServices.Base.CobrowsePromise }On success the promise will be resolved with AvayaCoBrowseClientServices.Base.CobrowseSessionInfo
On error the promise will be rejected with an AvayaCoBrowseClientServices.Base.CoBrowseError.
-
setAgentConnectionRetryAttempts(retryAttempts) → {void}
-
set the agent connection retry attemps when disconnect from network
Parameters:
Name Type Argument Default Description retryAttempts
number <optional>
10 Number of attempts, cobrowse should try auto connect with server in case of connection failure.
Returns:
{ void }
-
setAgentConnectionRetryInterval(connectionRetryInterval) → {void}
-
set the agent connection retry interval in milli seconds when disconnect from network
Parameters:
Name Type Argument Default Description connectionRetryInterval
number <optional>
10000 Interval in milli second when try reconnect with server in case of connection failure.
Returns:
{ void }
-
setAgentCSSPath(agentCSSPath) → {void}
-
set Agent CSS directory Path
Parameters:
Name Type Argument Default Description agentCSSPath
String <optional>
css set the agent css directory path end with "/" required for agent cobrowsing
Returns:
{ void }
-
setAgentImagePath(agentImagePath) → {void}
-
set Agent images directory Path
Parameters:
Name Type Argument Default Description agentImagePath
String <optional>
img set the agent image directory path end with "/" required for agent cobrowsing
Returns:
{ void }
-
setAnnotation(annotationShapeInfo) → {AvayaCoBrowseClientServices.Base.CobrowsePromise}
-
Set annotation shape to draw on the webpage during the cobrowse session
Parameters:
Name Type Description annotationShapeInfo
AvayaCoBrowseClientServices.Services.Cobrowse.Common.AnnotationShapeInfo Set annotation shape info
Returns:
{ AvayaCoBrowseClientServices.Base.CobrowsePromise }On success the promise will be resolved with {String}
On error the promise will be rejected with an AvayaCoBrowseClientServices.Base.CoBrowseError
-
setIFrame(iFrameId)
-
To set IFrame ID used for cobrowse page
Parameters:
Name Type Description iFrameId
String Iframe id where customer dom will be uploaded
Returns:
void
-
setMarkerColor(markerColor) → {void}
-
set the color to mark the selected text when enabled
Parameters:
Name Type Argument Default Description markerColor
string <optional>
yellow Set data marker color
Returns:
{ void }
-
setMouseAndScrollSyncInterval(mouseAndScrollSyncInterval) → {void}
-
set Sync interval for synchronizing mouse and scroll to the customer
Parameters:
Name Type Argument Default Description mouseAndScrollSyncInterval
number <optional>
1000 Interval in milli second to synchronize mouse and scroll to customer
Returns:
{ void }
-
setWorkRequestId(workRequestId) → {void}
-
sets workRequestId
Parameters:
Name Type Description workRequestId
String WorkRequestId to be passed for oceana interaction.
Returns:
{ void }
-
start() → {AvayaCoBrowseClientServices.Base.CobrowsePromise}
-
Initialize the Agent Cobrowse module
Returns:
-
startAnnotation() → {AvayaCoBrowseClientServices.Base.CobrowsePromise}
-
Enable Agent to start annotation on the webpage.
api will allow user to annotate on the webpage, however user is restricted to change webpage fields.Returns:
{ AvayaCoBrowseClientServices.Base.CobrowsePromise }On success the promise will be resolved with {String}
On error the promise will be rejected with an AvayaCoBrowseClientServices.Base.CoBrowseError.
-
stopAnnotation() → {AvayaCoBrowseClientServices.Base.CobrowsePromise}
-
Allow Agent to update the webpage fields
call to this api will stop user to annotate on the webpageReturns:
{ AvayaCoBrowseClientServices.Base.CobrowsePromise }On success the promise will be resolved with {String}
On error the promise will be rejected with an AvayaCoBrowseClientServices.Base.CoBrowseError
-
unHideAllAgentAnnotations() → {AvayaCoBrowseClientServices.Base.CobrowsePromise}
-
unHide agent's side annotations.
Returns:
{ AvayaCoBrowseClientServices.Base.CobrowsePromise }On success the promise will be resolved with {String}
On error the promise will be rejected with an AvayaCoBrowseClientServices.Base.CoBrowseError
-
unHideAllAgentMarkers() → {AvayaCoBrowseClientServices.Base.CobrowsePromise}
-
unHide agent side markers.
Returns:
{ AvayaCoBrowseClientServices.Base.CobrowsePromise }On success the promise will be resolved with {String}
On error the promise will be rejected with an AvayaCoBrowseClientServices.Base.CoBrowseError
-
unHideAllCustomerAnnotations() → {AvayaCoBrowseClientServices.Base.CobrowsePromise}
-
unHide customer side annotations.
Returns:
{ AvayaCoBrowseClientServices.Base.CobrowsePromise }On success the promise will be resolved with {String}
On error the promise will be rejected with an AvayaCoBrowseClientServices.Base.CoBrowseError
-
unHideAllCustomerMarkers() → {AvayaCoBrowseClientServices.Base.CobrowsePromise}
-
unHide customer side markers.
Returns:
{ AvayaCoBrowseClientServices.Base.CobrowsePromise }On success the promise will be resolved with {String}
On error the promise will be rejected with an AvayaCoBrowseClientServices.Base.CoBrowseError
-
updateIdleTime(idleTime) → {void}
-
update the idle time of agent
Parameters:
Name Type Description idleTime
number update the idle time of agent for reporting.
Returns:
{ void }
Callbacks
-
addOnAnnotationEnabledCallback(callback) → {void}
-
Add a new addOnAnnotationEnabledCallback for agent state is set to Paused.
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnAnnotationEnabledCallback Returns:
{ void }
-
addOnCoBrowseWindowResizeCallback(callback) → {void}
-
Add a new addOnCoBrowseWindowResizeCallback when agent cobrowse window resize
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnCoBrowseWindowResizeCallback Returns:
{ void }
-
addOnCoBrowseWindowScrollChangeCallback(callback) → {void}
-
Add a new addOnCoBrowseWindowScrollChangeCallback when agent cobrowse scroll position changes when customer is in control
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnCoBrowseWindowScrollChangeCallback Returns:
{ void }
-
addOnConnectionCallback(callback) → {void}
-
Add a new addOnConnectionCallback when SockJs connected is established with CoBrowse Server
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnConnectionCallback Returns:
{ void }
-
addOnConnectionFailureCallback(callback) → {void}
-
Add a new addOnConnectionFailureCallback when Connection is disconnedted with CoBrowse Server
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnConnectionFailureCallback Takes an Object as {isDisconnected:{boolean}}
Returns:
{ void }
-
addOnControlDenialCallback(callback) → {void}
-
Add a new addOnControlDenialCallback, when agent control is Denied from customer.
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnControlDenialCallback Returns:
{ void }
-
addOnControlGrantCallback(callback) → {void}
-
Add a new addOnControlGrantCallback, when agent control is granted from customer.
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnControlGrantCallback Returns:
{ void }
-
addOnControlRevokeCallback(callback) → {void}
-
Add a new addOnControlRevokeCallback when agent control is Revoked by Customer
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnControlRevokeCallback Returns:
{ void }
-
addOnCustomerDeadCallback(callback) → {void}
-
Add a new addOnCustomerDeadCallback when customer disconnected from cobrowse server, Optional to implement
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnCustomerDeadCallback Returns:
{ void }
-
addOnCustomerJoinCallback(callback) → {void}
-
Add a new addOnCustomerJoinCallback when Customer Joined in Agent initiated Session
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnCustomerJoinCallback Returns:
{ void }
-
addOnInActivityTimeOutOccurredCallback(callback) → {void}
-
Add a new addOnInActivityTimeOutOccurredCallback' when Inactivity timeout occurs in case Agent is idle
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnInActivityTimeOutOccurredCallback Takes an Object as {message:{String}}
Returns:
{ void }
-
addOnMouseMoveCallback(callback) → {void}
-
Add a new addOnMouseMoveCallback when customer is in control and moving mouse
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnMouseMoveCallback Returns:
{ void }
-
addOnPauseCallback(callback) → {void}
-
Add a new addOnPauseCallback for agent state is set to Paused.
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnPauseCallback Returns:
{ void }
-
addOnResumeCallback(callback) → {void}
-
Add a new addOnResumeCallback for agent state set to Resume.
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnResumeCallback Returns:
{ void }
-
addOnSessionCloseCallback(callback) → {void}
-
Add a new addOnSessionCloseCallback when cobrowse session is closed by Customer
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnSessionCloseCallback Returns:
{ void }
-
addOnStopInActivityTimeOutCallback(callback) → {void}
-
Add a new addOnStopInActivityTimeOutCallback when Inactivity timeout reset in case if Agent is active.
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnStopInActivityTimeOutCallback Returns:
{ void }
-
removeOnAnnotationEnabledCallback(callback) → {void}
-
Remove existing addOnAnnotationEnabledCallback.
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnAnnotationEnabledCallback Returns:
{ void }
-
removeOnCoBrowseWindowResizeCallback(callback) → {void}
-
Remove existing addOnCoBrowseWindowResizeCallback
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~removeOnCoBrowseWindowResizeCallback Returns:
{ void }
-
removeOnCoBrowseWindowScrollChangeCallback(callback) → {void}
-
Remove existing addOnCoBrowseWindowScrollChangeCallback
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~removeOnCoBrowseWindowResizeCallback Returns:
{ void }
-
removeOnConnectionCallback(callback) → {void}
-
Remove existing addOnConnectionCallback
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnConnectionCallback Returns:
{ void }
-
removeOnConnectionFailureCallback(callback) → {void}
-
Remove existing addOnConnectionFailureCallback
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnConnectionFailureCallback Returns:
{ void }
-
removeOnControlDenialCallback(callback) → {void}
-
Remove existing addOnControlDenialCallback
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnControlDenialCallback Returns:
{ void }
-
removeOnControlGrantCallback(callback) → {void}
-
Remove existing addOnControlGrantCallback
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnControlGrantCallback Returns:
{ void }
-
removeOnControlRevokeCallback(callback) → {void}
-
Remove existing addOnControlRevokeCallback
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnControlRevokeCallback Returns:
{ void }
-
removeOnCustomerDeadCallback(callback) → {void}
-
Remove existing addOnCustomerDeadCallback
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnCustomerDeadCallback Returns:
{ void }
-
removeOnCustomerJoinCallback(callback) → {void}
-
Remove existing addOnCustomerJoinCallback
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnCustomerJoinCallback Returns:
{ void }
-
removeOnInActivityTimeOutOccurredCallback(callback) → {void}
-
Remove existing addOnInActivityTimeOutOccurredCallback
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnInActivityTimeOutOccurredCallback Takes an Object as {message:{String}}
Returns:
{ void }
-
removeOnMouseMoveCallback(callback) → {void}
-
Remove existing addOnCustomerMouseMoveCallback
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~removeOnMouseMoveCallback Returns:
{ void }
-
removeOnPauseCallback(callback) → {void}
-
Remove existing addOnPauseCallback.
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnPauseCallback Returns:
{ void }
-
removeOnResumeCallback(callback) → {void}
-
Remove existing addOnResumeCallback
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnResumeCallback Returns:
{ void }
-
removeOnSessionCloseCallback(callback) → {void}
-
Remove existing addOnSessionCloseCallback
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnSessionCloseCallback Takes an object as {err:{String}, msg:{String}}
Returns:
{ void }
-
removeOnStopInActivityTimeOutCallback(callback) → {void}
-
Remove existing addOnStopInActivityTimeOutCallback
Parameters:
Name Type Description callback
AvayaCoBrowseClientServices.Services.Cobrowse.Agent~addOnStopInActivityTimeOutCallback Returns:
{ void }