- TLC Home Home
- Discussions & Ideas Discussions & Ideas
- Product Guides Product Guides
- Knowledge Base Knowledge Base
- Developer Docs Developer Docs
- Education Education
- Blog Blog
- Support Desk Support Desk
An enrichment is the application of business rules in setting attribute values. An enrichment transforms an attribute from a static value to a dynamic one. By introducing business rules to your attributes you give them context and more meaning. These enriched attributes then become the building blocks for rest of your solution.
In this article:
Enrichments are added to attributes as a way to customize their values. Find the attribute you want to enrich and follow these steps:
When two (2) or more enrichments have a dependency on the same attribute, they become "linked enrichments". The following example shows the Enrichments applied to Visit Start and Visit End, the two preloaded attributes The enrichment in the Visit Start attribute uses the Visit End attribute and vice versa. Because each enrichment is linked to the other by an attribute, they are considered linked enrichments.
Read more:
This enrichment can modify a number with a positive value (increment) or a negative value (decrement). This value can come from another attribute or be set as a static number.
Knowing the amount spent across all orders from a visitor is a valuable piece of information. This data can be used for many purposes, such as to offer promotional deals or to assign a badge to visitors whose spending exceeds a certain threshold. Since the value of this attribute will persist for the lifetime of the visitor, it will be visitor-scoped.
This enrichment has the following requirements:
page_type
="purchase"order_total
="123.45"To configure this enrichment:
page_type
EQUALS " purchase"This enrichment calculates the elapsed time between two events and stores the numeric value in one of the following units: minutes, hours, days, weeks, or months.
This enrichment will calculate the number of days since a visitor made a purchase. The resulting value is always a positive number.
This enrichment has the following requirements:
page_type
="purchase"To configure this enrichment:
This enrichment defines visitor group names and assigns them to an attribute based on a percentage distribution. The names (or values) of your segments can come from another string attribute or from a custom value. This enrichment is helpful in running A/B tests or targeting groups of users.
The group distributions are calculated based on a random number generator. The enrichment does not monitor the current ratio of segments prior to assigning a value, so for smaller samples you may see ratios that do not exactly match the percentages you set. However, as the number of assignments increases, the ratio of assignments will gradually match the percentages you set.
For example, if you set up three segments with distributions of 50%, 30%, and 20%, within a small sample set you might see ratios of 48%, 34%, and 18%. However, as more visitors get assigned into the segments, the ratio values will approach the expected values.
To test a new campaign on a small segment of your visitors, presumably before rolling it out for all visitors, you use the split string enrichments to assign a small percentage of your visitors into the "Action" group. This identified segment of visitors can then be built into an audience for which you can take actions.
For this example we will create the following distribution of segments:
To configure this enrichment:
Now you can use this attribute in a rule to include the relevant visitors in an audience. The rule logic might be: "Split Test Group" EQUALS "Variation1".
The Store Array as Set of String enrichment saves the values from an array of strings attribute into a set of strings attribute. This Enrichment will not create a perpetual set. Meaning, you cannot append to a set of string using this enrichment, it will always overwrite the value. To preserve a set of strings and append new values you must use the Update Set of String By Set of Strings Enrichment.
Starting with an event attribute of the data type Array of Strings called product_category
, populated on purchase events to contain the category names of the products purchased. To store this as a Visitor/Visit attribute called "Purchase Categories", it must be converted to a Set of Strings. Then, on each purchase event, the product_category
values get appended to the "Product Categories Purchased" attribute via enrichments.
Array of Strings (product_category) | Set of Strings (Product Category Purchased) |
["Pants", "Shirts"] | "Pants", "Shirts" |
["Boots", "Belts", "Belts"] | "Boots", "Belts" |
This enrichment appends the values from one Set of Strings attribute into another Set of Strings attribute. This allows you to store the values that occur in one set (and that change from event to event) into a second set that persists for the life of the visitor.
In this table Set A is overwritten with new values for each event and the the enrichment is copying those values into Set B where the master list grows.
We recommend pairing this enrichment with Store Array as Set of Strings Enrichment so that the resulting Set can be preserved before it is overwritten by incoming values.
Set A (Event) | Set B (Visitor) |
"Pants", "Shirts" | "Pants", "Shirts" |
"Shoes", "Pants" | "Pants", "Shirts", "Shoes" |
"Shirts", "Shirts", "Watches" | "Pants", "Shirts", "Shoes", "Watches" |
To maintain an accumulated set of product categories purchased from you will have one Event Array of Strings attribute and two Visit/Visitor Set of Strings attributes: one to capture the views as they happen and one to capture all historical views.
This enrichment has the following requirements:
To configure this Enrichment:
This enrichment calculates the rolling average (arithmetic mean) of numeric values captured in a timeline attribute.
This example uses a "90-Day Orders" timeline to capture order total values over the last 90 days. As the Timeline progresses, entries falling outside the expiration window are discarded and the final rolling average is recalculated with the set of valid entries.
This example also applies to the Set Rolling Sum Based on Timeline enrichment.
The table below illustrates a timeline of entries (assume today is March 25). All entries, including the entry on Jan 1, are included in the arithmetic mean.
Timeline Attribute: "90-Day Orders" | |
Valid Entries | Order Total ($) |
Jan 1 | 10.00 |
Feb 15 | 20.00 |
Mar 25 | 30.00 |
Rolling Average is (10.00 + 20.00 + 30.00) ÷ 3 = 20.00 |
A few weeks later, the Jan 1 entry is discarded because it falls outside the 90 day expiration and the rolling average is recalculated for the valid entries. Notice how the resulting average changes when an expired entry is excluded from the aggregate.
Timeline Attribute: "90-Day Orders" | |
Expired Entries | Order Total (in $) |
Jan 1 | 10.00 |
Valid Entries | Order Total (in $) |
Feb 15 | 20.00 |
Mar 25 | 30.00 |
Apr 10 | 40.00 |
Rolling Average is (20.00 + 30.00 + 40.00) ÷ 3 = 30.00 |
Starting with a timeline attribute to capture order totals from the last 90 days, you will create a new visitor attribute using the Rolling Average enrichment to store average the order totals.
This Enrichment has the following requirements:
To configure this enrichment:
Copyright All Rights Reserved © 2008-2022