Event Schemas for Alexa Smart Properties for Healthcare
Alexa Smart Properties enables you to receive notifications about Alexa events. Events are published to Amazon Simple Notification Service (SNS).
For details about how to set up events, see Receive Events for Alexa Smart Properties for Healthcare.
Event types
The following table contains the Alexa Smart Properties events to which you can subscribe to receive notifications.
Event Name | Description | Schema |
---|---|---|
|
An automation sequence execution is complete. Either all actions are invoked and completed successfully, or there were failures. | |
|
The skill times out or the skill returns an invalid response. | |
|
An enterprise subscription is activated for a unit. |
Automation execution completion event
The following is an example of an automation execution completion event.
{
"header":{
"version":"2.0",
"eventId":{
"id":"12345-6789-1011-abcd-example"
},
"eventType":{
"namespace":"Alexa.Automation.Execution",
"name":"Completion"
},
"eventTime":{
"timestamp":"2017-09-20T12:04:03Z"
},
"entities": {
"unit":{
"type":"Unit",
"id":"amzn1.alexa.unit.did.12345"
}
}
},
"payload":{
"automation":{
"id":"amzn1.alexa.automation.12345"
},
"result": {
"status": "FAILURE",
"errors":[
{
"type":"ENDPOINT_NOT_FOUND",
"message":"Endpoint used in the automation was not found",
"id":"amzn1.alexa.endpoint.12345"
}
]
}
}
}
Header parameters
Parameter | Description | Type | Required |
---|---|---|---|
|
Schema version, which is |
String |
Yes |
|
Object that contains the event ID. |
Object |
Yes |
|
Unique identifier that represents an event. |
String |
Yes |
|
Object that contains the event name and namespace. |
Object |
Yes |
|
Represents the category an event belongs to. All automation-related events share the same namespace. Example: |
String |
Yes |
|
An event name within the namespace. Example: |
String |
Yes |
|
Object that contains the event time. |
Object |
Yes |
|
Event creation time in "YYYY-MM-DDThh:mm:ssZ" format (RFC 3339 profile of ISO 8601). |
DateTime |
Yes |
|
List of entities. For details, see Unit entity. |
Array |
Yes |
Payload parameters
Parameter | Description | Type | Required |
---|---|---|---|
|
Details for the automation from which the event was generated. |
Object |
types |
|
Unique identifier of the automation instance from which the event was generated. |
String |
Yes |
|
Details about the result of the automation. |
Object |
Yes |
|
Status of automation execution initiation or completion. Allowed values:
|
String enum |
Yes |
|
Errors that occurred for automation initiation or completion. |
Array |
No |
|
Error type. Allowed values:
|
String |
No |
|
Message that describes the error. |
String |
No |
|
Endpoint ID. Example: |
String |
No |
Skill interaction failure event
The following is an example of a skill interaction event that reports a skill fault event due to an invalid response from the skill or a skill endpoint timeout.
{
"header":{
"version":"2.0",
"eventId":{
"id":"12345-6789-1011-abcd-example"
},
"eventType":{
"namespace":"Alexa.Skill.Interaction",
"name":"Failure"
},
"eventTime":{
"timestamp":"2017-09-20T12:04:03Z"
},
"entities": {
"unit":{
"type":"Unit",
"id":"amzn1.alexa.unit.did.12345"
},
"skill":{
"type":"Skill",
"id":"amzn1.ask.skill.12345"
}
}
},
"payload":{
"interaction":{
"type":"IntentRequest",
"locale":"en-US",
"intent":{
"name":"intentName"
},
},
"skill":{
"id":"amzn1.ask.skill.12345",
"stage":"live"
},
"unit":{
"id":"amzn1.alexa.unit.did.12345"
},
"session":{
"id":"amzn1.echo-api.session.12345"
},
"requestId":"amzn1.echo-api.request.12345",
"error":{
"type":"INVALID_RESPONSE",
"message":"Details about the error"
}
}
}
Header parameters
Parameter | Description | Type | Required |
---|---|---|---|
|
Schema version, which is |
String |
Yes |
|
Object that contains the event ID. |
Object |
Yes |
|
Unique identifier that represents an event. |
String |
Yes |
|
Object that contains the event name and namespace. |
Object |
Yes |
|
Represents the category an event belongs to. All skill interaction-related events share the same namespace. Example: |
String |
Yes |
|
An event name within the namespace. Example: |
String |
Yes |
|
Object that contains the event time. |
Object |
Yes |
|
Event creation time in "YYYY-MM-DDThh:mm:ssZ" format (RFC 3339 profile of ISO 8601). |
DateTime |
Yes |
|
List of entities. For details, see Unit entity and Skill entity. |
Array |
Yes |
Payload parameters
Parameter | Description | Type | Required |
---|---|---|---|
|
Object that describes the type of skill interaction where failures were observed. |
Object |
Yes |
|
Type of skill interaction where failures were observed. Allowed values: |
String enum |
Yes |
|
User's locale. Example: |
String |
Yes |
|
Object that indicates the action that fulfills a user's spoken request. |
Object |
No |
|
Name of the intent that corresponds to the action the user requested. Example: |
String |
No |
|
Object that represents the skill to which the event pertains. |
Object |
Yes |
|
Unique identifier of a skill. Example: |
String |
Yes |
|
Stage of the skill. Allowed values: |
String |
Yes |
|
Object that contains the unit ID. |
Object |
Yes |
|
Unit ID that uniquely identifies a unit. |
String |
Yes |
|
Object that contains an ID that uniquely identifies a skill session. |
Object |
Yes |
|
ID that uniquely identifies a skill session. Example: |
String |
Yes |
|
ID that uniquely identifies an Alexa user request and the response to it. Example: |
String |
Yes |
|
Object that contains additional details about the result of the user's request to the skill. |
Object |
Yes |
|
Type of error. Allowed values:
|
String enum |
Yes |
|
Description of the error. You should rely on the type of error and not the message of the error. The message is only used for logging purposes. |
String |
Yes |
Enterprise subscription activation event
The following is an example of an enterprise subscription activation event.
{
"header":{
"version":"2.0",
"eventId":{
"id":"12345-6789-1011-abcd-example"
},
"eventType":{
"namespace":"Alexa.Enterprise.Subscription",
"name":"Activation"
},
"eventTime":{
"timestamp":"2017-09-20T12:04:03Z"
},
"entities": {
"unit":{
"type":"Unit",
"id":"amzn1.alexa.unit.did.12345",
"parent": {
"type":"Unit",
"id":"amzn1.alexa.unit.did.12345"
}
}
}
},
"payload":{
"subscription": {
"id": "amzn1.ask.skill.12345"
},
"result": {
"status": "SUCCEEDED",
"error": {
"type": "INTERNAL_SERVER_ERROR",
"message": "Details about the error"
}
}
}
}
Header parameters
Parameter | Description | Type | Required |
---|---|---|---|
|
Schema version, which is |
String |
Yes |
|
Object that contains the event ID. |
Object |
Yes |
|
Unique identifier that represents an event. |
String |
Yes |
|
Object that contains the event name and namespace. |
Object |
Yes |
|
Represents the category an event belongs to. All enterprise subscription-related events share the same namespace. Example: |
String |
Yes |
|
An event name within the namespace. Example: |
String |
Yes |
|
Object that contains the event time. |
Object |
Yes |
|
Event creation time in "YYYY-MM-DDThh:mm:ssZ" format (RFC 3339 profile of ISO 8601). |
DateTime |
Yes |
|
List of entities. For details, see Unit entity. |
Array |
Yes |
Payload parameters
Parameter | Description | Type | Required |
---|---|---|---|
|
Details of the subscription for which the event was generated. |
Object |
Yes |
|
ID of the subscription. |
String enum |
Yes |
|
Result of the subscription activation. |
Object |
Yes |
|
Status of the subscription activation. |
String enum |
Yes |
|
Error that occurred for subscription activation. If activation succeeds, this object won't be present. |
Object |
No |
|
Type of error. Allowed values:
|
String enum |
Yes |
|
Description of the error. You should rely on the type of error and not the message of the error. The message is only used for logging purposes. |
String |
Yes |
Entities
The header of the event can have the following entities.
Unit entity
Parameter | Description | Type | Required |
---|---|---|---|
|
Object that represents the details of a unit. |
Object |
Yes |
|
Unit entity type. Valid values: |
String enum |
Yes |
|
Unit identifier. |
String |
Yes |
|
Parent unit, which contains the parent ID. |
Object |
Yes |
|
Parent entity type. Valid values: |
String enum |
Yes |
|
Parent identifier. |
String |
Yes |
Skill entity
Parameter | Description | Type | Required |
---|---|---|---|
|
Object that represents the details of a skill. |
Object |
Yes |
|
Skill entity type. Valid values: |
String enum |
Yes |
|
Skill identifier. |
String |
Yes |
Related topics
- Receive Events for Alexa Smart Properties for Healthcare
- Event Messenger API Reference
- Get Started with Alexa Smart Properties for Healthcare
Last updated: Nov 17, 2022