Creating lex bot
In this chapter we will be configuring the lex bot to work with our lambda function and add data to our dynamodb databases
- go to intent tab on lex bot and Click on NewIntent that was created when you create the bot

If you don’t have a intent name NewIntent you can create one by click on create Intent
- name the intent as BotIntent

- In the Sample utterances :
- click on Plain text
- then add the code bellow
register information
my name is {FirstName} phone number {PhoneNumEmp} and position {job_position}
4. In Slots :
- click on Add Slot

- Add the name : PhoneNumEmp
- Add the slot types : AMAZON.PhoneNumber
- Add the Prompts : what your phone number ?

- do the same for the employees name
- Add the name : FirstName
- Add the slot types : AMAZON.FirstName
- Add the Prompts : tell me your name ?

- do the same for the employees job
- Add the name : FirstName
- Add the slot types : AMAZON.FirstName
- Add the Prompts : tell me your name ?

-
in the Confirmation :
- click Active
- fill the Confirmation prompt : so your name is {FirstName} , phone number {PhoneNumEmp} and current job postion is {job_position} correct ?
- Decline response prompt : okay we will ask again

- In Fulfillment click on Active
-
finally click on Use a Lambda function for initialization and validation then click on build

-
configure the test :
- Click on test
- Click on the setting icon
- for the source choose BotFunction
- then choose Save

-
fill in the require information to test out the bot

-
then check the databases to see if the Information is register go to AWS Dynamodbv2
-
click on Explore items

-
in Explore item click on EmployeesDataBases :
We can see that the information have been log into our databases