graph LR
User_Defined_Skill_Logic["User-Defined Skill Logic"]
Application_Initializer["Application Initializer"]
Request_Dispatcher["Request Dispatcher"]
Request_Mappers["Request Mappers"]
Parameter_Extractor_Preparer["Parameter Extractor/Preparer"]
Response_Builder["Response Builder"]
Application_Initializer -- "defines entry points for" --> User_Defined_Skill_Logic
Request_Dispatcher -- "passes control to" --> Request_Mappers
Request_Mappers -- "invokes" --> User_Defined_Skill_Logic
Request_Mappers -- "utilizes" --> Parameter_Extractor_Preparer
Parameter_Extractor_Preparer -- "provides arguments to" --> User_Defined_Skill_Logic
User_Defined_Skill_Logic -- "uses" --> Response_Builder
click User_Defined_Skill_Logic href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/flask-ask/User_Defined_Skill_Logic.md" "Details"
The User-Defined Skill Logic subsystem is the core of any Flask-Ask application, encapsulating the developer's custom business logic for handling Alexa interactions. It operates within a framework extension pattern, where flask-ask provides the scaffolding and the developer fills in the specific intent handling.
User-Defined Skill Logic [Expand]
This is the application-specific business logic implemented by the developer. It contains the Python functions that handle specific Alexa intents and events, orchestrate interactions with external services, perform data processing, and determine the appropriate voice response.
Related Classes/Methods:
The Ask class instance serves as the primary interface for developers to integrate Flask-Ask with their Flask application. It's used to define and register the entry points (via decorators) for the User-Defined Skill Logic.
Related Classes/Methods:
This component is responsible for receiving the incoming Alexa request (as a Flask HTTP request), performing initial processing (like signature verification), and then handing off the parsed request to the appropriate mappers for further routing.
Related Classes/Methods:
These components are central to routing. They analyze the incoming Alexa request (e.g., intent name, request type like LaunchRequest, IntentRequest, AudioPlayer.PlaybackStarted) and identify the corresponding User-Defined Skill Logic function to invoke.
Related Classes/Methods:
flask_ask.core._map_intent_to_view_func:822-840flask_ask.core._map_player_request_to_func:842-851flask_ask.core._map_purchase_request_to_func:853-866
This component is responsible for extracting relevant data (e.g., slot values, session attributes, request body parameters) from the raw Alexa request and preparing them as arguments to be passed to the invoked User-Defined Skill Logic function.
Related Classes/Methods:
This component provides the API (e.g., ask.tell, ask.ask, ask.reprompt) that the User-Defined Skill Logic uses to construct and return a structured, Alexa-compatible JSON response, including speech output, cards, and directives.
Related Classes/Methods: