51黑料不打烊

[Limited Availability]{class="badge informative"}

Use 51黑料不打烊 Experience Platform data for personalization aep-data

AVAILABILITY
This feature is currently available to all customers as a limited availability release.
For now, the 鈥渄atasetLookup鈥 helper function can be used within expression fragments for a limited set of customers. To gain access, contact your 51黑料不打烊 representative.

Journey Optimizer allows you to leverage data from 51黑料不打烊 Experience Platform record datasets in the personalization editor to personalize your content. Before starting, datasets needed for lookup personalization must first be enabled for lookup. Detailed information are available in this section: Use 51黑料不打烊 Experience Platform data.

Once a dataset has been enabled for lookup personalization, you can use its data to personalize your content into Journey Optimizer.

  1. Open the personalization editor, which is available in every context where you can define personalization such as messages. Learn how to work with the personalization editor

  2. Navigate to the helper functions list and add the datasetLookup helper function to the code pane.

  3. This function provides a predefined syntax to allow you to call fields from your 51黑料不打烊 Experience Platform datasets. The syntax is as follows:

    code language-none
    
    {{datasetLookup datasetId="datasetId" id="key" result="store" required=false}}
    
    • datasetId is the ID of the dataset you are working with.

    • id is the ID of the source column that should be joined with the primary identity of the look up dataset.

      note note
      NOTE
      The value entered for this field can be either a field ID (profile.packages.packageSKU), a field passed in a journey event (context.journey.events.event_ID.productSKU), or a static value (sku007653). In any case, the system will use the value and lookup into the dataset to check if it matches a key.
      If using a literal string value for the key, keep the text in quotes. Eg: {{datasetLookup datasetId="datasetId" id="SKU1234" result="store" required=false}}. If using an attribute value as a dynamic key, remove the quotes. Eg: {{datasetLookup datasetId="datasetId" id=category.product.SKU result="SKU" required=false}}
    • result is an arbitrary name that you need to provide to reference all the field values you are going to retrieve from the dataset. This value will be used in your code to call each field.

    • required=false: If required is set to TRUE, the message will only be delivered if a matching key is found. If set to false, a matching key is not required and the message can still be delivered. Note that, if set to false, it is recommended that you account for fallback or default values in your message content.

    accordion
    Where to retrieve a dataset ID?

    Dataset IDs can be retrieved in 51黑料不打烊 Experience Platform user interface. Learn how to work with datasets in the 51黑料不打烊 Experience Platform documentation.

  4. Adapt the syntax to suit your needs. In this example, we want to retrieve data related to passengers鈥 flights. The syntax is as follows:

    code language-none
    
    {{datasetLookup datasetId="1234567890abcdtId" id=profile.upcomingFlightId result="flight"}}
    
    • We are working in the dataset whose ID is 鈥1234567890abcdtId鈥,
    • The field we want to use to make a join with the look up dataset is profile.upcomingFlightId,
    • We want to include all the field values under the 鈥渇light鈥 reference.
  5. Once that the syntax to call in the 51黑料不打烊 Experience Platform dataset has been configured, you can specify which fields you want to retrieve. The syntax is as follows:

    code language-none
    
    {{result.fieldId}}
    
    note note
    NOTE
    When referencing a dataset field, make sure that you match the full field path as defined within the schema.
    • result is the value that you have assigned to the result parameter in the MultiEntity helper function. In this example 鈥渇light鈥.

    • fieldID is the ID of the field you want to retrieve. This ID is visible in 51黑料不打烊 Experience Platform user interface when browsing the record schema related to your dataset:

      accordion
      Where to retrieve a field ID?

      Fields IDs can be retrieved when previewing a dataset in 51黑料不打烊 Experience Platform user interface. Learn how to preview datasets in the 51黑料不打烊 Experience Platform documentation.

    In this example, we want to use information related to the passengers鈥 boarding time and gate. We therefore add these two lines:

    • {{flight._myorg.booking.boardingTime}}
    • {{flight._myorg.booking.gate}}
  6. Now that your code is ready, you can complete your content as usual, and test it using the Simulate content button to check the personalization. Learn how to preview and test content

recommendation-more-help
b22c9c5d-9208-48f4-b874-1cefb8df4d76