AI を使用した式の生成 generate-expression

IMPORTANT
この機能を使用する前に、Journey Optimizer の生成 AI 機能に適用されるガードレールと制限の関連項目をお読みください。

この AI を活用した機能は、ジャーニーの高度な式エディターに組み込まれているため、わかりやすい言葉を使ったプロンプトから有効な式を簡単に生成できます。

この機能は、ジャーニーの​ 高度な式エディター ​が開いている場所で使用できます。 例えば、最適化アクティビティ​内で条件とルーティングを設定する場合、またはカスタム日付を使用し、**待機​**アクティビティを設定し、dateTimeOnly 式が必要となる場合です。

式の生成 generate

AI を使用して式を生成するには:

  1. 分岐条件、最適化​アクティビティ、カスタム日付を使用した​ 待機 ​アクティビティなど、ジャーニーで​ 高度な式エディター ​を開きます。

  2. テキストフィールドに、生成する式をわかりやすい言葉で記述します。 次に例を示します。

    • 「米国の18歳 以上のユーザー」
    • 「過去 30 日間に商品を購入した顧客」

    アイデアについては、このページの最後にあるサンプルプロンプトを参照してください。

  3. 「生成」をクリックしてプロンプトを送信します。

    アシスタントは、対応する式の生成を開始し、生成中に進捗ステータスを示すメッセージを表示します。

    note
    NOTE
    アシスタントが有効な式を生成できない場合(たとえば、プロンプトが参照するフィールドが、使用可能なデータソースに存在していない場合)、エラーメッセージが表示されます。 この場合は、ジャーニー設定で使用可能なフィールド名とデータソースを使用するようにプロンプトを修正してから、再度生成します。
  4. 式の準備ができたら、パネルで結果を確認します。

    • 適用する前に、 プレビューアイコン アイコンをクリックして、リクエストしたシナリオのアシスタント出力を確認します。

    • 「適用」をクリックして、生成された式を高度な式エディター(手動で貼り付ける場合と同じ配置)に直接挿入します。

    • コピーコントロールを使用して、提案された式テキストをコピーし、必要に応じてそれを別の場所にペーストします。

サンプルプロンプト example-prompts

以下のリストは、プロンプトのアイデアの例として参照してください。 生成された式の構文は表示されません。正確な出力は、ジャーニーで定義されたフィールドとアクティビティによって異なります。

ジャーニーイベントとカスタムアクション example-prompts-event-action

  • 「注文価格の合計が 100 を超えるイベント」
  • 「過去 7 日間に注文が作成されたイベント」
  • 「イベントタイプがコマース購入であるイベント」
  • 「過去 1 時間以内に注文が作成されたイベント」
  • 「注文価格の合計が 200 を超え、アクションの応答にステータス コードがあるイベント」

待機アクティビティの式 example-prompts-datetime

待機​アクティビティでカスタム日付を使用する場合に、高度な式エディター​で dateTimeOnly 式を作成し、プロファイルを続行するタイミングを定義します。 例えば、プロファイル属性、イベントタイムスタンプ、セグメントの選定データから、または現在の時間から計算されたオフセットなどがあります。 カスタム待機と適用可能な制限の設定方法については、カスタム待機を参照してください。

  • 「顧客の最終注文日を日時としてのみ使用」
  • 「同意に関するメールの時間を日時としてのみ使用」
  • 「セグメントメンバーシップの最終選定時刻を日時のみに変換」
  • 「待機ノード:2024年クリスマス後 1 週間(日時のみ)」
  • 「待機ノード:現在から 30 日後の午後 10 時(日時のみ)」
  • 「UTC タイムゾーンで今日の午前 9 時まで待機し、日時のみを返す」

オーディエンスメンバーシップのプロンプト example-prompts-audience

オーディエンスメンバーシップのチェック方法をわかりやすい言葉で説明します。 次に例を示します。

  • 「プロファイルがゴールドロイヤルティオーディエンスに含まれているかどうかをチェックする」
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 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 dateTimeOnly wait 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 dateTimeOnly expressions for Wait activities? — Yes; for example prompting “30 days from now at 10 PM as date time only” generates the appropriate dateTimeOnly expression.
recommendation-more-help
journey-optimizer-help