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

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

ジャーニーの高度なエクスプレッションエディターに組み込まれたこのAIを活用した機能は、平易な言語プロンプトから有効なエクスプレッションを生成するのに役立ちます。

ジャーニー 詳細式エディター​が開いている場所で使用できます。 例えば、Optimize アクティビティ​内で条件とルーティングを設定する場合、またはカスタム日付を使用し、dateTimeOnly式が必要なWait ​​アクティビティ ​を設定する場合などです。

式の生成 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