[有限可用性]{class="badge informative"}

使用 Adobe Experience Platform 資料進行個人化 aep-data

在此頁面上:​瞭解如何在個人化編輯器中使用datasetLookup協助程式函式,以擷取Adobe Experience Platform記錄資料集中的欄位,並個人化您的內容。

AVAILABILITY
此功能目前以有限可用性版本的形式提供給所有客戶。
目前,「datasetLookup」協助程式函式可用於有限客戶集的運算式片段。 若想取得存取權,請聯絡您的 Adobe 代表。

Journey Optimizer可讓您利用個人化編輯器中Adobe Experience Platform記錄資料集的資料,來個人化您的內容。 開始之前,必須先啟用查詢個人化所需的資料集以進行查詢。 本節提供詳細資訊: 使用Adobe Experience Platform資料

在資料集啟用查詢個人化後,您就可以使用其資料將您的內容個人化為Journey Optimizer。

  1. 開啟個人化編輯器,您可在每個內容中定義個人化(例如訊息),此編輯器可供使用。 瞭解如何使用個人化編輯器

  2. 導覽至協助程式函式清單,並將​ datasetLookup ​協助程式函式新增至程式碼窗格。

  3. 此函式提供預先定義的語法,可讓您從Adobe Experience Platform資料集呼叫欄位。 語法如下:

    code language-none
    {{datasetLookup datasetId="datasetId" id="key" result="store" required=false}}
    
    • datasetId​為您正在處理的資料集識別碼。

    • id​是來源資料行的識別碼,應該以查詢資料集的主要身分聯結。

      note
      NOTE
      為此欄位輸入的值可以是欄位識別碼(profile.packages.packageSKU)、在歷程事件中傳遞的欄位(context.journey.events.event_ID.productSKU)或靜態值(sku007653)。 無論如何,系統都會使用值,並在資料集中查詢,以檢查它是否符合索引鍵。
      如果索引鍵使用常值字串值,請將文字放在引號中。 例如: {{datasetLookup datasetId="datasetId" id="SKU1234" result="store" required=false}}。 如果使用屬性值做為動態索引鍵,請移除引號。 例如: {{datasetLookup datasetId="datasetId" id=category.product.SKU result="SKU" required=false}}
    • result​為任意名稱,您必須提供該名稱,以參考您要從資料集擷取的所有欄位值。 此值將在您的程式碼中用於呼叫每個欄位。

    • required=false:如果required設為TRUE,則只有在找到相符的索引鍵時,才會傳遞訊息。 如果設為false,則不需要比對索引鍵,仍可傳送訊息。 請注意,如果設為false,建議您說明訊息內容的遞補或預設值。

    accordion
    在哪裡擷取資料集ID?

    可在Adobe Experience Platform使用者介面中擷取資料集ID。 在Adobe Experience Platform檔案中瞭解如何使用資料集。

  4. 調整語法以符合您的需求。 在此範例中,我們要擷取和乘客航班相關的資料。 語法如下:

    code language-none
    {{datasetLookup datasetId="1234567890abcdtId" id=profile.upcomingFlightId result="flight"}}
    
    • 我們正在處理其ID為「1234567890abcdtId」的資料集,
    • 我們想要用來與查詢資料集建立聯結的欄位是​profile.upformingFlightId
    • 我們想要在「飛行」參考下包含所有欄位值。
  5. 一旦設定好要在Adobe Experience Platform資料集中呼叫的語法,您就可以指定要擷取的欄位。 語法如下:

    code language-none
    {{result.fieldId}}
    
    note
    NOTE
    參考資料集欄位時,請確定您符合結構描述中定義的完整欄位路徑。
    可使用協助程式函式提取的欄位數沒有硬性限制。 但是,為獲得最佳效能,建議將欄位數保持在50以下,以避免影響輸送量。
    • result​是您已指派給​ datasetLookup ​協助程式函式中​ result ​引數的值。 在此範例中,為「flight」。

    • fieldID​是您要擷取的欄位識別碼。 瀏覽與您的資料集相關的記錄結構描述時,Adobe Experience Platform使用者介面中會顯示此ID:

      accordion
      在何處擷取欄位ID?

      在Adobe Experience Platform使用者介面中預覽資料集時,可以擷取欄位ID。 在Adobe Experience Platform檔案中瞭解如何預覽資料集。

    在此範例中,我們想使用與乘客登機時間和登機口相關的資訊。 因此,我們新增這兩行:

    • {{flight._myorg.booking.boardingTime}}
    • {{flight._myorg.booking.gate}}
  6. 現在您的程式碼已準備就緒,您可以照常完成您的內容,並使用模擬方法進行測試:按一下「模擬內容」以使用範例輸入資料或AI自動產生來測試內容變異,或按一下「模擬內容」,然後從下拉式清單中選取「模擬內容(AEP設定檔)」,以使用測試設定檔預覽。瞭解如何預覽和測試內容

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 teaches how to use the datasetLookup helper function in the Journey Optimizer personalization editor to retrieve fields from Adobe Experience Platform record datasets and incorporate them into message personalization.

