Sintaxis avanzada del editor de expresiones syntax
A continuación se enumeran los conceptos básicos de sintaxis al usar el Editor de expresiones avanzadas.
Paréntesis y prioridad de expresión parentheses-and-expression-priority
Los paréntesis se pueden utilizar para hacer que una expresión compleja sea más legible. (<expression>) es el equivalente de <expression>. Los paréntesis también pueden utilizarse para definir el orden de evaluación y la asociatividad.
Las expresiones se evalúan de izquierda a derecha. Se debe aplicar la asociatividad en operadores aritméticos: las multiplicaciones y divisiones tienen prioridad sobre las sumas y las restas. Para imponer un orden específico, se deben añadir paréntesis para delimitar las operaciones. Por ejemplo:
4 + 2 * 10- ‘*’ tiene prioridad sobre ‘+’: 2 * 10 se evalúa → 20
- 4 + 20 → 24
(4 + 2) * 10- Los paréntesis cambian la prioridad: (4 + 2) se evalúa → 6
- 10 → 60
Distinción de mayúsculas y minúsculas case-sensitivity
Estas son las diferentes reglas de distinción de mayúsculas y minúsculas:
- Todos los operadores (y, o, etc.) debe escribirse en minúsculas. Por ejemplo,
<expression1>y<expression2>son una expresión válida, mientras que la expresión<expression1>Y<expression2>no lo son. - Todos los nombres de función distinguen entre mayúsculas y minúsculas. Por ejemplo, inAudience() es válida, mientras que la función INAUDIENCE() no lo es.
- Las referencias de campo y los valores constantes distinguen entre mayúsculas y minúsculas: no son elementos integrados del lenguaje (a diferencia de operadores y funciones), son creados por el usuario final.
Tipo de expresión devuelto returned-expression-type
Según el contexto de uso, el editor de expresiones puede devolver valores diferentes.
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()notINAUDIENCE()) - 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 butINAUDIENCE()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 * 10evaluate to 60 or 24? — It evaluates to 24 because*takes priority over+; use(4 + 2) * 10to get 60. - Q: Can I write
ANDin uppercase in an expression? — No; all operators must be lowercase (and,or,not). - Q: Are function names case-sensitive? — Yes;
inAudience()is valid butINAUDIENCE()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.