/
Base Intents

Base Intents

The Base Intents module adds handling for necessary intents such as the welcome intent to a project.

Dependencies

The Base Intents module is dependent on the following modules:

Intents Handled

Launch

The module handles the launch intent by checking for a launch flow ID in custom data (at the path msg.payload.originalDetectIntentRequest.payload.customData.launchFlowId) or the settings (at the path flow.launch.id). If there is a launch flow specified, it will attempt to launch that flow, otherwise, it will give a standard welcome message based on the project description.

If both are specified, the custom data launch flow ID will take precedence. If msg.launchFlowId is already set by the afterLaunch handler, that will take precedence over both.

None Intent

The module handles the none intent for no state and any state. When it fires, the registered fallback handler will fire. A default fallback handler is registered that will respond with the message “Sorry, I didn't understand you. Could you repeat that?“.

Handlers

Handlers for the following events can be registered by calling baseIntents.registerHandler and passing it the handler key:

afterLaunch

This handler is executed after the launch node has fired but before the launch flow (or default message) is provided. The handler can be asynchronous and modifications made to the msg object by the handler will be carried forward. The handler can set msg.launchFlowId to force a particular launch flow.

The handler is passed the following parameters:

  • msg (object): The Node-RED message object.

fallback

This handler is executed after the none intent has fired.

The handler is passed the following parameters:

  • msg (object): The Node-RED message object.

Related content

Prehook nodes
Prehook nodes
More like this
3.2.1 Launch Node
3.2.1 Launch Node
More like this
Nomenclature of auto generated Intents and Slots
Nomenclature of auto generated Intents and Slots
More like this
3.1.5 Default Nodes in Experience Designer
3.1.5 Default Nodes in Experience Designer
More like this
3.2.27 State Management with Intents
3.2.27 State Management with Intents
More like this
Flow Manager
Flow Manager
More like this