Deploy a basic cloud-based call center using Amazon Connect, hook it up with our PersonalBanker Lex bot, and route calls either to the bot or a live agent. Sprinkle in a few enhancements like DTMF options (press 1 / press 2) and personalized greetings.
I launched Amazon Connect in North Virginia (same region as Lex).
Key setup points:
- Skipped admin creation (used default)
- Disabled outbound calling
- Took the default S3 bucket settings
- Created the instance and claimed a UK Direct Dial Number (for this lab)
- Noted down the number for testing later
Instead of editing the huge sample flow, I imported a lightweight version:
- Downloaded
Simple Workflowfile from the repo - Opened Routing → Contact Flows
- Clicked Create contact flow, then used the Import Flow option
- Loaded the
Simple Workflowfile - This flow: greets the caller → plays a prompt → transfers them to a queue
I published it with Save & Publish, then:
- Went to Routing → Phone Numbers
- Edited my claimed number to link it to this new
Simple Workflow
Now when I called in, it said the welcome message and sent me to a queue. Neat, but we’re just getting started.
Now came the fun part—injecting my PersonalBanker Lex bot from Lab 1 into this call flow.
Steps:
- Back in Amazon Connect Admin, I added the Lex bot under Contact Flows → Amazon Lex → + Add Lex Bot
- Then I edited the
Simple Workflowflow:- From the left panel, dragged Get Customer Input into the flow (from the Interact category)
- Added a prompt:
How can we help you today? - Selected Amazon Lex, picked
PersonalBanker - Added intent:
GetBalanceCheck
- Unlinked the Play Prompt → Queue connection
- Linked Play Prompt → Get Customer Input → then its Default branch → Transfer to Queue
(Other branches like "Error" or "No Input" went to Disconnect)
Saved and Published again.
Tested it: when I called the number, I got prompted by Lex. Said “check my bank balance” → got routed into the bot → entered my account type and PIN → got back a mock balance. Mission accomplished.
I realized there was no way to speak to an agent from the bot, so I:
- Created a new intent in Lex:
Advisor- Sample utterances:
advisor talk talk to someone press one
- Sample utterances:
- Added utterance
press twotoGetBalanceCheckas well (for symmetry)
Built the bot again in Lex.
Then back in the Get Customer Input box in Connect, I added both intents:
GetBalanceCheckAdvisor
Wired the Advisor branch to Transfer to Queue, so it now allowed users to say:
- “talk to someone”
- or literally press 1 on the phone pad
This added both voice and keypad navigation options. Tested again—pressing 1 got me to an agent; pressing 2 triggered the balance check flow. Felt legit!
I took it one step further—made Connect greet callers by name using their phone number.
Steps:
-
Created a new Lambda:
myPersonalResponder -
Pasted in the code from
myPersonalResponder_v1.js- It checks the incoming number and returns a name if matched
-
In Contact Flow editor:
- From the left panel, dragged in Invoke AWS Lambda Function
- Wired it right after the “Entry point” of the flow
-
Used the returned value to set a Contact Attribute like
CustomerName -
In the Play Prompt, used dynamic speech like:
Hi {CustomerName}, thanks for calling!
Now the system greeted known callers by name. Otherwise, it defaulted to a generic message.
- Connected Lex bots into real call flows
- Gave users voice + keypad options for interaction
- Handled branching logic with intent mapping
- Personalized flows using Lambda + caller number detection