Wrong intent in Alexa Skill Request when using the simulator - alexa-skills-kit

I set up my intents using this intent schema:
{
"intents": [
{
"intent": "StartIntend"
},
{
"intent": "AMAZON.YesIntent"
},
{
"intent": "AMAZON.NoIntent"
}
]
}
My sample utterances look like this (it's german):
StartIntend Hallo
StartIntend Moin
StartIntend Guten Tag
Why does the Amazon Developer Console generate the following request, when I use the utterance "Yes" or "Ja"?
{
"session": {
"sessionId": "SessionId...",
"application": {
"applicationId": "amzn1.ask.skill...."
},
"attributes": {},
"user": {
"userId": "amzn1.ask.account...."
},
"new": true
},
"request": {
"type": "IntentRequest",
"requestId": "EdwRequestId...",
"locale": "de-DE",
"timestamp": "2017-02-17T21:07:59Z",
"intent": {
"name": "StartIntend",
"slots": {}
}
},
"version": "1.0"
}
Whatever I enter, it always is using the intend StartIntend.
Why is that? What have I forgotten / what have I done wrong?

The schema and utterance look correct.
I tried duplicating what you are seeing by performing the following steps:
Copied them as-is into a new skill on my account
Selected the North America region on the Configuration page.
Set the lambda to point to an existing lambda that I have. For testing purposes, I just need a valid ARN. I'm going to ignore the response anyways.
Then entered "Yes" into the service simulator
It indeed sent the Lambda the AMAZON.YesIntent.
So I conclude that there's nothing with the data you posted.
I tried entering Ja which resulted in the StartIntend, but I guess I would expect that since Ja is not "Yes" in North America.
Have you set the region to Europe, and entered a Lambda for the Europe region?

I talked about it with the Amazon Support. After some experiments it turned out, you have to write "ja" in lowercase. It seems to be a bug in the simulator itself.

When creating the skill in the Alexa Skills Kit, you need to choose the correct language i.e. German, see screenshot below.
Everything else seems to be correct.

Related

Sabre Revalidate Itinerary with Ancillaries

I'm currently working on the integration of the API to be able to search, confirm the price and book.
Currently we have a problem on the second step:
What I'm trying to get is to have a revalidate response having also all Ancillary and Baggage (hand and hold, also with a fee) to be able to create the page to show the information about the reservation.
I've tried to add the following (in a successfully request):
"TravelPreferences": {
"AncillaryFees": {
"Enable": true,
"Summary": true
},
"TPA_Extensions": {
"VerificationItinCallLogic": {
"Value": "B"
}
}
},
but I'm getting following error:
AIR EXTRAS SUMMARY REQUEST REQUIRES AT LEAST ONE GROUP CODE
Error during Processing
For the luggage, with this part
"Baggage": {
"CarryOnInfo": true,
"Description": true
},
I'll get info about baggage but no prices.
Any idea?
Thank you!

calculateroute.json giving NGEO_ERROR_GRAPH_DISCONNECTED error

So when I try to call calculateroute.json, I'm getting a NGEO_ERROR_GRAPH_DISCONNECTED error with no further information.
Here's my example call: https://route.api.here.com/routing/7.2/calculateroute.json?app_id=<APP_ID>&app_code=<APP_CODE>&waypoint0=geo!-34.0144128,151.1121957&waypoint1=geo!-33.875455,151.207583&mode=fastest;car;traffic:enabled&departure=2019-11-11T22:27:30
Obviously I've removed our App ID and App Code from that call :).
{
"_type": "ns2:RoutingServiceErrorType",
"type": "ApplicationError",
"subtype": "NoRouteFound",
"details": "Error is NGEO_ERROR_GRAPH_DISCONNECTED",
"additionalData": [
{
"key": "error_code",
"value": "NGEO_ERROR_GRAPH_DISCONNECTED"
}
],
"metaInfo": {
"timestamp": "2019-11-08T00:43:18Z",
"mapVersion": "8.30.102.150",
"moduleVersion": "7.2.201944-5674",
"interfaceVersion": "2.6.74",
"availableMapVersion": [
"8.30.102.150"
]
}
}
Any ideas?
I've tried looking through the docs but it seems I've done everything right and certainly it has worked for us hundreds/thousands of times before.
Indeed, I see the default Routing API does not find a direct route between the start and end waypoints. If you use our advanced Fleet telematics API, it does actually calculates the route.
https://fleet.api.here.com/2/calculateroute.json?app_id=<APP_ID>&app_code=<APP_CODE>&waypoint0=geo!-34.0144128,151.1121957&waypoint1=geo!-33.875455,151.207583&mode=fastest;car;traffic:enabled&departure=2019-11-11T22:27:30
Please use the advanced API if the standard API does not return results.

FHIR : adding a custom extension

I would like to add to add a custom extension to my Schedule resource.
In my app, Schedule have visit motives (reasons). I know there's a list of classified appointments / encounter reasons but I would like to use mine.
I have something like this :
{
"resourceType":"Schedule",
"identifier":"logical_id",
"type":"schedule_speciality",
"actor":{
"practioner_id":"identifier",
"practioner_name":"practioner name"
},
"external_id":{
"extension":[
{
"url":"http://api.test.com/fhir/schedule/external_id",
"valueIdentifier":"external_id"
}
]
},
"visit_motives":{
"extension":[
{
"url":"https://api.test.com/fhir/ValueSet/schedule#visit_motives",
"valueString":"vist_motive1"
},
{
"url":"https://api.test.com/fhir/ValueSet/schedule#visit_motives",
"valueString":"vist_motive2"
},
{
"url":"https://api.test.com/fhir/ValueSet/schedule#visit_motives",
"valueString":"vist_motive3"
}
]
},
"practice_id":{
"extension":[
{
"url":"https://api.test.com/fhir/schedule/practice_id",
"valueIdentifier":"practice_id"
}
]
}
}
I'm not sure about this part :
"visit_motives":{
"extension":[
{
"url":"https://api.test.com/fhir/ValueSet/schedule#visit_motives",
"valueString":"vist_motive1"
},
{
"url":"https://api.test.com/fhir/ValueSet/schedule#visit_motives",
"valueString":"vist_motive2"
},
{
"url":"https://api.test.com/fhir/ValueSet/schedule#visit_motives",
"valueString":"vist_motive3"
}
]
}
Is it correct to add an extension this way ? There are always multiple visit motives for a specific schedule so I have to list them.
I also have seen this kind of things :
"visit_motives": {
"coding": [
{
"system": "https://api.test.com/fhir/ValueSet/schedule#visit_motives",
"code": "visit_motive1"
}
]
}
Which one is the correct one or am I wrong ?
There are several issues here:
It seems odd to capture a "reason" on a schedule. A schedule says when a particular clinician or clinic or other resource is available. E.g. "Dr. Smith takes appointments Mon/Wed/Fri from 1pm-4pm". So if you were to capture a reason on the resource, it would reflect "Why does Dr. Smith have a schedule?" Typically reasons are captured for an individual Appointment. That's the resource that reserves a particular slot for a planned visit. And Appointment already has an element for reason where you're free to use your own codes or just send text.
You have extensions to convey identifiers, but Schedule already has an element for identifiers. Why would you use extensions instead of the standard element? Note that you can use the "system" and/or "type" components to differentiate different kinds of identifiers.
You're sending "identifier", "type", "name", etc. as simple strings - but they're complex data types, so you need to communicate the child elements
actor is of type Reference - that means you need to point to the Practitioner resource. You can't send the properties in-line. (If the Practitioner only exists in the context of the Schedule, you could use the "contained" approach which would use an internal reference, but containment doesn't seem to make sense in this use-case.
The URL for your extension contains ValueSet, which isn't correct - extensions are all structure definitions. Also, there shouldn't be a # symbol in the URL.
Your syntax for extensions is incorrect. You can't introduce new properties in FHIR. The property name for all extensions is just "extension". You differentiate by the URL. So your syntax should be:
{
"resourceType":"Schedule",
"id":"logical_id",
"extension": [
{
"url":"https://api.test.com/fhir/StructureDefinition/schedule-visit_motive",
"valueString":"vist_motive1"
},
{
"url":"https://api.test.com/fhir/StructureDefinition/schedule-visit_motive",
"valueString":"vist_motive2"
},
{
"url":"https://api.test.com/fhir/StructureDefinition/schedule-visit_motives",
"valueString":"vist_motive3"
}
],
"identifier": [
{
"system": http://api.test.com/fhir/NamingSystem/external_id",
"value": "external_id"
}
{
"system": http://api.test.com/fhir/NamingSystem/practice_id",
"value": "practice_id"
}
]
"type": {
"coding": {
"system": "http://somewhere.org/fhir/CodeSystem/specialties",
"code": "schedule_speciality"
},
"text": "Some text description of specialty"
},
"actor":{
"reference": "http://myserver.org/fhir/Practitioner/12345"
"display": "Dr. smith"
}
}

Watson conversation API returns empty output for yes and no input

I've set up a very simple script and part of it requires a yes or no response from the user.
When I test the script through the script builder at ibmwatsonconversation.com the script works fine.
But when I'm testing it through Postman making HTTP POST requests when I get to the part that requires a yes or no answer the output node is always
"output": {
"log_messages": [],
"text": [],
"nodes_visited": [
"node_25_1480610375023"
]},
The previous two nodes in the conversation work fine.
I have set up intents for yes and no, see images below:
The dialog is as follows:
Here's the chain of requests / responses:
{"input": {"text": "hello"}}
"output": {"log_messages": [],"text": ["Welcome to the KMBC IT help desk.How can I help you?"],"nodes_visited": ["node_1_1480509441272"]},
then
{"input": {"text": "my laptop is broken"}}
"output": {
"log_messages": [],
"text": [
"I'm sorry to hear that your laptop isn't working. \n\nI need you to check a couple of things for me, is that ok?"
],
"nodes_visited": [
"node_3_1480509642420",
"node_19_1480518011225"
]},
finally
{"input": {"text": "yes"}}
"output": {
"log_messages": [],
"text": [],
"nodes_visited": [
"node_25_1480610375023"
]},
Works fine inside the "Try it out" panel within the workspace:
Full JSON request / response:
{"input": {"text": "hello"}}
{"intents": [{"intent": "greetings","confidence": 1}],"entities": [],"input": {"text": "hello"},"output": {"log_messages": [],"text": ["Welcome to the KMBC IT help desk. How can I help you?"],"nodes_visited": ["node_1_1480509441272"]},"context": {"conversation_id": "4b5b1858-ae4e-4907-a3ab-c49abf601fd3","system": {
"dialog_stack": [
{
"dialog_node": "root"
}
],
"dialog_turn_counter": 1,
"dialog_request_counter": 1
}}}
{"input": {"text": "laptop broken"}}
{"intents": [{"intent": "complaint","confidence": 0.989692384334575}],"entities": [
{"entity": "hardware",
"location": [
0,
6
],
"value": "laptop"
}],"input": {"text": "laptop broken"},"output": {"log_messages": [],"text": ["I'm sorry to hear that your laptop isn't working. \n\nI need you to check a couple of things for me, is that ok?"],"nodes_visited": ["node_3_1480509642420",
"node_19_1480518011225"]},"context": {
"conversation_id": "b53dff12-9252-4b7e-abe8-7b45f561d394",
"system": {"dialog_stack": [{"dialog_node": "node_19_1480518011225"}],
"dialog_turn_counter": 1,
"dialog_request_counter": 1}}}
{"input": {"text": "yes"}}
{"intents": [{"intent": "yes","confidence": 1}],"entities": [],"input": {"text": "yes"},"output": {"log_messages": [],"text": [],"nodes_visited": ["node_25_1480610375023"]},"context": {"conversation_id": "b9ddc5b0-5f3c-423f-9bbe-5a1ef013c175","system": {"dialog_stack": [{"dialog_node": "root"}],"dialog_turn_counter": 1,"dialog_request_counter": 1}}}
Based on the full JSON request/response, your issue is here (actually it's also in the previous call, but that works by concidence):
{"input": {"text": "yes"}}
Conversation is stateless, so you need to send back in the context object you received previously. Otherwise the system doesn't know where to continue. The following request object should look like this:
{
"input": {"text": "yes"},
"context": {
"conversation_id": "b53dff12-9252-4b7e-abe8-7b45f561d394",
"system": {
"dialog_stack": [{"dialog_node": "node_19_1480518011225"}],
"dialog_turn_counter": 1,
"dialog_request_counter": 1
}
}
I would recommend to use the Watson Developer Cloud SDK to manage this for you.
https://github.com/watson-developer-cloud
Have you actually created a yes and no intent ?
There is a lot of debate about the best process to handle yes and no responses. But I have found that by creating a yes and no intent, with example "yes" and "No" responses works well.
Your example questions for these intents could include responses like "ok", "yess", "on no","yes please" etc.

How to "Add guest" to event via google calendar API?

could you please give me a hint on how to share a single event via google calendar api?
That is I'd like to invite other users to see the event programmatically without sharing the whole calendar. To mimic the "Add guests" UI action
As Claudio mentioned, you need to use the Google Calendar Advanced API for this.
You'll want to use a patch because you don't want to replace all the other data on the calendar invite. However, even in the case of patch, since the attendees lives in an array, if you attempt to pass a patch such as this:
{
attendees: [ { email: "new#example.com"} ]
}
... it'll replace all old invitees (i.e. it'll remove anyone that was on the invite before you called patch). To fix this, you must first get the current invitees, add a new person to the array, and then send a patch.
You can see a detailed example of this in this answer which also explains how to use Google Apps Scripting to ensure an email is sent to the user when adding them to a calendar event (see the addGuestAndSendEmail() method in that post).
You can use the API to add people to the attendees collection:
https://developers.google.com/google-apps/calendar/v3/reference/events/update
refer the following request.
method: POST
endpoint: https://www.googleapis.com/calendar/v3/calendars/primary/events?sendUpdates=all
here, sendUpdates means when you add any guest so he would get an invitation mail used based on scenario.
Input Json:
{
"kind": "calendar#event",
"etag": "etag",
"status": "confirmed",
"summary": "JayKara",
"description": "eqwbdjhwhhwhhwrhjehrhejhfj",
"location": "America",
"creator": {
"email": "#mail.com",
"self": true
},
"organizer": {
"email": "#mail.com",
"self": true
},
"start": {
"date": "2019-12-23"
},
"end": {
"date": "2019-12-24"
},
"originalStartTime": {
"date": "2019-12-24"
},
"visibility": "public",
"attendees": [
{
"email": "****#mail.com" //this guys are the guest
}
]
}.
After that there is no patch method required your guest guys will receive an invitation whenever update event
Cheers!

Resources