Route based on field conditions

Recipe Tools

What it does

When a Recipe Function receives a call, this automation evaluates field conditions and logs results to the job report. Each branch logs a message so someone can see which condition was met.

Who it's for

Engineering teams who need conditional routing based on field values within a Recipe Function.

How teams use this

Route calls by status field

Check if a status field is true to determine which branch runs. Log the outcome so someone debugging the function can see which path executed and why.

Validate input before processing

Add validation logic to check that required fields exist and have valid values before the function proceeds. Log failures so errors are caught early in execution.

Audit function execution paths

Log each branch taken so someone can audit which conditions were evaluated and which path the function took. This helps trace issues in production.

Handle multiple field combinations

Set up conditions to check multiple field combinations so different business logic runs based on the data received. Log each combination so someone can verify the routing worked correctly.

How it works

  1. Receive the function call. A Recipe Function is called in real-time with input data that includes Field 1 and Field 2 for evaluation.
  2. Check if Field 1 is true. Evaluate whether Field 1 from the function call meets the true condition. If yes, log that path to the job report.
  3. Check if Field 2 is not true. If Field 1 was false, evaluate whether Field 2 is not true. If yes, log that alternate path to the job report.
  4. Log the matching condition. Write a message to the job report that identifies which field condition was met, so the execution path is visible.