高度な式エディターの操作 about-the-advanced-expression-editor

ジャーニーの高度な式エディターを使用すると、インターフェイスの様々な画面で高度な式を作成できます。 例えば、ジャーニーを設定して使用する場合や、データソース条件を定義する場合に、式を作成できます。

また、特定のデータ操作が必要なアクションパラメーターを定義する必要がある場合にも利用できます。 イベントから取得したデータやデータソースから取得した追加情報を活用できます。 ジャーニーでは、表示されるイベントフィールドリストは状況に応じて異なり、ジャーニーに追加されるイベントに応じて変化します。

高度な式エディターには、値を操作し、特にニーズに合った式を定義できる一連のビルトインの関数と演算子が用意されています。 また、高度な式エディターを使用すると、外部データソースパラメーターの値を定義したり、マップフィールドやコレクションを操作したりできます。

NOTE
ジャーニーの高度な式エディターで使用できる関数や機能は、パーソナライゼーションエディターで使用できる関数や機能とは異なります。

高度な式エディターへのアクセス accessing-the-advanced-expression-editor

高度な式エディターは、次の目的で使用できます。

可能な場合は、詳細設定モードシンプルモード​ボタンを使用して 2 つのモードを切り替えることができます。 シンプルモードについてはここで説明されています。

NOTE
  • 条件は、単純な式エディターまたは高度な式エディターで定義できます。 常にブール型を返します。

  • アクションパラメーターは、フィールドを選択するか、高度な式エディターを使用して定義できます。 式に応じて特定のデータタイプを返します。

高度な式エディターには、様々な方法でアクセスできます。

  • データソース条件を作成した場合は、詳細設定モード​をクリックして高度なエディターにアクセスできます。

  • カスタムタイマーを作成すると、高度なエディターが直接表示されます。

  • アクションパラメーターをマッピングする場合、詳細設定モード​をクリックします。

NOTE
自然言語プロンプトを使用してジャーニー式を生成するには、高度なエディター内のAI コントロールを使用して、AI​を使用して式を生成(公開ベータ版)します。

インターフェイスの確認 discovering-the-interface

この画面では、式を手動で記述できます。

画面の左側には、使用可能なフィールドと関数が表示されます。

  • イベント:インバウンドイベントから受信したフィールドの 1 つを選択します。 表示されるイベントフィールドリストは状況に応じて異なり、ジャーニーに追加されるイベントに応じて変化します。 詳細情報

    note caution
    CAUTION
    エクスペリエンスイベントを使用した式の作成はサポートされていません。 エクスペリエンスイベントを使用して式/ロジックを作成する際の代替アプローチとベストプラクティスについて詳しくは、こちらを参照してください。
  • オーディエンスオーディエンスの選定​イベントをドロップした場合は、式で使用するオーディエンスを選択します。 詳細情報

  • データソース:データソースのフィールドグループにあるフィールドリストから選択します。 詳細情報

  • ジャーニーのプロパティ:このセクションでは、特定のプロファイルのジャーニーに関連するテクニカルフィールドが再グループ化されます。 詳細情報

  • 関数:複雑なフィルタリングを実行できるビルトインの関数のリストから選択します。 関数はカテゴリ別に整理されています。 詳細情報

オートコンプリートメカニズムにより、コンテキストに応じた候補が表示されます。

構文検証メカニズムは、コードの整合性をチェックします。 エラーはエディターの上部に表示されます。

TIP
高度な式エディターで条件を作成する場合は、式に非表示の文字や印刷不可能な文字が含まれていないことを確認します。 さらに、解析エラーを回避するために、単一行の式を使用します。

高度な式エディターで条件を作成する場合のパラメーターの必要性

パラメーターの呼び出しが必要な外部データソースからフィールドを選択すると(このページを参照)、新しいタブが右側に表示されて、このパラメーターを指定できるようになります。 パラメーター値は、ジャーニー内に配置されたイベントまたは Experience Platform データソースから取得できます(他の外部データソースから取得することはできません)。 例えば、天候関連のデータソースでは、頻繁に使用されるパラメーターは「市区町村」です。 そのため、この市区町村パラメーターを取得する場所を選択する必要があります。 関数をパラメーターに適用して、形式の変更や連結を実行することもできます。

より複雑なユースケースの場合、データソースのパラメーターをメイン式に含めるには、「params」キーワードを使用して、そのパラメーター値を定義できます。 このページを参照してください。

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 introduces the Journey advanced expression editor — its access points, interface panels, and capabilities for building complex conditions, custom wait timers, and action parameter mappings using events, data sources, functions, and operators.

Intents:

  • Access the advanced expression editor from a data source condition, custom wait activity, or action parameter mapping
  • Build advanced boolean conditions using event fields, data source fields, audience membership, and journey properties
  • Switch between simple mode and advanced mode when configuring conditions
  • Reference external data source parameters directly within the main expression using the params keyword
  • Use AI-powered expression generation to create expressions from natural language prompts

Glossary:

  • Advanced expression editor: The Journey Optimizer code editor for writing complex expressions; distinct from the simpler point-and-click condition editor (product-specific)
  • Simple mode: A point-and-click condition editor; less flexible than the advanced editor but easier for non-developers (product-specific)
  • Journey properties: Technical fields about the journey instance (ID, version, errors, current node) accessible in the expression editor (product-specific)
  • Generate expressions with AI: An AI-powered capability (public beta) inside the advanced editor that generates expressions from plain language prompts (product-specific)

Guardrails:

  • Creating expressions using experience events directly is not supported — use alternative approaches such as computed attributes
  • Conditions always return a boolean type regardless of editor mode
  • Expressions must not contain hidden or non-printable characters, and should use single-line format to avoid parsing errors
  • External data source parameter values can only come from journey events or the Experience Platform data source — not from other external data sources
  • The advanced expression editor functions differ from those in the personalization editor

Terminology:

  • Canonical name: Advanced Expression Editor — Acronym: none — variants: advanced editor, expression editor
  • Synonyms: “Advanced mode” = “advanced expression editor”
  • Do not confuse: advanced expression editor (journey conditions/actions) ≠ personalization editor (message content personalization)

FAQ:

  • Q: When must I use the advanced expression editor instead of the simple mode? — Use the advanced editor when you need to query collections, use functions, reference journey properties, or build multi-condition logic that the simple editor cannot express.
  • Q: How do I pass a parameter to an external data source in the expression? — Use the params keyword in the expression syntax, e.g. #{DataSource.fieldGroup.field, params: {paramName: value}}.
  • Q: What does the autocompletion mechanism do? — It displays contextual field and function suggestions as you type, helping you build valid expressions faster.
  • Q: Where is Generate expressions with AI accessed? — Via the AI control inside the advanced expression editor; it is currently in public beta.
  • Q: Do conditions in the advanced editor return a different type than in simple mode? — No; conditions always return a boolean in both modes.
recommendation-more-help
journey-optimizer-help