Alexa Skills Conversation - alexa

I am using Https Call for retrieve the data from the php code,
I had one intent -> user will ask status of the user, #response i'm showing "Enter the User id".
But getting the error "problem with Skills".
my code
else if($EchoReqObj->request->intent->name =="status"){
$text = "Please provide the id";
$array = array("version"=>"1.0","response"=>array("outputSpeech"=>array("type"=>"PlainText","text"=>$text),"directives"=>array("type"=>"Dialog.ElicitSlot","slotToElicit"=>"id"),"shouldEndSession"=>false));
echo json_encode($array);
}
Details:
Intent name: status
Intent Slot: id
Expected output:
user-> status of user.
alexa -> Enter user id.
user -> 123456
alexa -> status of user Active.
Thanks in advance

Related

E-mail alert notification in Grafana

Hello friends I have a problem in configuring the email alert notification in Grafana like always getting like
Failed to send alert notifications
But if I save it's working but while clicking send test that alone does not come properly. Here is my custom.ini config file here below and help me to solve this error friends.
[smtp]
enabled = true
host = smtp.office365.com:587
user = sample12#domain.com
# If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
password = xxxxxxxxx
;cert_file =
;key_file =
skip_verify = true
from_address = sample12#domain.com
from_name = Grafana
# EHLO identity in SMTP dialog (defaults to instance_name)
;ehlo_identity = dashboard.example.com

How to handle out of domain utterances in Amazon Alexa

I had different intents in the skill, I am using php as service.
Everything is working fine, but if the user ask utterances that are not configured in any of the intents, it must go to the else part.
Eg code is as follows:-
if($EchoReqObj->request->type=="LaunchRequest"){
$text = "Testing launch";
$array = array("version"=>"1.0","response"=>array("outputSpeech"=>array("type"=>"PlainText","text"=>$text),"shouldEndSession"=>false));
echo json_encode($array);
}
else if(getting the intent name){//Do something.}
else{
$text = "In else part";
$array = array("version"=>"1.0","response"=>array("outputSpeech"=>array("type"=>"PlainText","text"=>$text),"shouldEndSession"=>false),"sessionAttributes"=>array("lastSpeech"=>$text));
echo json_encode($array);
}
This is the else I wrote but it is not getting executed.
Alexa always tries to maps to the closest intent no matter what the user input is. You won't get an IntentRequest without an intent. So if you have five intents, Alexa will try to match all user utterances to one of these five skill's intents.
Your else part executes when Alexa triggers an intent which haven't handled. From your example code a SessionEndedRequest might go into your else part. But if you are trying to handle out-of-domain utterances you have to use AMAZON.Fallback intent and handle it in your backend.
AMAZON.FallbackIntent
If you want to handle out-of-domain requests, or gibberish, or unexpected utterances, or when a user says something that doesn’t map to any intents in your skill you have to use predefined AMAZON.FallbackIntent. This intent uses an out-of-domain model generated based on your interaction model and provides a fallback for user utterances that do not match any of your skill's intents.
More on AMAZON.FallbackIntent here

Nintex Workflow was unable to interpret your response- Lazy approval

In our situation for lazy approval, the user responded with "Yes I approve" instead of the one word "yes, ok, approve, approved"
And user got return mail from system as follow
<<< Start>>>
-----Original Message-----
From: exampleWbesite#exampleDomain.com
Sent: exampleUser1 12:55 PM
To: exampleUser2
Subject: RE: ACTION: something Approval Required for something else
Nintex Workflow was unable to interpret your response. Please try again with a clear indication of your approval outcome.
Valid 'approved' responses are:
approve
approved
ok
yes
Valid 'declined' responses are:
decline
declined
no
reject
rejected
Yes I approve.
My question is "Is it the default behavior of Lazy approval or something else went wrong".
Lazy Approval requires the response to be on a single line by itself.
In this case, if the phrase "Yes I approve" was one of the valid approval responses, the result would have been an approval.

is FB's db (Oracle?) of "available username" in 'real-time' or gets updated dayly/wekly or never?

Scenario:
there is FB user with Facebook (FB) ID and personal profile.
that FB ID also has one Page.
Now that ID wants to assign an available username "Myusername" to its Page (not assigning that available "Myusername" to ID itself).
Error occurred and available "MyUsername" got assigned to ID .
In order to correct that, and to release "MyUsername" to the availability status,
ID's username "MyUsername" is changed to "NewReplacingUseername" .
However, when then trying to assign "MyUsername" (expected to be now AGAIN availabe) to the ID's Page, FB returns "Username not availabe".
However,
https://graph.facebook.com/MyUsername
returns
{
"error": {
"message": "(#803) Some of the aliases you requested do not exist: MyUsername",
"type": "OAuthException"
}
}
which should mean that "MyUsername" IS available !
Any help ?
========================
#OffBySome
thanks for pointing to that FAQ.
But that FAQ use terminology
"securing" a username
and
"diffrent account".
But this is NOT "different" account.
Page belong to the same ID account to which username was initially (arroneously) given but later that username to ID itself was replaced with NewUserName in order to free original Username to be given to the Page of same account to which ID belongs to.
As for "securing" , it is not anymore "secured" as it was replaced with NewUsername.
I need tech confirmation: Does FB store FOREVER any 'username' ever typed, even in error,
even if an account, who typed it in the first place, REPLACED it with something different, i.e. it is not used anymore / it is abandon ?
And, once again, this is within SAME account !
You cannot transfer a user name. Once it has been assigned it cannot be re-assigned so that is why you are getting that error message. This is documented on their FAQ:
Can I transfer my username to another account? Once you have secured a
username, it is not possible to transfer it to a different account on
Facebook. Also, when an account is removed from the site, its username
will be unavailable. Facebook does this for security reasons, namely
to prevent username squatting.

How do I send email from Google App Engine with a random, non-app admin sender?

Google App Engine has a rule of only allowing app admins to send email.
Is there a workaround that anyone out there is using to send emails from non-admin addresses?
I'm building a B2B white-label platform, and being able to mask the "FROM" address is very important without giving my customers admin access.
The docs also state:
Any valid email receiving address for the app (such as xxx#APP-ID.appspotmail.com).
So you can make up an sender address based on that, and even correctly route that email back into your app if anyone replies to it.
It is also possible to send email on behalf of a logged in user, assuming that user is using a Google Account.
user = users.get_current_user()
message = mail.EmailMessage(sender=user.email())
#Set other message components, such as message.body
try:
message.send()
except:
message.sender = #An APP-ID.appspotmail.com address, or Admin address
message.send()
If you need the email to appear as if it was sent by a user and when replied to reply back to that user's actual email address then you can make use of reply_to.
user_name = 'Some Guy'
user_email = 'some.guy#whatever.com'
admin_email = 'no-reply#yourdomain.com'
from_email = '%s <%s>' % (user_name, admin_email)
reply_to = '%s <%s>' % (user_name, user_email)
mail.send_mail(from_email, to_email, subject, body, reply_to=reply_to)
This way to the person receiving the email it will appear that it came from user_name and if they reply then their reply email will be sent to user_email.
The main negative of this approach is that if someone looks closely at the address they received the message from they will see the admin email address but most email clients show the name more prominently.
On the plus side you can send as any email address and most people would never notice it came from an admin email address.

Resources