{"id":148,"date":"2026-10-17T14:16:04","date_gmt":"2026-10-17T14:16:04","guid":{"rendered":"http:\/\/plugin-docs.com\/?post_type=doc&#038;p=148"},"modified":"2026-10-18T11:38:14","modified_gmt":"2026-10-18T11:38:14","slug":"conditions-branching","status":"publish","type":"doc","link":"https:\/\/dragwyb.com\/docs\/conditions-branching\/","title":{"rendered":"Conditions and Branching"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">AI Agent Workflows includes branching nodes that can direct execution to a selected step based on workflow data. The <strong>Condition<\/strong> node evaluates one or more rules. The <strong>Router<\/strong> node compares a value with configured route values. These are routing decisions, not automatic recovery from a failed action.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Choose a branching node<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><strong>Condition:<\/strong> Add condition rows, select a value to check, choose a comparison, and select the step to run when that condition matches. Conditions are evaluated in order, and the first matching condition selects the branch.<\/li>\n\n\n<li><strong>Router:<\/strong> The action schema defines a value to check, matching rules, and an optional default target. Route matching is case-insensitive and compares trimmed text values. The current builder source does not provide a dedicated editor control for the Router&#8217;s <strong>Matching rules<\/strong> field, so verify that the route configuration is available in your installed build before relying on this node.<\/li>\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For configurable checks on missing or empty values, start with the <strong>Condition<\/strong> node and its basic operators. For details, see <a href=\"https:\/\/dragwyb.com\/docs\/docs\/ai-agent-workflows-by-dragwyb\/handle-missing-workflow-data\/\">Handle Missing Workflow Data<\/a> and <a href=\"https:\/\/dragwyb.com\/docs\/docs\/ai-agent-workflows-by-dragwyb\/configure-workflow-fallback-paths\/\">Configure Workflow Fallback Paths<\/a>.<\/p>\n\n\n\n\n<p class=\"wp-block-paragraph\">Screenshot to add: Workflow editor with Condition and Router nodes<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Understand the alternative route<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Condition node includes a <strong>No Condition Matched<\/strong> target. Select a step for this target if the workflow should continue when none of its condition rows matches. If no target is configured, the node returns an empty branch target; it does not automatically choose another action.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A branch that is not selected is different from a node execution error. Error behavior is controlled separately by the plugin&#8217;s node-failure setting, and it is not a substitute for a configured condition branch.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Route workflow execution based on conditions and data checks.<\/p>\n","protected":false},"author":0,"featured_media":0,"parent":0,"menu_order":0,"template":"","class_list":["post-148","doc","type-doc","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/doc\/148","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/doc"}],"about":[{"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/types\/doc"}],"version-history":[{"count":3,"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/doc\/148\/revisions"}],"predecessor-version":[{"id":882,"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/doc\/148\/revisions\/882"}],"wp:attachment":[{"href":"https:\/\/dragwyb.com\/docs\/wp-json\/wp\/v2\/media?parent=148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}