Skip to content

Commit d6dee79

Browse files
authored
Merge pull request #615 from seiyako/master
2.4.1 release
2 parents 94d5f80 + b2a2a3d commit d6dee79

23 files changed

+14295
-12102
lines changed

.travis.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

Documentation.md

Lines changed: 70 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ In version 1.x, we also support `make` for legacy builds. This option was remove
1515
1. December 2022 - In addition to the CCP, customers can now embed the Step-by-step guides application using the connect.agentApp. See the [updated documentation](https://github.com/amazon-connect/amazon-connect-streams/blob/master/Documentation.md#initialization-for-ccp-customer-profiles-and-wisdom) for details on usage.
1616
* ### About Amazon Connect Step-by-step guides
1717
+ With Amazon Connect you can now create guides that walk agents through tailored views that focus on what must be seen or done by the agent at a given moment during an interaction. You can design workflows for various types of customer interactions and present agents with different step-by-step guides based on context, such as call queue, customer information, and interactive voice response (IVR). This feature is available in the Connect agent workspace as well as an embeddable application that can be embedded into another website via the Streams API. For more information, visit the AWS website: https://aws.amazon.com/connect/agent-workspace/
18+
1. December 2022 - 2.4.1
19+
* This version brings in updates that will provide enhanced monitoring experience to agents and supervisors, allowing to silently monitor multiparty calls, and if needed to barge in the call and take over control, mute agents, or drop them from the call. New APIs introduced with this feature are `isSilentMonitor`, `isBarge`, `isSilentMonitorEnabled`, `isBargeEnabled`, `isUnderSupervision`, `updateMonitorParticipantState`, `getMonitorCapabilities`, `getMonitorStatus`, `isForcedMute`.
1820
1. August 2022 - 2.3.0
1921
* This patch fixes an issue in Streams’ Voice ID APIs that may have led to incorrect values being set against the generatedSpeakerID field in the VoiceIdResult segment of Connect Contact Trace Records (CTRs). This occurred in some scenarios where you call either enrollSpeakerInVoiceId(), evaluateSpeakerWithVoiceId(), or updateVoiceIdSpeakerId() in your custom CCP integration code. If you are using Voice ID and consuming Voice ID CTRs, please upgrade to this version.
2022
1. Jan 2022 - 2.0.0
@@ -288,7 +290,58 @@ this:
288290
* If you are using task functionalities you must include [TaskJS](https://github.com/amazon-connect/amazon-connect-taskjs). TaskJS should be imported after Streams.
289291
* If you'd like access to the WebRTC session to further customize the softphone experience
290292
you can use [connect-rtc-js](https://github.com/aws/connect-rtc-js). Please refer to the connect-rtc-js readme for detailed instructions on integrating connect-rtc-js with Streams.
291-
* `initCCP` **should not be used to embed multiple CCPs** as this causes unpredictable behavior. In version 2.0 a check has been added to automatically prevent subsequent invocations of `initCCP` from embedding additional CCPs.
293+
* `initCCP` **should not be used to embed multiple CCPs in the same browser context** as this causes unpredictable behavior. In version 2.0 a check has been added to automatically prevent subsequent invocations of `initCCP` from embedding additional CCPs.
294+
* It is possible to embed multiple CCPs in the same page if they are associated with different Connect instances and are being embedded in different browser contexts, such that their Window objects are different (e.g. in different iframes). You won't be able to embed multiple CCPs under the same Window object or invoke `initCCP` multiple times in the same browser context.
295+
* Instead of loading Streams once for the whole page, you'll need to load Streams separately in each iframe, and invoke `initCCP` separately in each.
296+
* Once the iframes finish loading, you can then use the `contentWindow.connect` property on each iframe to access its Streams object and make API calls to the specific CCP embedded inside. As an example of embedding CCPs twice on the same page for two Connect instances, A and B:
297+
298+
```js
299+
var frameA = document.createElement('iframe');
300+
var frameB = document.createElement('iframe');
301+
var contentDocumentA = [
302+
"<!DOCTYPE html>",
303+
"<meta charset='UTF-8'>",
304+
"<html>",
305+
"<head>",
306+
"<script type='text/javascript' src='https://cdn.jsdelivr.net/npm/amazon-connect-streams/release/connect-streams-min.js'>",
307+
"</script>",
308+
"</head>",
309+
"<body onload='init()' style='width:400px;height:800px'>",
310+
"<div id=containerDiv style='width:100%;height:100%'></div>",
311+
"<script type='text/javascript'>",
312+
"function init() {",
313+
"connect.core.initCCP(containerDiv, <initCCP parameters for instance A>);",
314+
"}",
315+
"</script>",
316+
"</body>",
317+
"</html>"
318+
].join('');
319+
var contentDocumentB = ...; // same as above, but with initCCP parameters for instance B
320+
frameA.srcdoc = contentDocumentA;
321+
frameB.srcdoc = contentDocumentB;
322+
[frameA, frameB].forEach((frame) => {
323+
frame.allow = "microphone; autoplay; clipboard-write";
324+
frame.style = "width:400px;height:800px;margin:0;border:0;padding:0px;";
325+
frame.scrolling = "no";
326+
document.documentElement.append(frame); // You can append the frames wherever you need each CCP to appear.
327+
});
328+
329+
// Wait for iframes to load, then contentWindow.connect will be set to each frame's Streams object.
330+
// Until the iframes have finished loading Streams, contentWindow.connect will be undefined
331+
var connectA = frameA.contentWindow.connect;
332+
var connectB = frameB.contentWindow.connect;
333+
334+
connectA.contact(function(contact) { /* ... */ });
335+
```
336+
337+
### How can I determine that the agent is logged out or that their session has expired?
338+
* You can use `connect.core.onAuthFail()` to subscribe a callback function that will be called if the agent was unable to authenticate to Connect using the credentials set in their browser (if any), so you can present a button or popup for the agent to log back in or start a new session.
339+
```js
340+
connect.core.onAuthFail(function(){
341+
// agent logged out or session expired. needs login
342+
// show button for login or popup a login screen.
343+
});
344+
```
292345

293346
## `connect.core`
294347

@@ -852,7 +905,7 @@ Subscribe a method to be invoked when the contact is connecting. This event happ
852905
```js
853906
contact.onAccepted(function(contact) { /* ... */ });
854907
```
855-
Subscribe a method to be invoked whenever the contact is accepted. Please note that event doesn't fire for contacts that are auto-accepted.
908+
Subscribe a method to be invoked whenever the contact is accepted. Please note that event doesn't fire for contacts that are auto-accepted, or for agents using a deskphone.
856909
857910
### `contact.onMissed()`
858911
```js
@@ -1010,6 +1063,8 @@ var attributeMap = contact.getAttributes(); // e.g. { "foo": { "name": "foo", "v
10101063
```
10111064
Gets a map of the attributes associated with the contact. Each value in the map has the following shape: `{ name: string, value: string }`.
10121065
1066+
Please note that this api method will return null when the current user is monitoring the contact, rather than being an active participant in the contact.
1067+
10131068
### `contact.isSoftphoneCall()`
10141069
```js
10151070
if (contact.isSoftphoneCall()) { /* ... */ }
@@ -1261,7 +1316,7 @@ Determine if the contact is active. The connection is active it is incoming, con
12611316
```js
12621317
if (conn.isConnected()) { /* ... */ }
12631318
```
1264-
Determine if the connection is connected, meaning that the agent is live in a conversation through this connection.
1319+
Determine if the connection is connected, meaning that the agent is live in a conversation through this connection. Please note that `ConnectionStateType.SILENT_MONITOR` and `ConnectionStateType.BARGE` are considered connected as well.
12651320
12661321
Note that, in the case of Agent A transferring a contact to Agent B, the new (third party) agent connection will be marked as `connected` (`connection.isConnected` will return true) as soon as the contact is routed to Agent B's queue, not when Agent B actually is "live" and able to communicate in the conversation.
12671322

@@ -1502,6 +1557,16 @@ Lists the different types of connections.
15021557
* `ConnectionType.OUTBOUND`: An outbound connection, representing either an outbound call or additional connection added to the contact.
15031558
* `ConnectionType.MONITORING`: A special connection type representing a manager listen-in session.
15041559

1560+
### `MonitoringMode`
1561+
Lists the different monitoring modes representing a manager listen-in session.
1562+
1563+
* `MonitoringMode.SILENT_MONITOR`: An enhanced listen-in manager session
1564+
* `MonitoringMode.BARGE`: A special manager session mode with full control over contact actions
1565+
1566+
### `MonitoringErrorTypes`
1567+
Lists the different monitoring error states.
1568+
* `MonitoringErrorTypes.INVALID_TARGET_STATE`: Indicates that invalid target state has been passed
1569+
15051570
### `ContactStateType`
15061571
An enumeration listing the different high-level states that a contact can have.
15071572

@@ -1522,6 +1587,8 @@ An enumeration listing the different states that a connection can have.
15221587
* `ConnectionStateType.CONNECTED`: The connection is connected to the contact.
15231588
* `ConnectionStateType.HOLD`: The connection is connected but on hold.
15241589
* `ConnectionStateType.DISCONNECTED`: The connection is no longer connected to the contact.
1590+
* `ConnectionStateType.SILENT_MONITOR`: An enhanced listen-in manager session, this state is used instead of `ContactStateType.CONNECTED` for manager
1591+
* `ContactStateType.BARGE`: A special manager session mode with full control over contact actions, this state is used instead of `ContactStateType.CONNECTED` for manager
15251592

15261593
### `ContactType`
15271594
This enumeration lists all of the contact types supported by Connect Streams.
@@ -1870,7 +1937,6 @@ voiceConnection.evaluateSpeakerWithVoiceId()
18701937
});
18711938
```
18721939
1873-
18741940
### `voiceConnection.optOutVoiceIdSpeaker()`
18751941
Opts-out a customer from Voice ID. This API can work for the customer who hasn’t enrolled in Voice ID.
18761942

0 commit comments

Comments
 (0)