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 Email enrichment with custom date fields.

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)

Recipients table linked 1-n to the Competition results table with Competition name, Trial number and Score fields.

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:

Competitions tab of a recipient listing three Competition results lines with Competition name, Trial number and Score.

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:

Targeting workflow: two queries feed an Intersection, then Enrichment and Split, leading to three delivery activities.

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.

Query activity Recent subscribers with the filter Creation date (@created) on or after MonthsAgo(-6).

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

Query activity filtering on Competition results exist such as Competition name equal to The weakest link.

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.

    Additional data dialog with the Data linked to the filtering dimension option selected and Next highlighted.

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

    Select fields to add screen with the Competition results link selected under Data linked to the filtering dimension.

  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.

    General parameters screen with Data collected set to Limit the line count and Lines to retrieve set to 1.

  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.

    Filter screen with the condition Competition name (@game) equal to The weakest link.

  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.

    Sort screen where the Score field is added with Descending checked to keep the highest score.

  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.

    Data to add screen with only the Score (@score) field in Output columns and Finish highlighted.

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

View population window opened with Display the target, listing primary key and targeting dimension, with no score.

The linked schema is:

Schema tab of the inbound population showing Intersection with Primary key and Targeting dimension only.

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.

View population window after Enrichment listing a Score column with each recipient's highest score.

The matching schema has also been enriched.

Schema tab of the enriched population showing Competition results with the Score field added.

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.

Split activity with three outbound transitions to the delivery activities 1st place, 2st place and Try again.

  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.

    Split subset Winner limited to one record, ordered by Score (Additional data/Competition results) descending.

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

    Split subset Second place configured like Winner: ordered by Score descending, limited to 1.

  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.

    Split General tab with Generate complement checked and the complement labeled Losers.

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

    Delivery activity 1st place created from the template 1st place delivery (DM41).

recommendation-more-help
campaign-help-automation