Rules & Conditions

Learn how to configure the conditional logic and scoring rules that route workflow execution and produce automated decisions.

Rules and conditions are the logic layer in RiskOS™ workflows. They evaluate signals from enrichments, input data, and computed values to determine how an evaluation is routed and what decision is reached.


Conditions

A condition evaluates one or more expressions to true or false and branches the workflow accordingly.

Condition structure

Each condition expression has three parts:

PartDescriptionExample
Left operandThe value to evaluatesigma_identity_fraud.score
OperatorThe comparison logicgreater than
Right operandThe threshold or reference value0.85

Operand sources

SourceDescription
Input dataFields from the evaluation request payload
Enrichment dataValues returned by Enrichment steps
Output fieldsResults from Transformation, Condition, Rule Scorecard, or Tag steps
AggregationVelocity counters and entity-level aggregations

Operators

CategoryOperators
Equality / comparisonequals, not equals, greater than, less than, greater or equal, less or equal
Stringcontains, not contains, starts with, ends with, matches regex, in, not in
Arraycontains, not contains, has any of, has all of
Listin Allow List, in Deny List
Presenceis set, is not set
Reason codehas reason code, does not have reason code

Grouping

Combine multiple conditions using:

  • AND — all conditions must be true
  • OR — at least one condition must be true

The workflow follows the True path if the condition group evaluates to true, and the False path otherwise.


Rule types

RiskOS™ uses the term "rule" in several workflow step contexts. Each serves a different purpose:

Rule typeStepPurposeOutput
Condition ruleConditionRoutes the workflow based on boolean logicTrue/False branch
Score ruleRule ScorecardAssigns a numeric risk score (-100 to 100) when a condition is metSummed score value
Decision ruleDecision RulesCombines a condition with a decision outcome in a single stepACCEPT, REJECT, REVIEW, or step-level values (RESUBMIT, CANCEL), or Manual Review
Matrix ruleMatrix RuleEvaluates a tabular set of conditionsRow-level match
Grouped rulesGrouped RulesEvaluates collections of related rules togetherGroup-level outcome

Rule Scorecards

A Rule Scorecard assigns numeric risk scores based on rule evaluations:

  1. Each score rule defines a condition and a score value (-100 to 100).
  2. Rules that evaluate to true contribute their score.
  3. The final output is the sum of all matching scores.
  4. Downstream Condition or Decision steps reference the scorecard output to make routing decisions.

Decision Rules

A Decision Rules step combines condition evaluation with decision assignment in a single step:

  • Each rule maps a condition to an outcome — the standard API decision values (ACCEPT, REJECT, REVIEW), step-level values (RESUBMIT, CANCEL), or Manual Review routing.
  • Rules are evaluated top-to-bottom; the first matching rule applies.
  • A fallback (Else) path handles cases where no rule matches — it can either continue without a decision or assign a default decision.

This is the only workflow step that can both issue a final decision and continue execution via a fallback path.


How conditions and rules drive decisions

flowchart TD
    ENRICH["Enrichment signals"] --> COND["Condition step"]
    COND -->|True| SCORE["Rule Scorecard"]
    COND -->|False| DR["Decision Rules"]
    SCORE --> THRESHOLD{"Score > threshold?"}
    THRESHOLD -->|Yes| ACCEPT["Decision: ACCEPT"]
    THRESHOLD -->|No| REVIEW["Decision: REVIEW"]
    DR -->|Rule 1 match| REJECT["Decision: REJECT"]
    DR -->|No match| FALLBACK["Fallback: continue"]

Related concepts