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.

已提問 4 年前檢視次數 236 次
1 個回答
0
已接受的答案

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
已回答 4 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南