Embedded Agent Desktop API Specification

Bright Pattern Documentation

Generated: 8/09/2022 4:27 pm
Content is available under license unless otherwise noted.

Purpose

The Embedded Agent Desktop API Specification describes the methods and events of Bright Pattern's Embedded Agent Desktop API.

The Embedded Agent Desktop API is a browser-based JavaScript API that is incorporated in the Embedded Agent Desktop SDK. This API allows a webpage to communicate with the Bright Pattern Agent Desktop application embedded on that page in iframe.

With this API, you can:




Audience

This specification is intended for the IT personnel responsible for the data infrastructure of Bright Pattern Contact Center-based contact centers. Readers of this guide are expected to have expertise in web application development as well as a solid understanding of contact center operations and resources that are involved in such operations.



General Information

The Embedded Agent Desktop API is used for requesting for information about agent states and interactions, as well as controlling agent and supervisor login, status, call flow, call recordings, transfers, and outbound dialing.

This API is incorporated in the Bright Pattern Embedded Agent Desktop SDK. For use cases and examples of how to use this API, see the Embedded Agent Desktop SDK Specification.

Supported Methods

The Embedded Agent Desktop API supports the following types of methods: agent state, dialing and transfer, completing and terminating an interaction, and call recordings control.

Agent State methods are used to request an agent's state and interaction information, as well as to change an agent's state.

Dialing and Transfer methods are used for dialing phone numbers and transferring calls.

Completing and Terminating an Interaction methods are used for completing and terminating interactions.

Call Recordings Control methods are used for controlling call recordings and getting the status of call recordings.

Supported Events

The Embedded Agent Desktop API supports the following types of events: agent login, agent status, and call flow.

Agent Login events are used for showing whether an agent is logged in or out of Agent Desktop.

Agent Status events are used for retrieving an agent's state and reason.

Call Flow events are used for getting information about active interactions and completed interactions.

Syntax

The syntax for all the methods and events in this specification includes the object window.bpspat.api. This object is created when the script file is included in an external webpage as shown:

<script type="text/javascript" src="https://<tenantUrl>/agentdesktop/app/lib/servicepattern-sdk-v1.js"></script>


Note that in the script source, you replace <tenantUrl> with your actual web server. For example:

<script type="text/javascript" src="https://example.brightpattern.com/agentdesktop/app/lib/servicepattern-sdk-v1.js"></script>




Overview

The Embedded Agent Desktop SDK supports the following types of methods.

Agent State methods are used to request an agent's state and interaction information, as well as to change an agent's state. You can use either getState or setStatus requests.

Dialing and Transfer methods are used for dialing phone numbers and transferring calls. There are four types of requests: dialNumber, selectService, singleStepTransfer, and singleStepConference.

Completing and Terminating an Interaction methods are used for completing and terminating interactions. There are four types of requests: setDisposition, terminateInteraction, completeInteraction, and completeInteractionWithDisp.

Call Recordings Control methods are used for controlling call recordings and getting the status of call recordings. The types of requests you can make include muteCallRecordings, unmuteCallRecordings, getCallRecordingStatus(callback), startCallRecording(callback), stopCallRecording(callback), muteCallRecording(callback), and unmuteCallRecording(callback).

For more information, see General Information.



Overview

The Embedded Agent Desktop SDK supports the following types of events.

Agent Login events, such as onAgentLogin(callback), are used for showing whether an agent is logged in or out of Agent Desktop.

Agent Status events, such as onStatusChange(callback), are used for retrieving an agent's state and reason.

Call Flow events, such as addInteractionRenderedHandler(callback) and addInteractionCompletedHandler(callback), are used for getting information about active interactions and completed interactions.

For more information about how these events are used, see the Embedded Agent Desktop SDK Specification.