How can I pass a required field from my ipad application to Amazon Lex?

0

Hi Experts,

I have created a bot with Amazon lex and it's validation & fulfillment with Python and MongoDb. Bot is working as expected.

Now I am working to integrate my Bot with an ipad application.

Currently my bot asks user about his account id and then bot validate that id in DB and according responses.

Now after integration instead of asking the account id from user, that id should be passed from ipad application to the bot and then bot should responds according.

My question is about this. How can we pass account id from ipad app to bot and then how can my bot or lambda function can get that?

Please suggest how can I achieve this? Any link or tutorial will be helpful.

asked 4 years ago321 views
1 Answer
0
Accepted Answer

Hello,

Thank you for your interest in Lex. You can use session attributes and request attributes to exchange information out of band with the Lex bot. You can find more information here:
https://docs.aws.amazon.com/lex/latest/dg/context-mgmt.html#context-mgmt-session-attribs

You can pass the account-ID as a session or request attribute to the bot from your iPad application. Then, you’d would populate the account-ID slot with the passed value in the dialog code hook Lambda function. For added security, you may want your Lambda function to have an additional authentication mechanism. You can then use ElicitSlot dialog action to prompt for the next slot in the dialog. You can also use Delegate dialog action to tell the bot to prompt for the next slot based on the configured priority.

Hope this helps. Let us know if you have further questions.

AWS
answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions