Expression Engine

Overview

In iX Hello Customer v2, the Expression Engine is the rules and logic layer that allows teams to define dynamic behavior using expressions instead of hard‑coded logic.

It is used to:

  • Evaluate conditions

  • Compute values at runtime

  • Control visibility, routing, validation, and automation

  • Personalize customer and agent experiences

Expression Engine V2 offers a secure, JavaScript-native solution for evaluating expressions in customer v2. It operates within isolated Worker threads, ensuring robust hard timeout protection.

Where Expressions Are Used

Location
How expressions are used

Say Node

Dynamic text using {{expression}}

Agent System Prompt

Personalization & context

Menu Prompts

Dynamic options and text

Key Principles:

  • Use standard JavaScript syntax — no custom $helper functions for things JavaScript can do natively

  • Expressions are read-only — they can read variables and compute results but cannot mutate session state

  • Only concise arrow functions are supported (x => x.active) — no block-body arrows (x => { return x.active })

Template Interpolation

Text fields (Say, Agent, Menu prompts) use {{expression}} interpolation:

Syntax

Purpose

Example

{{expression}}

Variable lookup or expression

Hello {{name}}, you have {{items.length}} items

  • {{expression}} — it’s used to indicate where an expression will be evaluated and substituted at runtime.

  • Simple variable names like {{name}} resolve to a variable lookup

  • Complex expressions like {{items.filter(x => x.active).length}} are fully evaluated

  • The double-brace delimiter avoids collision with JSON content in system prompts

  • Non-printable results (objects, arrays) are JSON-stringified; null/undefined produce empty string

Note: For assistance on writing these expressions, use our new and improved v2 of iX Employee v2.


Last updated

Was this helpful?