Skip to content

Commit

Permalink
improve local-testing README (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
Spencer Lepine authored Sep 18, 2023
1 parent 458565a commit 409ad6d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
6 changes: 5 additions & 1 deletion local-testing/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
## Example Test Page
## Local Development Test Page

This folder has an example html page that you can use to test your code. You will need the amazon-connect-chat-interface.js compiled code from this project and the example solution to start chat using API Gateway and Lambda backend components as defined in [this GitHub repo](https://github.com/amazon-connect/amazon-connect-chat-ui-examples/tree/master/cloudformationTemplates/startChatContactAPI).

**NOTE:** This approach requires a proxy to invoke the Amazon Connect Public [StartChatContact](https://docs.aws.amazon.com/connect/latest/APIReference/API_StartChatContact.html) API. Refer to the [startChatContactAPI CloudFormation Template](https://github.com/amazon-connect/amazon-connect-chat-ui-examples/tree/master/cloudformationTemplates/startChatContactAPI) to deploy an API Gateway proxy solution.

![CFN Architecture](./StartChatContactCFNTemplateArchitecture.png)

## Steps
1. Follow the steps in [this repo](https://github.com/amazon-connect/amazon-connect-chat-ui-examples/tree/master/cloudformationTemplates/startChatContactAPI) to deploy the backend pieces to start a chat.
2. Follow the steps in the main [README](../README.md) of this GitHub repo to compile the code and generate the `amazon-connect-chat-interface.js` file.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions local-testing/backendEndpoints.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: MIT-0

/**
* UPDATE ME - add endpoints after deploying the CFN template
*
* CloudFormation Template: https://github.com/amazon-connect/amazon-connect-chat-ui-examples/tree/master/cloudformationTemplates/startChatContactAPI
*
* Prerequisites:
* - Amazon Connect Instance: https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-instances.html
* - InstanceId: https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html
* - ContactFlowId: https://docs.aws.amazon.com/connect/latest/adminguide/find-contact-flow-id.html
*/

var contactFlowId = "12345678-1234-1234-1234-123456789012"; // TODO: Fill in
var instanceId = "12345678-1234-1234-1234-123456789012"; // TODO: Fill in
var apiGatewayEndpoint = "https://<api-id>.execute-api.<region>.amazonaws.com/<stage>/"; // TODO: Fill in with the API Gateway endpoint created by your CloudFormation template
Expand Down

0 comments on commit 409ad6d

Please sign in to comment.