使用 AI 產生運算式 generate-expression
此AI支援的功能,內建在Journey進階運算式編輯器中,可幫助您從純語言提示產生有效的運算式。
在歷程 進階運算式編輯器 開啟的任何位置,都可以使用它。 例如,當您在 最佳化活動 中設定條件和路由,或當您設定使用自訂日期的等待活動,而您需要dateTimeOnly運算式時。
產生運算式 generate
若要使用AI產生運算式:
-
開啟歷程中的進階運算式編輯器,例如,從分支條件、最佳化活動或具有自訂日期的 等待 活動。
-
在文字欄位中,以純文字描述您要產生的運算式。 例如:
- “來自美國的使用者年齡超過18歲”
- 「過去30天內購買過的客戶」
請參閱此頁面結尾的範例提示以取得想法。
-
按一下 產生 提交您的提示。
助理開始產生對應的運算式,並在產生過程中顯示進度狀態訊息。
note NOTE 如果助理無法產生有效的運算式(例如,如果您的提示參考可用資料來源中不存在的欄位),便會出現錯誤訊息。 發生此情況時,請修訂您的提示,使用歷程設定中可用的欄位名稱和資料來源,然後再次產生。 -
一旦運算式準備就緒,便可在面板中檢閱結果。
-
在套用之前,請按一下
圖示,以檢閱您要求的案例的助理輸出。 -
按一下套用,將產生的運算式直接插入進階運算式編輯器中(與您手動貼入的位置相同)。
-
使用複製控制項來抓取建議的運算式文字,並視需要將其貼到其他位置。
-
提示範例 example-prompts
以下清單僅為提示性想法。 它們不會顯示產生的運算式語法,確切的輸出取決於歷程中定義的欄位和活動。
歷程事件和自訂動作 example-prompts-event-action
- 訂單總價超過100的**
- 「過去7天內建立訂單的事件」
- “事件型別為商務購買的事件”
- “在過去一小時內建立訂單的事件”
- 訂單總價超過200的"事件,且動作回應具有狀態代碼"
等待活動運算式 example-prompts-datetime
當 等待 活動使用自訂日期時,您可以透過在 進階運算式編輯器 中建置dateTimeOnly運算式來定義設定檔何時繼續。 例如,來自設定檔屬性、事件時間戳記、區段資格資料,或計算的目前時間位移。 如需如何設定自訂等待和適用的限制,請參閱自訂等待。
- 「僅將客戶的上次訂購日期作為日期時間」
- 「使用同意電子郵件時間作為僅日期時間」
- 「將區段會籍上次資格取得時間轉換為僅日期時間」
- 「等待節點:2024年聖誕節後一週,僅日期時間」
- 「等待節點:從現在起的30天下午10點,僅日期時間」
- “等到UTC時區的今天上午9點,僅傳回為日期時間”
對象成員資格提示 example-prompts-audience
以簡單的語言說明您要進行的對象成員資格檢查。 例如:
- 「檢視設定檔是否在Gold Loyalty對象中」
相關資源 related
- 使用進階運算式編輯器 — 運算式編輯器介面的概覽和支援的語法。
- 開始使用Journey Optimizer中的產生內容 — 產生AI功能的一般護欄、存取和設定。
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 explains how to use AI in the Journey advanced expression editor to generate valid journey expressions from plain language prompts.
Intents:
- Generate a journey expression from a natural language description using AI
- Apply a generated expression directly into the advanced expression editor with the Apply button
- Use AI-based expression generation inside Optimize activities, Condition activities, and custom-date Wait activities
- Provide example prompts for event-based conditions and
dateTimeOnlywait expressions - Check audience membership using a natural language prompt, such as asking whether a profile is in the Gold Loyalty audience
- Troubleshoot failed generation by revising prompts to reference valid field names and data sources
Glossary:
- Generate expressions with AI: An AI-powered generative capability embedded in the Journey advanced expression editor that converts plain language prompts into valid journey expressions (product-specific)
- Advanced expression editor: The Journey Optimizer interface for writing complex expressions in conditions, Wait activities, and action parameter mapping (product-specific)
- dateTimeOnly: A date-time expression type without timezone, required for custom-date Wait activities (product-specific)
- Optimize activity: A journey activity that supports branching conditions configurable via the advanced expression editor (product-specific)
Guardrails:
- Generative AI guardrails and limitations from the main Generate Content documentation apply to this feature
- If the assistant references fields not present in your journey’s data sources, it returns an error — revise the prompt to use available field names
- The exact generated expression syntax depends on the fields and activities configured in your specific journey
Terminology:
- Canonical name: Generate expressions with AI — Acronym: none — variants: AI expression generation, journey expression generator
- Synonyms: “Generate expressions with AI” = “AI expression generator”
- Do not confuse: Generate expressions with AI (AI-powered generator) ≠ Advanced expression editor (the manual code editor itself)
FAQ:
- Q: Where is Generate expressions with AI available? — It is available wherever the Journey advanced expression editor opens, including Condition activities, Optimize activities, and Wait activities with a custom date.
- Q: What happens if AI cannot generate a valid expression? — An error message appears; you should revise your prompt to use field names and data sources that exist in your journey configuration.
- Q: How do I insert a generated expression into the editor? — Click the Apply button in the assistant panel to insert it directly at the current cursor position in the advanced expression editor.
- Q: Can Generate expressions with AI create
dateTimeOnlyexpressions for Wait activities? — Yes; for example prompting “30 days from now at 10 PM as date time only” generates the appropriatedateTimeOnlyexpression.