Blocks are the fundamental components of a Voice Apps project. Each block can perform a ton of functionality by adding and configuring one or more of the block features listed below.
We've listed out each feature below along with a short description and a link to more detailed documentation on that feature.
- What the user says - allows you to provide a list of sample phrases the user can say to trigger the block.
- When the user says "yes", "no", "next", "previous", "repeat", "stop", "resume", "start over" - triggers the block to execute whenever the user says something similar to the chosen response
- When the user says anything - triggers the block when the user says something that doesn't trigger another block. Think of this as a catch-all block.
- Another Intent - indicates that this block can only be triggered directly from another block by setting the Next Action of that block to execute this intent.
- Audio Player "Almost Finished" - If a long audio file or stream is currently playing and is nearing the end, this block will be triggered.
- In-skill Product Events - This block will be executed when the selected event is fired from the In-skill purchasing flow.
Welcome Block Only - Allows you to enter key information about your skill or action. Publishing information is Locale specific.
The Set State function allows you to set the value of variables.
Easily connect to popular 3rd party systems and your own APIs with the Integrations feature.
- Call API - Allows you to send/retrieve data to/from external systems.
- Get RSS - Gets the specified RSS Feed and converts it to JSON for easy consumption by your application.
- Many more integrations are on the way!
Response Groups allow you to group multiple responses (voice, audio, display, etc.) together. You can then specify the conditions under which that group should execute.
Takes the text you enter and speaks it to the user using whichever voice you choose. You can add multiple entries and Voice Apps will choose the response randomly.
Short Audio Response
Plays a short ( < 240 seconds) audio file. You can have up to 5 short audio files in a single response and they cannot be more than 240 seconds total.
Allows you to send informational cards to the users Alexa App.
Allows you to request permissions from the user so that you can access personal information from their Amazon or Google account. You can also ask for permission to access certain advanced features.
To learn more about the Permissions Request, click here:
Display templates are an older, but still supported way to send visual output to voice devices with a screen.
Alexa Presentation Language (APL) templates are the preferred way to send visual output to voice devices with a screen.
Next Actions Tab
Next Actions specify what the application should do after processing the block.
You can do any of the following:
- Wait for the user - waits for the user to give a voice response
- End the session - ends the voice application
- Execute another block - executes the specified block starting with the data tab
- Execute previous block - executes the previous block starting with the data tab
- Activate previous block - sets the previous block as the active block
- Play a long audio stream - plays the specified audio stream
- Buy an In-skill Product - starts the ISP purchase flow
- Cancel an In-skill Product - starts the ISP refund flow
Responds to requests for help when this block is the currently active block. This overrides any global help blocks in your project.
Lets you send a custom response when the user either provides an invalid response or no response at all.
When the user says something that fails to trigger any other blocks, this response is given.
When the user doesn't respond at all, this response is given after 7 seconds. The application will wait another 7 seconds for the user's response. If they still don't response, the application will end.