GithubHelp home page GithubHelp logo

schapman000 / aws-amplify-connect Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws-samples/aws-amplify-connect

0.0 1.0 0.0 3 MB

AWS Amplify Agent/Management portal and Amazon Connect dialer

License: MIT No Attribution

Shell 8.27% JavaScript 75.14% Python 12.17% CSS 1.52% HTML 2.91%

aws-amplify-connect's Introduction

Introduction

Background

This Project is intended to demostrate an outbound dialer and supporting web portal that can be used to check on vulnerable customer/residents in the community via a phone call, this requirement was concieved as a potential use-case for patients recently discharged from hospital or vulnerable members of the community who are shielding themselves during the Coronavirus pandemic.

A phone call was chosen as the mechanism to contact these residents as the most common option available to them. Amazon Connect provides the Outbound dialing facility along with call centre agent features, AWS Lambda is used to provide the logic and Amazon DynamoDB as the data store. Amazon S3 is also used to temporarily store new customer/resident information before it is processed into DynamoDB.

The Agent and Uploader website where Agents can answer calls, see additional information about callers and Uploaders can add new residents, is built using AWS Amplify to allow rapid development. Amazon Cognito is used for Agent/Uploader authentication in the web portal. Amazon API Gateway act as the gateway to Lambda and DynamoDB to GET and POST data.

Overview

Upload

Residents who have recently been discharged from hospital or have informed their local councils that they are self-isolating/shielding can be added to a CSV file that is then uploaded to the Agent Portal; to have permission to add new CSV data, the website user/agent must be a member of the Uploaders Cognito group.

Upon uploading the CSV, the site places the file in an S3 bucket and an S3 event is created which triggers a Lambda function; the Lambda function reads the CSV and adds new customers/residents to the DynamoDB (existing customer/residents are not overwritten).

Dialer

  1. An EventBridge rule runs every 60 seconds and trigger the ConnectDialer Lambda
  2. The ConnectDialer Lambda checks the Amazon Connect instance to see if there are agents online and ready to take calls (in our scenario it is not desirable to call residents unless there is an agent available for a call back), if no agents are available the Lambda exits. If agent(s) are available, the Lambda Function retrieves a list of customers/residents that are:
  • Enabled
  • Not successfully contacted for 24 hours
  • A contact attempt has not been made in the last 5 mins
  • No more than 3 contact attemps have been made in the last 24 hours
  1. The ConnectDialer instructs the Connect instance to start an outbound call to each resident in the list and then increments the contactAttempts and lastAttempt times in DynamoDB for that customer/resident.
  2. Connect initiates the outbound call and routes the resident into the Call Flow which asks "How are you felling? Press 1 for Happy or 2 if you would like to talk to someone"
  3. If the customer/resident is Happy, Connect invokes the ConnectDialerSuccessUpdate lambda and disconnect the call. If the customer/resident requests a call back, Connect invokes the ConnectDialerSuccessUpdate lambda and adds the customer/resident the call back queue and disconnects the call.
  4. The ConnectDialerSuccessUpdate lambda updates that DynamoDB entry for the customer/resident with a successfulConnection (a customer answered and responded to the question) and notes the answer to the question (Happy/Sad).
  5. When an agent becomes available, Connect will pop the next customer/resident from the queue and route the call to the available Agent (who is logged in via the web site) and the customer/resident details will be displayed along side the call.
  6. If the agent accepts the call Connect then makes the outbound call to the customer/resident, connecting the Agent and Customer/Resident.

Agent Portal

alt text

Architecture

Dialer

alt text

Website

alt text

Deploy

You can find instructions on how to deploy this project here

License

This library is licensed under the MIT-0 License. See the LICENSE file.

aws-amplify-connect's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.