Lex bot returns parameters to client instead of lambda fulfilment function output - facebook-messenger

I've integrated Amazon Lex bot with Facebook workplace messenger, which responds to utterances (questions) and fills up all slots. But when user answers all questions, it just returns the parameters to messenger (intent name and all slots and their values in key-value pairs) as final output, instead of the actual output which Lambda function returns. Below is the final returned output:
Intent: TestIntent
Slots: month:jan year:2015 channel:testChannel type:testType main:salesVolume category:testCategory region:testRegion
I have specified a Lambda function in the fulfilment (but not in lambda initialization and validation), which gives the final output. This bot is working in Lex Test Bot and returning correct output, which I suppose is because of successfully calling Lambda function.
In the Channels tab of Lex console, the IAM role for messenger integration is AWSServiceRoleForLexChannels, but this cannot be changed.
Is the Facebook messenger not calling the Lambda function? Why is the Lex bot working in test but not in Facebook workplace messenger?

The issue was related to bot aliases and versioning. The alias used by Messenger integration was pointing to an old version. Changed the alias pointer to latest version and it worked.

Related

Is it possible make Watson Assistant search a data on IBM Cloudant?

I am developing a chat bot using IBM Watson Assistant. Because the project is still in its early stage, I am still using the free plan. Everything was working relatively well until a couple weeks ago when I hit a brick wall.
I need my Assistant to communicate with IBM's database Cloudant but it just won't work. I set up the webhook as instructed, and gave full adm permission to my Assistant, but, every time I try to make it call the database, an error occurs. The error code is 405, which is supposed to be an error related to language, but both my data base and my assistant were created with the same language (this case, it is Portuguese-Brazil).
Unfortunately, Watson has no detailed log to analyse, so error code 405 is all I got.
I am looking for answers ever since, but haven't found anything yet.
So, I have to ask: is it possible to make Watson Assistant connect with Cloudant?
Edit
I am adding screenshots:
1) This is Cloudant's overview page. Here, I copied the external endpoint.
2) The, I opened my assistant, called "Teste_BD", and pasted the endpoint in the URL field in order to set it up as a webhook
3) In this screen, I gave full adm permissions to my Test_BD Assistant
4) Here is where I created a node to test. The idea is as simple as it gets: it will enter by recognizing the "Test" intent as soon as I type "hi". It is supposed to search for any of the keys set and save on the "$result" variable...
5) ... then, it is supposed to print the result on a sentence. In this case, it is meant to print the "id" number if it is found or print anything else the variable might have store in the "anything_else" condition.
6) And that's when the error is triggered. As I said there is no log to consult, despite the error message clearly saying so...
7) ... the best I could get, is this.
8) Also, as you can see, the system just associate the value "null" for the variable
9) At first, I thought the Assistant was just not recognizing the webhook, so I altered it to some nonsense just to see what would happen.
10) It triggered another error message saying the URL was not valid, so, at least, I got the confirmation that my Assistant was recognizing the Cloudant URL as valid.
You would use webhooks for something like this. If you can share the full error message coming back from the cloudant API that might help. Also any screenshots of how your webhook is set up could be helpful as well.

App engine - raw request body - stripe webhooks

I'm trying to run my node.js app app engine and I am having trouble with stripe webhooks - with the constructEvent, that I need to give a request raw body. Worked on virtual machine but not on app engine.
event = stripe.webhooks.constructEvent(req.rawBody, sig, stripeKeys.webhookPaymentIntent);
Says:
No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe? https://github.com/stripe/stripe-node#webhook-signing
Just looking at the code that you posted here, I wonder if the last parameter is indeed the value that you wanted to pass to the constructEvent function. it reads webHookPaymentIntent. I wonder if this should really be the webhook signature secret? It may be that it really is the webhook secret value, but just named a bit misleadingly.
Maybe this is something though you can verify? A simple test would really to be to pass the string literal here to see if that would work first. Of course make sure not to commit that to any source control.
The stripe-node method params are listed here for reference: https://github.com/stripe/stripe-node/blob/1d6207e34f978d8709d42d8a05d7d7e8be6599c7/lib/Webhooks.js#L11

Alexa Skill working on amazon.developer console test but not working in beta-testing for alexa App

I am currently in development mode for the skill. It is using Lambda endpoint. The skill is working in https://developer.amazon.com/alexa/console/ask/test/
When I sent invites for Beta testing and followed the Beta testing instructions on a different (email account with Alexa), the application is giving “Unexpected communication issue: There was a problem communicating with the requested skill”
Request identifier: amzn1.echo-api.request.[some-id]
I am not getting any logs in CloudWatch for my Lambda function
[Update] More info:
The skill is available in all countries and regions where Amazon distributes skills.
This is a dummy skill, with only one intent, triggered by a command like this Alexa open mySkill and tell me a new fact, after which the control passes on to Lambda function which selects a fact string randomly from an array.
Solved it finally. The problem was mainly due to 2 reasons:
I had created multiple skills (for testing) and didn't noticed that
they had similar invocation words (silly me :/ ). One of them was
pointing to an older AWS account. Thanks #ChuckLaPress for the hint.
Language settings. I had used the default en-US language and was trying from India. Solved it by including support for all other english languages. Details here.

recast bot answering fine in it's builder but in slack it's skipping the only intends which have "notions missing"

My recast bot is answering fine in its builder but when it is integrated with Slack it skips the only intends which have notions missing and eventually spoiling the whole conversation. How to fix it?
Are you using a conversation_token ? If yes, are you using your slack id as a conversation token ? If you are doing so, you need to check the box "this is the end of my conversation" within the bot builder or using methods implemented in the SDK in order to reset the memory or the conversation of the bot when the conversation ends :)

Is it possible using the GAE Logs API to retrive front-end logs only?

How can we we send a query to the Log API such that it only retrieves logs from the front end and not the backends?
I don't know what runtime you're asking about, but looking at the Python source for SDK 1.8.8 you have the following arguments for the google.appengine.api.logservice.fetch function:
module_versions: A list of tuples of the form (module, version), that
indicate that the logs for the given module/version combination should be
fetched. Duplicate tuples will be ignored. This kwarg may not be used
in conjunction with the 'version_ids' kwarg.
(This isn't yet reflected in the Google Developers site)
This does not mean you can directly access front-end logs, but if you convert your app from using backends to using two named modules, one for front-end requests and another for backend work, you'll be able to fetch the logs of each independently.

Resources