Steps and Actions
Every Botnex story node is composed of two fundamental components: Steps and Actions. Understanding these components is essential for building effective conversational flows, as they control how your bot communicates with users and navigates through conversations.
Overview
Steps are responsible for creating output or mutating the state of the conversation. They define what your bot says, how it processes information, and how it manages conversational context.
Actions create links to other parts of the flow. They serve as decision points that determine where the conversation goes next based on user input, recognized intents, or conditional logic.
Steps
Steps are the building blocks that define what happens within a story node. Each step type serves a specific purpose in managing conversation flow and user interaction.
Generator Step
What is it?
The Generator Step creates dynamic content based on templates, variables, or external data sources. It allows your bot to generate personalized responses that adapt to the conversation context.
How to use it:
- Create personalized messages using variables and user data
- Generate dynamic content from templates or external APIs
- Build responses that change based on conversation history or user preferences
- Implement content that adapts to different user segments or contexts
Best practices:
- Use clear variable naming conventions for maintainability
- Test generators with different data inputs to ensure consistent output
- Keep generated content concise and relevant to the conversation flow
- Consider fallback content for cases where dynamic generation fails
Example use cases:
- Personalizing greetings with user names
- Generating product recommendations based on user preferences
- Creating dynamic reports or summaries
- Building adaptive content for different user types
Custom Payload Step
What is it?
The Custom Payload Step allows you to send structured data or specialized content formats to users. This step is particularly useful for integrations with external systems or when you need to deliver content in specific formats.
How to use it:
- Send JSON data for rich integrations with external platforms
- Deliver structured content that requires specific formatting
- Pass data to webhooks or third-party services
- Create custom message formats for specialized channels
Best practices:
- Validate your payload structure before deployment
- Document custom payload formats for team collaboration
- Test payloads with target systems to ensure compatibility
- Use meaningful field names and clear data structures
Example use cases:
- Sending card layouts for rich messaging platforms
- Delivering structured data to CRM systems
- Creating custom widget content for web interfaces
- Passing formatted data to analytics platforms
Message Step
What is it?
The Message Step is the most common step type, used to send text messages, rich content, buttons, and other user-facing content. It forms the core of your bot's communication with users.
How to use it:
- Send text messages to users
- Create rich content with images, videos, and links
- Add buttons and quick replies for user interaction
- Build carousel cards and other structured content formats
Best practices:
- Keep messages concise and scannable
- Use clear, conversational language that matches your brand voice
- Leverage buttons and quick replies to guide user actions
- Test message rendering across different platforms and devices
Example use cases:
- Sending welcome messages and greetings
- Asking questions and collecting user input
- Providing information and instructions
- Presenting options through buttons and quick replies
Parameter Step
What is it?
The Parameter Step manages conversation variables and data storage. It allows you to capture, store, and manipulate information throughout the conversation flow.
How to use it:
- Store user responses and conversation data
- Set and update variables for use in other steps
- Capture entity values from user messages
- Manage conversation state and context information
Best practices:
- Use descriptive parameter names that clearly indicate their purpose
- Initialize parameters with default values when appropriate
- Document parameter usage for team collaboration
- Clean up unused parameters to maintain flow efficiency
Example use cases:
- Storing user preferences and settings
- Capturing form data and user responses
- Managing conversation state across multiple flows
- Tracking user progress through multi-step processes
Actions
Actions determine where the conversation goes next by creating connections to other parts of your flow. They evaluate conditions and user input to guide the conversational journey.
Intent Action
What is it?
The Intent Action recognizes and responds to user intentions, creating pathways to different parts of your flow based on what the user wants to accomplish.
How to use it:
- Connect user intentions to appropriate conversation paths
- Create edges that link to other nodes when specific intents are recognized
- Handle multiple intents within a single node
- Implement fallback behaviors for unrecognized intents
Best practices:
- Map intents to clear, logical conversation paths
- Use descriptive intent names that reflect user goals
- Test intent recognition with various user input variations
- Provide meaningful responses when intents are not recognized
Example use cases:
- Routing users to product information when they express interest
- Connecting support requests to appropriate help flows
- Navigating users to booking systems when they want to schedule
- Directing users to account management when they mention profile updates
Condition Action
What is it?
The Condition Action evaluates logical conditions based on variables, user data, or conversation context to determine the next step in the flow.
How to use it:
- Create conditional branches based on variable values
- Implement logic gates that route conversations based on user characteristics
- Build dynamic flow paths that adapt to conversation state
- Handle different scenarios based on collected data