|     |     | 
| (3 intermediate revisions by one other user not shown) | 
| Line 1: | Line 1: | 
| − | <translate>
 | + |   | 
|  | = Purpose = |  | = 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 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 allows a webpage to communicate with the Bright Pattern Agent Desktop application embedded on that page in iframe. | + | The Embedded Agent Desktop API is a browser-based JavaScript API that is incorporated in the [[Embedded-agent-desktop-sdk-specification/Purpose |  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: |  | With this API, you can: | 
| Line 14: | Line 14: | 
|  | * Control call recordings |  | * Control call recordings | 
|  | * Request information about agent login, status, and call flow |  | * Request information about agent login, status, and call flow | 
| − | 
 |  | 
| − | == 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.
 |  | 
| − | * [[Embedded-agent-desktop-api-specification/Methods/getState | getState]]
 |  | 
| − | * [[Embedded-agent-desktop-api-specification/Methods/setStatus | setStatus]]
 |  | 
| − | 
 |  | 
| − | '''Dialing and Transfer''' methods are used for dialing phone numbers and transferring calls.
 |  | 
| − | * [[Embedded-agent-desktop-api-specification/Methods/dialNumber | dialNumber]]
 |  | 
| − | * [[Embedded-agent-desktop-api-specification/Methods/selectService | selectService]]
 |  | 
| − | * [[Embedded-agent-desktop-api-specification/Methods/singleStepTransfer | singleStepTransfer]]
 |  | 
| − | * [[Embedded-agent-desktop-api-specification/Methods/singleStepConference | singleStepConference]]
 |  | 
| − | 
 |  | 
| − | '''Completing and Terminating an Interaction''' methods are used for completing and terminating interactions.
 |  | 
| − | * [[Embedded-agent-desktop-api-specification/Methods/setDisposition |  setDisposition]]
 |  | 
| − | * [[Embedded-agent-desktop-api-specification/Methods/terminateInteraction |  terminateInteraction]]
 |  | 
| − | * [[Embedded-agent-desktop-api-specification/Methods/completeInteraction |  completeInteraction]]
 |  | 
| − | * [[Embedded-agent-desktop-api-specification/Methods/completeInteractionWithDisp |  completeInteractionWithDisp]]
 |  | 
| − | 
 |  | 
| − | '''Call Recordings Control''' methods are used for controlling call recordings and getting the status of call recordings. 
 |  | 
| − | * [[Embedded-agent-desktop-api-specification/Methods/muteCallRecordings |  muteCallRecordings()]]
 |  | 
| − | * [[Embedded-agent-desktop-api-specification/Methods/unmuteCallRecordings |  unmuteCallRecordings()]]
 |  | 
| − | * [[Embedded-agent-desktop-api-specification/Methods/getCallRecordingStatusCallback |  getCallRecordingStatus(callback)]]
 |  | 
| − | * [[Embedded-agent-desktop-api-specification/Methods/startCallRecordingCallback |  startCallRecording(callback)]]
 |  | 
| − | * [[Embedded-agent-desktop-api-specification/Methods/stopCallRecordingCallback |  stopCallRecording(callback)]]
 |  | 
| − | * [[Embedded-agent-desktop-api-specification/Methods/muteCallRecordingCallback |  muteCallRecording(callback)]]
 |  | 
| − | * [[Embedded-agent-desktop-api-specification/Methods/unmuteCallRecordingCallback |  unmuteCallRecording(callback)]]
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | == 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.
 |  | 
| − | * [[Embedded-agent-desktop-api-specification/Events/onAgentLoginCallback| onAgentLogin(callback)]]
 |  | 
| − | 
 |  | 
| − | '''Agent Status''' events are used for retrieving an agent's state and reason.
 |  | 
| − | * [[Embedded-agent-desktop-api-specification/Events/onStatusChangeCallback| onStatusChange(callback)]]
 |  | 
| − | 
 |  | 
| − | '''Call Flow''' events are used for getting information about active interactions and completed interactions.
 |  | 
| − | * [[Embedded-agent-desktop-api-specification/Events/AddInteractionRenderedHandlerCallback |  addInteractionRenderedHandler(callback)]]
 |  | 
| − | * [[Embedded-agent-desktop-api-specification/Events/AddInteractionCompletedHandlerCallback |  addInteractionCompletedHandler(callback)]]
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | == 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>
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | 
 |  | 
| − | </translate>
 |  |