Use ۶Ƶ Experience Platform data in journeys datalookup
The Dataset lookup activity allows you to to dynamically retrieve data from ۶Ƶ Experience Platform record datasets during runtime. By leveraging this capability, you can access data that may not reside in the profile or event payload, ensuring your customer interactions are both relevant and timely.
Key Benefits:
- Real-Time personalization: Tailor customer experiences using enriched data.
- Dynamic decision-making: Use external data to drive journey logic and actions.
- Enhanced data Access: Retrieve product metadata, pricing tables, or relational data tied to specific keys.
Must-read must-read
Dataset enablement
The dataset must be enabled for lookup in ۶Ƶ Experience Platform. Detailed information are available in this section: Use ۶Ƶ Experience Platform data.
Limits & restrictions
- Maximum of 10 Dataset Lookup activities per journey.
- Maximum of 20 selected fields.
- Maximum of 500 keys in the lookup keys array.
- Enriched data size is limited to 10KB.
Additional performance considerations
The below recommendations are guidance to avoid delays in deliverability:
Configure the Dataset lookup activity configure
To configure the Dataset lookup activity, follow these steps:
-
Unfold the Orchestration category and drop a Dataset lookup activity into your canvas.
-
Add a label and description.
-
In the Dataset field, select the dataset with the attributes you need.
note note NOTE If the dataset you are looking for does not display in the list, make sure you have enabled it for lookup. For more details, refer to the Must read section. -
Select the specific fields you want to fetch from the dataset.
-
You can only select leaf nodes (fields at the lowest level of the schema). The field must be a primitive value (string, number, boolean, date, etc.).
-
Lists (arrays) and maps (key–value objects) cannot be selected.
accordion Example -
-
In the Lookup key(s) field, choose a joining key that exists in both the decision item attributes and the dataset. This key is used by the system to search in the selected dataset.
-
Keys can be expressions derived from the journey context, such as SKUs, email IDs, or other identifiers. Example:
@profile.email
orlist(@event{purchase_event.products.sku})
. -
Only strings or lists of strings are supported.
accordion Example -
Use enriched data in the journey
The data retrieved by the Dataset lookup activity is stored in the Journey context as an array of objects. It is available in the journey expression editor and personalization editor, enabling conditional logic and personalized messaging based on enriched data.
-
Journey Expression Editor:
Access the Advanced mode editor and use the syntax:
@datasetLookup{MyDatasetLookUpActivity1.entities}
. Learn how to work with the advanced expression editor -
Personalization Editor:
Use the syntax:
{{context.journey.datasetLookup.1482319411.entities}}
.
Examples of use cases
Scenario:Send a coupon to users who spend more than $40 on household products.
Journey flow:
-
Purchase Event: Capture SKUs from the user’s cart.
-
Dataset lookup activity:
- Dataset:
products-dataset
(SKU as the primary key). - Lookup Keys:
list(@event{purchase_event.products.sku})
. - Fields to Return:
["SKU", "category", "price"]
.
- Dataset:
-
Condition activity:
-
Filter SKUs where the category is “household”.
code language-none @event{purchase_event.products.all( in(currentEventField.sku, @datasetlookup{MyDatasetLookupActivity1.entities.all(currentDatasetLookupField.category == 'household').sku} ) )}
OR
-
Aggregate the total spend on household products and compare it to the $40 threshold.
code language-none sum(@event{purchase_event.products.all( in(currentEventField.sku, @datasetlookup{MyDatasetLookUpActivity1.entities.all(currentDatasetLookupField.category == 'household').sku} ) )}.price}, ',', true ) > 40
-
-
Personalization Editor:
Use the enriched data to personalize the email content:
code language-none {% let householdTotal = 0 %} {{#each journey.datasetlookup.3709000.entities as |product|}} {%#if get(product, "category") = "household"%} {% let householdTotal = householdTotal + product.price %}{%/if%} {{/each}} "Hi, thanks for spending " + {%= householdTotal %} + " on household products. Here is your reward!"
Scenario: Identify which email account for a profile has a Loyalty Status of Platinum. In this scenario, loyalty account is associated to an email ID and loyalty data is not available in the standard profile lookup store.
Journey flow:
-
Profile Event Trigger: Capture email IDs from the profile or event context.
-
Dataset Lookup activity:
- Dataset:
loyalty-member-dataset
(email as the primary key). - Lookup Keys:
@profile.email
. - Fields to Return:
["email", "loyaltyTier"]
.
- Dataset:
-
Condition activity:
Branch the journey based on the loyalty tier:
code language-none @datasetLookup{MyDatasetLookUpActivity1.entity.loyaltyMember.loyaltyTier} == 'Platinum'
-
Personalization Editor:
Use the enriched loyalty tier data to personalize outbound communication:
code language-none {{context.journey.datasetLookup.1482319411.entity.loyaltyMember.loyaltyTier}}