^
^

< Back to Package Overview

Team API

Overview

Retrieve an instance of the Team API from the Client Session object using:

var team = clientSession.createTeam();  

The Team object

Methods

Retrieve Members

Retrieve an array of all TeamMembers using:

var members = team.getMembers();

Retrieve Agents

Retrieve an array of Agent TeamMembers using:

var members = team.getAgent();

Retrieve Supervisors

Retrieve an array of Supervisor TeamMembers using:

var members = team.getSupervisors();

Listening for Events

team.addOnTeamMembersAddedCallback(callback);
team.addOnTeamMembersRemovedCallback(callback);

The TeamMember object

The TeamMember object is a representation of the individual member of someone on the logged in Agent's Team, be it an Agent or a Supervisor

Methods

Get State

To retrieve the state of the TeamMember, the following syntax is used

var state = member.getState();

Get Interactions

To retrieve an Array of Interaction, the following syntax is used

var interactions = member.getInteractions();

Listening for State change Events

If you wish to be notified when a specific event has happened, you can listen for granular events.

teamMember.addOnStateChangedCallback(callback);
Feedback

Your feedback has been successfully submitted.

There was a problem submitting your feedback. Please contact your product support representative.

Page Feedback