CanFulfillIntentRequest with Alexa SDK for Node.js
The lines are blurry for many users of the difference between “first-party” skills and “third-party” skills. They just want answers. Builders meanwhile just want traffic. Features like implicit invocation on the Actions on Google platform and CanFulfillIntentRequest
for Alexa answer both needs. Recently, the Alexa team added support for CanFulfillIntentRequest
directly into the ASK SDK for Node.js.
You first need to understand that name-free interaction through CanFulfillIntentRequest
works through a few steps:
- The user makes a request without providing a specific skill’s invocation name
- Alexa chooses “top” skills based on some magic on the platform
- Alexa queries the skills, collecting responses (this isn’t a real request yet, so the code shouldn’t change any state)
- Alexa determines the best response
- Alexa sends a normal
IntentRequest
to the skill
The skill needs to let Alexa know if the skill can fulfill the intent (as the name says). The skill can specify if it understands the slot values. This now lives on the response builder, like so:
You can also specify MAYBE
if your skill can maybe handle the request after getting more information.
Make sure you’re upgraded to version 2.3.0 of the ASK SDK to take advantage of this change.