고급 표현식 편집기 구문 syntax

고급 표현식 편집기를 사용할 때의 구문 기본 사항은 아래에 나와 있습니다.

괄호 및 표현식 우선 순위 parentheses-and-expression-priority

괄호는 복잡한 표현식을 더 읽기 쉽게 하는 데 사용할 수 있습니다. (<표현식>)​은(는) <표현식>​과(와) 동일합니다. 괄호는 또한 평가 순서 및 연관성을 정의하는 데 사용될 수 있다.

표현식은 왼쪽에서 오른쪽으로 평가됩니다. 산술 연산자에 대한 연관성을 적용해야 합니다. 곱과 나눗셈은 덧셈과 뺄셈보다 우선합니다. 특정한 명령을 부과하기 위해서는 반드시 괄호를 추가하여 작업을 구분해야 한다. 예:

표현식
평가
4 + 2 * 10
  • '*'가 '+'보다 우선함: 2 * 10은 20→ 평가됩니다.
  • 4 + 20 → 24
(4 + 2) * 10
  • 괄호는 우선 순위를 변경합니다. (4 + 2)는 6→ 평가됩니다.
  • 6 * 10 → 60

대/소문자 구분 case-sensitivity

다른 대소문자 구분 규칙은 다음과 같습니다.

  • 모든 연산자(및, 또는 등) 소문자로 작성해야 합니다. 예를 들어 <expression1>및<expression2>​은(는) 올바른 식이지만 <expression1>및<expression2> 식은 올바른 식이 아닙니다.
  • 모든 함수 이름은 대소문자를 구분합니다. 예를 들어 inAudience()​은(는) 유효하지만 INAUDIENCE() 함수는 유효하지 않습니다.
  • 필드 참조 및 상수 값은 대소문자를 구분합니다. 연산자 및 함수와 달리 언어의 기본 제공 요소가 아니며, 최종 사용자가 작성합니다.

반환된 표현식 유형 returned-expression-type

사용 컨텍스트에 따라 표현식 편집기에서 다른 값을 반환할 수 있습니다.

고급 표현식 편집기 사용
반환된 표현식 유형이 필요합니다.
조건(데이터 소스 조건, 날짜 조건)
부울
사용자 지정 타이머
dateTimeOnly
작업 매개 변수 매핑
Any
AI Knowledge Reference

This section contains structured knowledge intended to support interpretation, retrieval, and question answering related to this topic.

For complete understanding, this information should be combined with the documentation on this page. Neither source is intended to stand alone; the page describes the feature, while this section provides additional context that helps disambiguate terminology, intent, applicability, and constraints.

  • TL;DR: This page covers the core syntax rules of the Journey advanced expression editor — operator precedence with parentheses, case sensitivity for operators and functions, and the expected return type for each editor context.

Intents:

  • Control expression evaluation order by wrapping sub-expressions in parentheses
  • Write operators (and, or, not) in lowercase to avoid syntax errors
  • Use correctly cased function names (e.g. inAudience() not INAUDIENCE())
  • Understand that conditions must return a boolean, custom timers must return dateTimeOnly, and action parameter mappings can return any type

Glossary:

  • Expression priority: The order in which operators are evaluated; multiplications and divisions take priority over additions and subtractions (product-specific)
  • Case sensitivity: In the advanced editor, operators must be lowercase, function names are case-sensitive, and field references are case-sensitive as authored by the user (product-specific)
  • dateTimeOnly: The return type required for custom timer (Wait activity) expressions; represents a date-time without a timezone (product-specific)

Guardrails:

  • Operators (and, or, not, etc.) must be written in lowercase — uppercase variants are invalid
  • All function names are case-sensitive — inAudience() is valid but INAUDIENCE() is not
  • Arithmetic follows standard precedence: * and / evaluate before + and -; use parentheses to override
  • Conditions always return a boolean; custom timers always return dateTimeOnly

Terminology:

  • Canonical name: Advanced Expression Editor Syntax — Acronym: none — variants: expression syntax, editor syntax
  • Synonyms: “expression priority” = “operator precedence”; “parentheses” = “brackets” (in expression context)
  • Do not confuse: operator case sensitivity (operators must be lowercase) ≠ field reference case sensitivity (field names are user-authored and case-sensitive as written)

FAQ:

  • Q: Does 4 + 2 * 10 evaluate to 60 or 24? — It evaluates to 24 because * takes priority over +; use (4 + 2) * 10 to get 60.
  • Q: Can I write AND in uppercase in an expression? — No; all operators must be lowercase (and, or, not).
  • Q: Are function names case-sensitive? — Yes; inAudience() is valid but INAUDIENCE() is not.
  • Q: What type must a condition expression return? — A boolean.
  • Q: What return type is required for a custom Wait activity timer expression? — dateTimeOnly.

Personas:

  • developer: Can write Advanced expression editor expressions that are evaluated from left to right, with multiplications and divisions taking priority over additions and subtractions. Can use parentheses to make a complex expression more readable and to define the evaluation order and associativity. Can write all operators in lowercase, as they should be: <expression1> and <expression2> is valid, whereas <expression1> AND <expression2> is not. Can use function names, which are all case sensitive: inAudience() is valid, whereas INAUDIENCE() is not. Can author field references and constant values, which are case sensitive and are not built-in elements of the language. Can match the returned expression type to the editor usage: boolean for a condition, dateTimeOnly for a custom timer, Any for action parameters mapping. The page states that parentheses must be added to delimit the operations to impose a specific order: (4 + 2) * 10 evaluates to 60, whereas 4 + 2 * 10 evaluates to 24. Where: “Advanced expression editor syntax”.

Onboarding:

  • Level: Experienced
  • First minimal step: Add parentheses to delimit the operations to impose a specific order, for example (4 + 2) * 10.
  • Success check: The expression (4 + 2) * 10 evaluates to 60 because the parentheses change the priority, whereas 4 + 2 * 10 evaluates to 24.
  • Next: When using the Advanced expression editor, to which the syntax basics of this page apply: Advanced expression editor
recommendation-more-help
journey-optimizer-help