In the response do you still need to include an empty slots subnode?
"invocationResponse": {
"body": {
"version": "1.0",
"response": {
"canFulfillIntent": {
"canFulfill": "YES",
"slots": {}
}
}
}
},
or is something like this okay?
"invocationResponse": {
"body": {
"version": "1.0",
"response": {
"canFulfillIntent": {
"canFulfill": "YES"
}
}
}
},
I have a private Alexa for business skill that I wrote. Can you perhaps confirm or deny that this intent is invoked on private skills? I put print statements in my code (Im emulating this all in Python). When I try invoke the skill without using the skill name just by using utterances, I would expect this function to be invoked underneath. The print statements log to cloud watch, so I was expecting to see data there.
However, I am not seeing data in cloud watch and it doesn't seem to be working at all. Meaning none of my utterances are matching up with intents and getting passed to the skill without the invocation name.
Can someone provide a sample perhaps in python so I can check my work, and\or advise on what the json response should look like when we dont need to worry about slots?
The documentation states For each slot, a skill is optionally expected to return values for the canUnderstand and canFulfill fields. Optionally to me means that you simple can omit the data and just return an empty slots subnode but I am not sure.
def canFulfillIntent(fullfill_request,session):
print("We hit the fullfill intent")
lsta = []
intent = fullfill_request['intent']
intent_name = str(fullfill_request['intent']['name'])
print("Intent Name Is: " + intent_name)
if intent_name in lsta:
#we are good return yes
Decision = "YES"
print("FOUND INTENT")
return build_response_fulfill(build_fulfill_response(Decision))
else:
#return no
Decision = "NO"
print("DID NOT FIND INTENT")
return build_response_fulfill(build_fulfill_response(Decision))