question

arin avatar image
arin asked

Suggestion for "purchaseResult" while returning from "Cancel"

Hi. I have a minor naming suggestion for the "Connections.Response" request (from the code readability perspective only):

Results for both Upsell and Cancel operations are called "purchaseResult" :

     request['payload']['purchaseResult'] 

I understand that it's best to have a unified naming but the word "purchase" in purchaseResult while returning from a Cancel operation is a little bit confusing. For instance, in the attached "request" example, catching a glimpse (without paying attention to the "name": "Cancel"), "purchaseResult": "ACCEPTED" implies that this was a successful *purchase* operation; however, this is indeed a *cancel* operation...

I guess something that works for both Upsell and Cancel would be best, e.g., "payloadResult" or simply "Result"...

----------

	"request": {
		"type": "Connections.Response",
		"requestId": ...,
		"timestamp": ...,
		"locale": "en-US",
		"status": {
			"code": "200",
			"message": "OK"
		},
		"name": "Cancel",
		"payload": {
			"purchaseResult": "ACCEPTED",
			"productId": ...
		},
		"token":...
	}
alexa skills kitrequestisp
10 |5000

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

1 Answer

KAIYIN@AMAZON.COM avatar image
KAIYIN@AMAZON.COM answered

Thank you for posting the feedback! We will communicate that to internal product team. Do you need any other help?

2 comments
10 |5000

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

Thanks, @KAIYIN@AMAZON.COM

Nothing else at the moment except the other question I posted yesterday regarding API call token. I'll definitely update you if I come across any questions.

0 Likes 0 ·

Thanks. That one I will need to reproduce on our end, so might take a longer time. But if that behavior is confirmed to be by-design, some tech doc update might be in place.

1 Like 1 ·