Skip to content

Commit d951f27

Browse files
authored
Merge pull request #949 from vs-amzn/master
Update documentation with email integration steps
2 parents 0373a6c + 3949c03 commit d951f27

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

Documentation.md

+35
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,15 @@ Note: these tests run on the release files generated above
141141
## Using the AWS SDK and Streams
142142
Streams has a "baked-in" version of the AWS-SDK in the `./src/aws-client.js` file. Make sure that you import Streams before the AWS SDK so that the `AWS` object bound to the `Window` is the object from your manually included SDK, and not from Streams.
143143

144+
## Handling Email Contacts
145+
146+
To fully implement your custom email experience, you'll **need** to integrate with the [AmazonConnectSDK](https://github.com/amazon-connect/AmazonConnectSDK). It is a 2 step process:
147+
148+
1. Get the client configuration from Streams
149+
1. Use the configuration to integrate with the [`EmailClient`](https://github.com/amazon-connect/AmazonConnectSDK/blob/main/email/src/email-client.ts) and [`FileClient`](https://github.com/amazon-connect/AmazonConnectSDK/blob/main/file/src/file-client.ts) from the AmazonConnectSDK. You may also optionally integrate with the [`MessageTemplateClient`](https://github.com/amazon-connect/AmazonConnectSDK/blob/main/message-template/src/message-template-client.ts) and [`QuickResponsesClient`](https://github.com/amazon-connect/AmazonConnectSDK/blob/main/quick-responses/src/quick-responses-client.ts) to enhance your custom experience.
150+
151+
A basic example of how to set this up can be found in the Documentation under `connect.core.getSDKClientConfig()`
152+
144153
## Initialization
145154
Initializing the Streams API is the first step to verify that you have
146155
everything set up correctly and that you are able to listen for events.
@@ -486,6 +495,32 @@ Returns a promise that is resolved with the list of media devices from iframe.
486495
Timeout for the request can be passed as an optional argument. The default timeout is 1000ms.
487496
The API should be called after the iframe CCP initialization is complete.
488497

498+
### `connect.core.getSDKClientConfig()`
499+
500+
```js
501+
import { EmailClient } from "@amazon-connect/email";
502+
import { FileClient } from "@amazon-connect/file";
503+
504+
/* ... */
505+
506+
connect.agent(() => {
507+
/* ... */
508+
509+
// Get the client config needed to instantiate clients from the AmazonConnectSDK
510+
const connectClientConfig = connect.core.getSDKClientConfig();
511+
512+
513+
// You can now instantiate the clients that you need. Be sure to import them from their respective packages!
514+
const emailClient = new EmailClient(connectClientConfig);
515+
const fileClient = new FileClient(connectClientConfig);
516+
517+
});
518+
```
519+
520+
Returns the [`ConnectClientConfig`](https://github.com/amazon-connect/AmazonConnectSDK/blob/main/core/src/client/connect-client-config.ts#L4) needed to instantiate clients from the [AmazonConnectSDK](https://github.com/amazon-connect/AmazonConnectSDK).
521+
522+
**IMPORTANT:** This should be invoked after the agent is initialized.
523+
489524
## SAML Authentication
490525
Streams support Security Assertion Markup Language (SAML) 2.0 to enable single sign-on (SSO) which will allow users to sign in through a SAML 2.0 compatible identity provider (IdP) and gain access to the instance without having to provide separate credentials.
491526
### Using SAML with Streams

0 commit comments

Comments
 (0)