Enrich data enriching-data

About enriching data about-enriching-data

This use case details possible uses of the Enrichment activity in a targeting workflow. For more on using the Enrichment activity, refer to: Enrichment.

A use case on how to enrich an email delivery with custom dates is also available in this section.

The contacts in the marketing database are sent an invitation to take part in a competition via a web application. The results of the competition are recovered in the Competition results table. This table is linked to the contact table (Recipients). The Competition results table contains the following fields:

  • Competition name (@game)
  • Trial number (@trial)
  • Score (@score)

A contact found in the Recipients table can be linked to several lines in the Competition results table. The relationship between these two tables is of 1-n type. Here is an example of the result logs for a recipient:

The purpose of this use case it to send personalized deliveries to people who took part in the latest competition depending on their highest scores. The recipient with the highest score gets first prize, the recipient with the second highest score gets a consolation prize and all the others get a message wishing them better luck next time.

To set up this use case, we created the following targeting workflow:

To create the workflow, apply the following steps:

  1. Two Query activities and one Intersection activity are added to target new subscribers who entered last the competition.
  2. The Enrichment activity is used to add data stored in the Competition results table. The Score field which our delivery personalization will happen is added to the work table of the workflow.
  3. The Split type activity is used to create recipient subsets based on scores.
  4. For each subset, a Delivery activity is added.

Step 1: Targeting step-1--targeting

The first query is used to target recipients who were added to the database within the last six months.

The second query is used to target the recipients who took part in the last competition.

An Intersection type activity is then added to target the recipients added to the database within the last six months and who entered the last competition.

Step 2: Enrichment step-2--enrichment

In this example, learn how to personalize deliveries according to the Score field stored in the Competition results table. This table has a 1-n type relationship with the recipients table. The Enrichment activity is used to add data from a table linked to the filtering dimension to the work table of the workflow.

  1. In the editing screen of the enrichment activity, select Add data, then Data linked to the filtering dimension and click Next.

  2. Then select the Data linked to the filtering dimension option, select the Competition results table and click Next.

  3. Enter an ID and a label, and select the Limit the line count option in the Data collected field. In the Lines to retrieve field, select ‘1’ as a value. For each recipient, the enrichment activity will add a single line from the Competition results table to the work table of the workflow. Click Next.

  4. In this example, we want to recover the recipient’s highest score, but only for the last competition. To do this, add a filter to the Competition name field to exclude all lines related to previous competitions. Click Next.

  5. Go to the Sort screen and click the Add button, select the Score field and check the box in the descending column to sort items of the Score fields in descending order. For each recipient, the enrichment activity adds a line that matches the highest score for the last game. Click Next.

  6. In the Data to add window, double-click the Score field. For each recipient, the enrichment activity will add only the Score field. Click Finish.

Right-click the inbound transition of the enrichment activity and select Display the target. The work table contains the following data:

The linked schema is:

Renew this operation on the outbound transition of the enrichment activity. We can see that the data linked to the recipient scores has been added. The highest score of each recipient has been recovered.

The matching schema has also been enriched.

Step 3: Split and delivery step-3--split-and-delivery

To sort the recipients based on their scores, a Split activity is added after the enrichment.

  1. A first (Winner) subset has been defined to include the recipient with the highest score. To do this, define a limitation of the number of records, apply a descending sort to the score, and limit the number of records to 1.

  2. The second (Second place) subset includes the recipient with the second highest score. Configuration is the same as for the first subset.

  3. The third (losers) subset contains all other recipients. Go to the General tab and check the Generate complement box to target all recipients who did not achieve the two highest scores.

  4. Add a Delivery type activity for each subset, using a different delivery template for each.

recommendation-more-help
cffff7e4-091f-472e-87ca-52087599f99d