Security in Enterprise AI

8. Logic Nodes

8. Logic Nodes

Learn how to route users and data with precision or flexibility using logic nodes like If/Else and AI-based routing.

To build responsive AI workflows, you need smart routing logic. In this video, you’ll learn how to use If/Else nodes for rule-based decisions and AI Routing nodes for more context-aware, flexible choices. Whether you’re triaging support tickets or customizing agent behavior, logic nodes let you guide each interaction with precision—or let the AI decide.

Summary

  • Understand the two main routing tools in StackAI:


    • If/Else node for deterministic, rule-based logic

    • AI Routing node for intent-based, flexible decisions


  • Configure If/Else using:


    • Exact match, contains, starts with, or ends with logic


  • Best for structured data like support categories or form responses

  • Example: route messages with “refund” to the billing team

  • Use AI Routing when input is ambiguous, varied, or unstructured

  • Set natural language rules like:


    • “If message is about technical issues”

    • “If user asks about pricing”


  • Create multiple paths from one node based on inferred intent

  • Combine AI Routing with file, input, or LLM nodes for layered logic

  • Use both tools in one workflow to handle clear and complex scenarios

  • Quick guide:


    • Use If/Else when input is predictable or precision is needed

    • Use AI Routing when language varies and context matters


  • Best practices: test routing logic with real user data to catch edge cases

  • Build smarter, more responsive flows with combined routing strategies

  • Next up: explore more components to keep scaling your AI workflows