函數 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.