Skip to content

Latest commit

 

History

History

03_AmazonConnectIntegration

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Module 3: Integrate Amazon Lex with Amazon Connect

In this module you will integrate your Amazon Lex bot with Amazon Connect, a service that allows you to create software-defined call centers in minutes.

Upon completion, you will be able to interact with your bot using a telephone (yes, think PSTN). To achieve this you will create a contact center, configure a simple call flow, and assign a phone number to the flow.

Implementation Instructions

Each of the following sections provide an implementation overview and detailed, step-by-step instructions. The overview should provide enough context for you to complete the implementation if you're already familiar with the AWS Management Console or if you want to explore the services yourself without following a walkthrough.

Create a new Amazon Connect instance

Go to the Amazon Connect Console to create a new virtual contact center instance in the us-east-1 (Virgina) region.

Step-by-step instructions (expand for details)

  1. From the AWS Management Console, choose Services then select Amazon Connect under Contact Center and then Get started

  2. In Step 1: Identity management, select Store users within Amazon Connect and provide a domain name (e.g. {FirstName} to complete the Access URL and click Next step

    The domain name used in your contact center URL needs to be globally unique and cannot be changed. Alternatively, Amazon Connect can use an existing AWS Directory Services directory.

  3. In Step 2: Administrator, Skip this and continue with Next step

  4. In Step 3: Telephony options, select I want to handle incoming calls with Amazon Connect and I want to make outbound calls with Amazon Connect

  5. In Step 4: Data storage, accept the defaults

  6. In Step 5: Review and create, review your settings and then select Create Instance

Claim a phone number for your Amazon Connect instance

Once your Amazon Connect instance has been created, click Get started to select a phone number.

Step-by-step instructions (expand for details)

  1. Select Get started to open the Amazon Connect Contact Center Manager (CCM) welcome screen

  2. Select Let's go to claim a phone number

  3. Select United States +1, Direct Dial, and choose a phone number from the numbers provided

  4. Dial the phone number you selected in step 3 from another phone (e.g. your mobile phone) and choose 1 from the voice menu to connect with an agent; you can then use the Amazon Connect Contact Control Panel to accept the call

    It may take a few minutes before the claimed phone number is active.

  5. Choose Continue to get to the Amazon Connect Contact Center Manager App (CCM); poke around a bit to see what's available

    If you accepted a call, it should show up under the Contact search option.

Configure contact flow

With a Connect instance and a phone number, you can now create the Contact Flow that allows callers to interact with our bot in Module 1.

Step-by-step instructions (expand for details)

  1. In the Amazon Connect Console, select your instance, then choose Contact Flows to allow Amazon Connect to interact with the InternationalPlan bot

    Allow Connect to interact with the bot
  2. In the Amazon Connect Contact Center Manager, use the navigation pane on the left hand side to select Routing and then Contact flows

    ContactFlowNavigation

    If you closed your browser window you can always re-open the Amazon Connect Contact Center Manager from the Amazon Connect console. Just selct your Amazon connect instance and click on the Login as administrator button in the Overview section of the console.

  3. In the top right corner select Create contact flow to open the contact flow editor

  4. Name your contact flow CustomerServiceChatbot

  5. Expand the Interact group of blocks and drag and drop the Get customer input block onto the grid

  6. Expand the Terminate / Transfer group of blocks and drag and drop the Disconnect / Hang up block onto the grid

  7. Wire up the three building blocks as shown in the image below

    ContactFlowWiring

  8. Double click on the Get customer input block to access its configuration

    1. Select the Text to speech (Ad hoc) input type and use this welcome message: Welcome to the marvelous telco company. How can I help you today?

    2. Select Amazon Lex input type

    3. Enter InternationalPlan bot name and dev alias

    4. Click Save

      Get customer input configuration
  9. Click on the down arrow (DownArrow) next to the Save button at the top right and select Save & Publish

  10. Wait for the contact flow to be published successfully

Associate Contact Flow with phone number

Now you need to associate your new contact flow with your phone number

Step-by-step instructions (expand for details)

  1. Select Routing and Phone Numbers on the left hand Amazon Connect navigation pane

  2. Click on the number to edit the contact flow

  3. Search and select the CustomerServiceChatbot contact flow in the Contact flow/IVR field

  4. Select Save to confirm the contact flow association

Test your Amazon Lex enabled Amazon Connect contact flow

Dial your Amazon Connect contact center phone number to confirm functionality of contact flow and Amazon Lex integration. Tell the virtual service agent "I'm going to China."; use 1234 when asked for your pin code.

Make phone number available to the bot

In this last step we are enhancing the customer input configuration of the contact flow to make the caller's phone number available to the bot.

ContactFlowNavigation

Step-by-step instructions (expand for details)

  1. Re-open the CCM app; within the Amazon Connect console select Overview and Login as administrator

  2. On the left hand navigation select Routing - Contact flows

    ContactFlowNavigation

  3. Click the CustomerServiceChatbot flow to open the flow

  4. Click the Get customer input block to access its configuration

  5. Scroll to the bottom and under Session attributes click Add an attribute

  6. Select Use attribute

  7. In the Type drop-down, select System, enter IncomingNumber in the Destination Key field and select Customer Number from the Attribute drop down

  8. Click Add another attribute

  9. Enter Source as Destination Key and AmazonConnect as Value

  10. Select Save

  11. Click on the down arrow (DownArrow) next to the save button and select Save & Publish

  12. Confirm publishing of the workflow in selecting the Save & publish button ContactFlowNavigation

Test your bot with Amazon Connect

Call your Amazon Connect phone number to interact with your bot over the phone. Ask the virtual service agent "What international plans do you have?". When asked for your pin code enter the last four digits of the phone number you are calling from.