Amazon lex - Can the bot initiate a message? - amazon-web-services

I am new to amazon lex. I wanted to have the bot initiate a conversation instead of the user triggering the start flow by asking a question, is there a way to do that?

At the moment, it has to be handled client-side, i.e, you won't have this behavior in the test interface.
In Facebook Messenger, for example, you can setup a Greeting Text.

Related

How to send a private message to user on AWS Chime sdk?

I am using AWS Chime JS SDK and would like to send a private message to a user. By message I mean to show a popup modal to an specific user.
I've been going through the documentation, but overall I have not found how to send messages to specific users.
https://aws.github.io/amazon-chime-sdk-js/modules/apioverview.html#9-send-and-receive-data-messages-optional
Is this possible under Chime?
The data channel within Chime would not allow for this if you wanted secure and private messages. Optionally, you could filter on the inbound message on each client so that it only popped for the person you wanted. However, the Chime SDK also has a Messaging SDK that can be used for a case like this:
https://aws.amazon.com/blogs/business-productivity/build-meeting-features-into-your-amazon-chime-sdk-messaging-application/
You can create private channels. They are also persistent and can be used for other data sharing use cases.

Does Amazon aws lex chatbot supports videos?

I am new to Amazon aws, Is lex chat bot support video eg MP4 , ?
Assume something like this:
Bot: would you like to watch the tutorial?
Human: Yes.
Bot: displays a video
A video can be alone or with response card .
Is this possible????
You can define a custom payload as a response from a Lex bot (using a Lambda function for the fulfillment), but you would also have to integrate the Lex bot into an application that could appropriately handle that response (display the video based on the response from the Lex fulfillment lambda).
The supported message formats are:
PlainText—The message contains plain UTF-8 text.
SSML—The message contains text formatted for voice output.
CustomPayload—The message contains a custom format that you have created for your client. You can define the payload to meet the needs of your application.
Composite—The message is a collection of messages, one from each message group. For more information about message groups, see Message Groups.
Moere info on Lex messaging and the CustomPayload here: https://docs.aws.amazon.com/lex/latest/dg/howitworks-manage-prompts.html
So the answer is that it is possible, but not a built in functionality.
Amazon lex will be able to send whatever response is required, it's the job of chat client to render that response and displays accordingly.
There will be a different way to send a video in response to facebook messenger than slack or any other chat client.
If you need to deploy it to your website, you can check this and this out. It supports HTML and markdown components in response so you can send a video.

Can I send an HTTP request to an Alexa's Skill Endpoint in order to trigger a reprompt in Alexa?

The scenario would be this.
I would start the skill with the corresponding command ("Alexa, do whatever.."), handle the subsequent LaunchRequest in the Skill Endpoint, and later (minutes later), Alexa would prompt the user with some question.
I'd like to know if I can trigger that late prompt (reprompt actually) in Alexa by sending a request to the corresponding Endpoint from a third Web Service. I guess I can handle HTTP request in the Endpoint (AWS Lambda function or whatever), but I don't know if I can trigger reactions in Alexa withouth it starting them first.
I don't think this would be allowed as it would break a fundamental privacy issue whereby interactions need to be initiated by the user and so be against the Alexa TOS.
If your "reprompt" doesn't actually require some 3rd party trigger e.g if you don't what to run something in response to a code event, then you could look at the reminders API.
You do need to request their permission initially to do this, so it would potentially change your flow somewhat, but then you could prompt them to re-engage with your skill this way.

any way of password masking in AWS lex bot

Is there any way to set data type of the input(in chabox) in amazon lex to password datatype or any way to mask the password shared in the AWS lex Chatbot?
Amazon Lex is entirely separate from the user interface used to pass messages to Lex.
So any configuration dealing with the chatbox, will need to be done within your specific channel's chat display settings. And that will differ between channels (Facebook Messenger, SMS, Skype, etc.).
If you are using the Lex Test Chat, be aware that it has its own unique formatting, built entirely separate from Lex, so don't confuse those two. Lex only deals with receiving messages, parsing the language, and delivering appropriate responses. How the incoming messages and outgoing responses are displayed is entirely controlled by the channel.
Just to give you an example of how something like this can be done using Facebook Messenger.
You can use Facebook Webview to open an html form inside the facebook chat that uses the password input:
<input type="password"...>

AWS Lex and Facebook Messenger Integration Not Working

I'm banging my head against the wall trying to get an AWS Lex based chatbot integrated with Facebook.
As far as I can tell, everything is set up correctly.
When I send a message to my page in Facebook, I don't get a reply. However, the analytics in my app shows that the app is getting messages, so I know the message is making it from the page to the app.
When I try to hit the AWS Lex Webhook directly using POSTMAN, the webhook responds to literally everything I sent to it with a blank HTTP 200 OK response.
The lambda function that is tied to the AWS Lex chatbot is not getting invoked as a result of the messages from Facebook because no logs are getting generated and cloudwatch doesn't show an attempts to run the lambda function.
Does anyone have any ideas?
UPDATE : I ended up engineering around this by bypassing the Facebook channel capability inside AWS Lex and using Lambda instead. I deployed a passthrough API which calls a lambda function and then interacts with AWS Lex via Boto3/Python. In theory this is all supposed to be taken care of from inside AWS Lex with the Facebook channel integration, but I wasn't able to get it to work so I just built around it.
Verify Amazon lex is properly configured with facebook messenger .
Check : Page access token
Verification token
App ID
Check if your webhook is subscribed to page you are messaging on.
Check if your facebook user is added as tester/admin/developer
Check if your latest version of BOt is published on intended alias.
Also while configuring webhook tick necessary options : messages, messaging_postbacks, messaging_optins, message_deliveries, message_reads, messaging_payments
This should resolve your head ache. If not please reply