Using the SharingServices Package, the Agent can start or stop annotation during active Avaya Co-Browsing session.
To start annotation feature, you must complete the following activities.
To start annotation using a shape, color and stroke size, you must complete the following activity.
To stop annotation feature, you must complete the following activities.
To clear all agent annotations on the Co-Browse enabled webpage
To Hide all customer annotations on the Co-Browse enabled webpage
To UnHide all customer annotations on the Co-Browse enabled webpage
To Hide all agent annotations on the Co-Browse enabled webpage
To UnHide all agent annotations on the Co-Browse enabled webpage
You must register onSuccess and onFailure callbacks. The onSuccess callback is called to report that customer can Annotate on the active Co-Browse enabled webpage. While annotating on the webpage Agent is not allowed to update values for the webpage elements. The onFailure callback is called to report a failure that agent cannot Annotate on the active Co-Browse enabled webpage.
var onSuccess = function () {
// Called to report success for start Annotation
// Add custom GUI code for the agent to use the Annotation feature
//e.g. Display a toolbar which allows agent to select color, shape or stroke size for annotation on webpage
};
var onFailure = function (error) {
// Called to report failure in
// Start Annotation feature
// Add code here to notify agent
};
Call startAnnotation() method to allow agent to annotate on the Co-Browse enabled webpage.
_cbinstance.startAnnotation().then(onSuccess.bind(this), onFailure);;
You must register onSuccess and onFailure callbacks. The onSuccess callback is called to report that agent can Annotate on the active Co-Browse enabled webpage using the specified annoation shape information obtained from the AnnotationShapeInfo object. The onFailure callback is called to report a failure that agent cannot stop annotation.
var onSuccess = function () {
// Called to report success for setting the Annotation object
};
var onFailure = function (error) {
// Called to report failure for setting the Annotation object
};
Call setAnnotation(AnnotationShapeInfo) method to specify the annotation shape type used for annotating on Co-Browse enabled webpage. The supported annotation shape types and the respective variables are as follows:
The default annotation shape type is FreeHand
//Create AnnotationInfo object with default values as
//strokeColor=red, strokeSize=5, annotationShapeType=AvayaCoBrowseClientServices.Services.Cobrowse.Common.AnnotationShapeType.ANNOTATIONSHAPETYPEFREEHAND
var annotationInfo = new AvayaCoBrowseClientServices.Services.Cobrowse.Common.AnnotationShapeInfo();
//Create AnnotationInfo object with user specified values
//Agent annotates on webpage using Rectangle Shape with strokeColor and strokeSize as 'blue' and '11'
var annotationInfo= new AvayaCoBrowseClientServices.Services.Cobrowse.Common.AnnotationShapeInfo('blue','11',AvayaCoBrowseClientServices.Services.Cobrowse.Common.AnnotationShapeType.ANNOTATIONSHAPETYPERECTANGLE);
//Call to setAnnotation method
_cbinstance.setAnnotation(annotationInfo).then(onSuccess.bind(this), onFailure);
You must register onSuccess and onFailure callbacks. The onSuccess callback is called to report that agent can no longer annotate on the webpage. The onFailure callback is called to report a failure in stopping annotaion.
var onSuccess = function () {
//Called to report success for stop Annotation.
//Now agent can update the webpage elements
//agent is not allowed to annotate on the webpage until an api call is made to start the annotation
};
var onFailure = function (error) {
// Called to report failure in
// Stopping Annotation
// Add code here to notify agent
};
Call stopAnnotation() method to disable the annotation mode.
_cbinstance.stopAnnotation().then(onSuccess.bind(this), onFailure);
Call clearAllAgentAnnotations() method to remove all the agent annotations on the Co-Browse enabled webpage.
_cbinstance.clearAllAgentAnnotations();
Note - Single click on a specific annotation removes it from the webpage.
Call hideAllCustomerAnnotations() method to hide all customer annotations on the agent webpage.
_cbinstance.hideAllCustomerAnnotations().then(onSuccess.bind(this), onFailure);
Call unHideAllCustomerAnnotations() method to unHide customer annotations on the agent webpage.
_cbinstance.unHideAllCustomerAnnotations().then(onSuccess.bind(this), onFailure);
Call hideAllAgentAnnotations() method to hide all agent annotations on the Co-Browse enabled webpage.
_cbinstance.hideAllAgentAnnotations().then(onSuccess.bind(this), onFailure);
Call unHideAllAgentAnnotations() method to unHide agent annotations on the Co-Browse enabled webpage.
_cbinstance.unHideAllAgentAnnotations().then(onSuccess.bind(this), onFailure);