question

leo avatar image
leo asked ·

AMAZON.Ocassion.Updated not working (along with other .Updated schemas)

Here is a screenshot of the request in postman https://snag.gy/y6eqsB.jpg


After more debugging I found that the event requests work for for .Activated schemas but fail for .Updated. Is there something I'm missing that is essential for the .Updated schemas to work?

alexa skills kitalexaproactive events
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Amazon_Bernardo Bezerra avatar image
Amazon_Bernardo Bezerra answered ·

Hello and thank you for your message.

Sorry for the delayed reply. Are you still facing this issue? Can you be more specific as to which error you are seeing?

Regards,
Barry

2 comments
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi Barry,

Sorry for the delayed response but yes I still am getting this error.

Here is me sending a message AMAZON.MessageAlert.Activated:

https://snag.gy/Ucl7nT.jpg

Now using the same access token and only changing the event node, I get a 500 internal error when sending an AMAZON.Ocassion.Updated:

https://snag.gy/td3ARn.jpg

If you refer back to my original screenshot you'll notice that I was getting a 400 error about the event node being incorrect when it was copied off the Proactive Schema documentation here:

https://developer.amazon.com/docs/smapi/schemas-for-proactive-events.html#occasion

Here is a final screenshot of my skill.json to make sure I'm I have the right configuration to be receiving events:

https://snag.gy/raMCcD.jpg

0 Likes 0 ·

Hi @leo and sorry for my delayed reply.

Upon further examination, I was able to identify an error in the JSON for the AMAZON.Occasion.Updated shown in the documentation. The original one has the localizedAttributes object nested inside the event property, while it should actually be outside it.

By using the following JSON instead of the one in the documentation I was able to create the notification:

{
    "timestamp": "2019-05-09T12:10:01.00Z",
    "referenceId": "test-001",
    "expiryTime": "2019-05-09T23:59:59.00Z",
    "event": {
        "name": "AMAZON.Occasion.Updated",
        "payload": {
            "state": {
                "confirmationStatus": "CONFIRMED"
            },
            "occasion": {
                "occasionType": "APPOINTMENT",
                "subject": "localizedattribute:subject",
                "provider": {
                    "name": "localizedattribute:providerName"
                },
                "bookingTime": "2019-05-09T23:59:59.00Z",
                "broker": {
                    "name": "localizedattribute:brokerName"
                }
            }
        }
    },
    "localizedAttributes": [
        {
            "locale": "en-US",
            "subject": "root canal",
            "providerName": "Dental XYZ",
            "brokerName": "Dental XYZ"
        }
    ],
    "relevantAudience": {
        "type": "Multicast",
        "payload": {}
    }
}

I have reached out to the team responsible for the documentation in order for them to update it.

Thanks for bringing this up to our attention.

Regards,
Barry

1 Like 1 ·