Intents:

  • Enable an AEP record dataset for lookup personalization
  • Add the datasetLookup helper function to a personalization expression
  • Configure the function with a dataset ID, join key, result alias, and required flag
  • Reference retrieved dataset fields in personalization expressions using the result alias
  • Test personalized content using the Simulate content flow

Glossary:

  • datasetLookup: A helper function in the personalization editor that retrieves field values from an AEP record dataset by joining on a specified key. (product-specific)
  • Record dataset: An Adobe Experience Platform dataset type containing record-level data that can be enabled for lookup personalization. (product-specific)
  • Lookup personalization: The process of fetching fields from an AEP record dataset at send time to personalize message content. (product-specific)
  • result parameter: An arbitrary alias assigned in the datasetLookup call; used to reference all retrieved field values in subsequent expressions (e.g. {{result.fieldId}}).
  • required parameter: A boolean flag in datasetLookup that controls whether message delivery requires a matching key to be found in the dataset.

Guardrails:

  • Feature is in Limited Availability — not yet generally available to all customers.
  • The datasetLookup helper function within expression fragments is available to a limited set of customers only; contact your Adobe representative to gain access.
  • Datasets must be explicitly enabled for lookup personalization before they can be used with datasetLookup.
  • Keep the number of fields retrieved per datasetLookup call under 50 to avoid impacting throughput (recommended limit — no hard limit is stated on the page).

Terminology:

  • Canonical name: datasetLookup — variants: dataset lookup, dataset lookup helper, dataset lookup helper function
  • Synonyms: “datasetLookup” = “dataset lookup helper function”
  • Do not confuse: “datasetId” (identifier of the AEP dataset) ≠ “id” (the source column used to join with the dataset’s primary identity) ≠ “result” (the alias for referencing retrieved field values)

FAQ:

  • Q: What is the datasetLookup helper function? — It is a helper function in the personalization editor that retrieves field values from Adobe Experience Platform record datasets, allowing you to incorporate that data into message personalization.
  • Q: What happens if required=false and no matching key is found in the dataset? — The message can still be delivered. It is recommended to account for fallback or default values in your message content when using required=false.
  • Q: What happens if required=true and no matching key is found? — The message will only be delivered if a matching key is found in the dataset.
  • Q: Where do I find the dataset ID and field IDs needed for the syntax? — Dataset IDs can be retrieved in the Adobe Experience Platform UI under Datasets. Field IDs are visible when previewing a dataset and browsing the record schema in the AEP UI.
  • Q: How do I test content that uses datasetLookup? — Use the Simulate content button to test with sample input data or AI auto-generation, or select Simulate content (AEP profiles) from the dropdown to preview with test profiles.
recommendation-more-help
journey-optimizer-help