Skip to main content

Syntax

parseCognigyScriptCondition(condition)

Description

Evaluates a CognigyScript expression and returns a true or false value. CognigyScript allows you to embed expressions like {{context.value > 5}} within strings. This function extracts and evaluates such an expression, used in logic checks for Flows, conditions, or custom functions. This function is useful for dynamically checking conditions at run-time based on session data and information from the Input, Context, or Profile objects. Parameters:
  • condition: string — the CognigyScript condition to evaluate.
Returns: boolean | null — the result of the condition, or null if evaluation fails.

Example

Last modified on April 21, 2026