Create a BankingBot with English and Spanish support in the Amazon Lex V2 console

TUTORIAL

Module 4: Test the bot

You will test both your English (US) and Spanish (US) BankingBot versions.  Follow the steps to walk through an example financial transaction to test the following functionality

What you will accomplish

In this module, you test both your English (US) and Spanish (US) BankingBot versions.  Follow the steps to walk through an example financial transaction to test the following functionality:

  • Welcome: respond to your greeting
  • CheckBalance: respond to a balance inquiry and prompt for date of birth for verification
  • FollowupBalance: respond to another balance inquiry without prompting for verification again
  • TransferBalance: assist with transferring balance between accounts
  • FallbackIntent: provide standard response to an unknown action
     

 Time to complete

15 minutes

 Requires

Completion of Module 1, Module 2 and Module 3

Implementation

Step 1: Test English (US)

In the Amazon Lex V2 console, navigate to BankingBot > Bot versions > Draft version > All languages > English (US) and choose Test.  Before testing, make sure the Build Status shows Successfully Built.  If not, click Build and wait for the success message before testing.

In the Test window, type hi.  BankingBot responds with a friendly greeting that we configured through the Welcome intent.

Type I want to check my balance.

BankingBot responds by asking to confirm your date of birth.  You can enter any value for testing. You are then prompted for the account type, enter savings.   This corresponds to one of the values that we configured in the accountType slot.

The balance is then returned by the Lambda function that we configured for fulfillment.  

Next, test the FollowupBalance intent. Type What about checking?

BankingBot responds with the balance on your checking account without prompting for your date of birth again.  This is because we created the context in the CheckBalance intent that passes the information into the FollowupBalance intent.

Next, test the TransferFunds intent. Type now I would like to transfer funds.

BankingBot responds requesting the amount you want to transfer.  

Type an amount, such as 50.

Then, when prompted, specify the source account for the transfer, such as checking.

For the destination account, type a different account type, such as savings.

Finally, type yes to confirm the transfer.
 

BankingBot responds with a closing response confirming the transfer amount and destination account.

Finally, test the FallbackIntent by typing an utterance that BankingBot does not understand. For this example, type I want to order flowers.

BankingBot responds with the message you created in the Closing response of your FallbackIntent.

Step 2: Test Spanish (US)

In the Amazon Lex V2 console, navigate to BankingBot > Bot versions > Draft version > All languages > Spanish (US) and choose Test.  Before testing, make sure the Build Status shows Successfully Built.  If not, click Build and wait for the Success message before testing.
 

In the Test window, type hola to greet your bot.
BankingBot responds with a friendly greeting, configured through the Welcome intent.

Type quisiera chequear mi balance.

BankingBot responds by asking which balance to check. This configuration is the account type slot of your CheckBalance intent.

Type ahorros.
BankingBot responds by requesting your date of birth for verification. This configuration is the date of birth slot of your CheckBalance intent.
Type a date.
BankingBot responds with the balance on your savings account. This shows that the CheckBalance intent is successfully fulfilled by the Lambda function code hook you created.

Next, test the TransferFunds intent. Type Ahora quisiera hacer una transferencia.
BankingBot responds requesting the amount you want to transfer.

Type an amount, such as 50. Then, when BankingBot prompts you, specify the source account for the transfer, such as cheques.
BankingBot responds requesting the destination account for the transfer.

Type a different account type, such as ahorros.
BankingBot responds requesting that you confirm the transfer.

Type si to confirm the transfer.
BankingBot responds with a closing response by confirming the transfer amount and destination account. This shows that your TransferBalance intent is configured correctly.

Finally, test the FallbackIntent by typing an utterance that BankingBot does not understand. For this example, type Yo querer a comprar flores.
BankingBot responds with the message you created in the Closing response of your FallbackIntent.

Conclusion

In this module, you tested your bot configuration by interacting with BankingBot in both English (US) and Spanish (US).

Congratulations! You have successfully created a BankingBot!

In the next module, we’ll clean up the resources we created to prevent costs.  

Clean up and next steps

Was this page helpful?