> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.meetgail.com/platform/workflows/guides-and-recipes/recipes/branch-on-a-value/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.meetgail.com/_mcp/server. # Branch on a Value > Evaluate a condition and send the run down a different path based on the result. Sometimes a run should do one thing when a value looks a certain way and something else otherwise, such as only enrolling approved leads or routing high scores to a different step. You evaluate the condition, then route on it. ## Nodes involved * [Check](/platform/workflows/node-reference/logic-and-flow/check) evaluates conditions in order and returns one label: the outcome of the first match, or the default outcome. * [Conditional](/platform/workflows/node-reference/logic-and-flow/conditional) sends the run down one path or another by comparing that label. ## How to build it ### Evaluate the condition Add a Check step. Pair each condition with the label it should return. For example, when an earlier step reported an approved status, return `APPROVED`, and set the default outcome to `DECLINED`. The condition reads an earlier step's output. The value Check returns is the label, not a boolean. ### Route on the result Add a Conditional step after the Check. Compare the label, for example `Decision is APPROVED`, and send the run down the matching path. Build one set of steps for the approved case and another for everything else. > **Note** > > Keep the condition simple and readable. If you find yourself testing several > things at once, it is often clearer to use more than one Check. ## Related #### [Check](/platform/workflows/node-reference/logic-and-flow/check) Every option for evaluating a condition. #### [Conditional](/platform/workflows/node-reference/logic-and-flow/conditional) Every option for routing a run down a path. #### [Expressions](/platform/workflows/core-concepts/expressions/using-expressions-in-nodes) How to write the condition itself. > Documentation for Gail, the AI platform for financial services. Learn how to set up GailGPT and Gail Agent to automate customer communications for insurance, banking, and finance.