功能 functions
函数是Adobe Journey Optimizer中动态旅程表达式的构建块。 它们使您能够实时转换、计算、验证和处理数据,以创建个性化的客户体验。 通过将60多种功能划分到直观的类别中,您可以在客户历程的每个步骤中构建复杂的条件、执行复杂的计算并做出数据驱动型决策。
了解函数
历程表达式中的函数遵循一致的语法模式:
<function name>(<expression as param 1>, <expression as param 2>, … ,<expression as param N>)
关键特性:
- 多个签名:函数可以有不同的签名(不同的有序参数集)以适应不同的用例
- 特定于类型的返回:每个函数都有一个特定的返回类型(字符串、整数、布尔值、日期、列表等)
- Zero到N参数:函数可以接受0-N表达式作为排序参数,这提供了使用它们的灵活性
为何使用函数?
函数使您能够:
- 创建动态条件 — 基于实时数据评估的分支旅程路径
- 大规模个性化 — 使用客户数据和行为分析定制内容和体验
- 自动执行决策 — 无需手动干预即可构建智能逻辑
- 转换数据 — 转换、格式化和处理数据类型以确保兼容性
- 执行计算 — 执行数学运算和统计分析
- 验证输入 — 在执行操作之前检查数据质量和完整性
按类别列出的函数
浏览按主要目的组织的功能,快速找到符合您需求的合适工具。
Adobe Experience Platform aep-functions
受众分段和定位
评估受众成员资格,以根据Adobe Experience Platform中定义的客户区段创建个性化的历程路径。
查看Adobe Experience Platform函数详细信息→
聚合函数 aggregation-functions
统计计算和数据汇总
对值集执行计算以得出平均值、计数、总和以及最小/最大值等见解。 对于数据驱动型决策至关重要。
转换函数 conversion-functions
数据类型转换
在不同类型(字符串、整数、小数、布尔值、日期、持续时间)之间转换数据,以确保操作和数据源之间的兼容性。
日期函数 date-functions
日期和时间操作
使用日期、时间和时区创建基于时间的条件、计划操作和执行临时计算。
列表函数 list-functions
集合操作和分析
过滤、排序、转换和分析数组和列表以处理复杂的数据结构并执行集合操作,如交集、并集和差集。
数学函数 math-functions
数学运算
执行数值计算和转换,以实现数据处理和业务逻辑。
字符串函数 string-functions
文本操作和验证
处理、转换、搜索和验证文本数据,用于动态内容创建和条件逻辑。
后续步骤
现在您已了解可用的功能,接下来请探索:
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 is a categorized reference of all 60+ built-in functions available in the Journey advanced expression editor, covering aggregation, conversion, date/time, list, math, string, and Adobe Experience Platform audience functions.
Intents:
- Identify the right function for a task by browsing the categorized function tables
- Transform data types between string, integer, decimal, boolean, date, and duration using conversion functions
- Perform date-based filtering with functions like
inLastDays,inNextHours,nowWithDelta, anddateDiff - Manipulate and validate string values using functions like
contain,replace,split, andtrim - Perform statistical calculations on collections using aggregation functions like
count,avg,sum, anddistinctCount - Check audience membership in journey conditions using the
inAudiencefunction
Glossary:
- Aggregation functions: Functions that compute a single value (count, sum, average, min, max) from a collection of values (product-specific)
- Conversion functions: Functions that cast a value from one data type to another (e.g.
toString,toDateTime,toDuration) (product-specific) - Date functions: Functions for working with date, time, and timezone values in journey expressions (product-specific)
- List functions: Functions for filtering, sorting, and analyzing array/collection data (product-specific)
- inAudience: A function that checks whether a profile belongs to a specified Adobe Experience Platform audience segment (product-specific)
Guardrails:
- Functions follow a consistent syntax:
functionName(param1, param2, ...) - A function may have multiple signatures (different parameter sets) to handle different use cases
- Each function has a fixed return type — ensure the return type matches what the expression context expects
- The functions available in the Journey expression editor differ from those in the personalization editor
Terminology:
- Canonical name: Functions — Acronym: none — variants: built-in functions, expression functions
- Synonyms: “aggregation functions” = “statistical functions”; “conversion functions” = “type casting functions”
- Do not confuse: journey expression functions ≠ personalization editor functions (different sets)
FAQ:
- Q: How many functions are available in the Journey expression editor? — Over 60 functions organized across categories including aggregation, conversion, date, list, math, string, and Adobe Experience Platform.
- Q: How do I check if a profile belongs to an audience in a journey condition? — Use the
inAudiencefunction with the audience identifier. - Q: What function should I use to get the current date and time offset by a number of days? — Use
nowWithDelta(N, "days")to get a dateTime offset from the current time. - Q: How can I calculate the difference between two dates? — Use the
dateDifffunction. Both parameters must be the same type:dateOnlyparameters return the difference in days, whiledateTimeOnlyanddateTimeparameters return the difference in milliseconds. - Q: Can a function return different types depending on how it is called? — A function has a specific return type per signature, but a single function name can have multiple signatures with different parameter sets and return types.
- Q: What is the difference between
countandcountWithNull? —countcounts only non-null elements;countWithNullcounts all elements including nulls.