Email enrichment with custom date fields email-enrichment-with-custom-date-fields

In this example, we want to send an email with custom data fields to recipients who will celebrate their birthdays this month. The email will include a coupon valid one week before and after their birthdays.

We need to target recipients from a list who will celebrate their birthdays this month with a Split activity. Then, using the Enrichment activity, the custom data field will act as validity dates in the email for the customer’s special offer.

Workflow: list read, Split with Subset to Enrichment then Email delivery, and Complement to End.

To create this example, apply the following steps:

  1. In the Targeting and workflows tab of your campaign, drag and drop a Read list activity to target your list of recipients.

  2. The list to be processed can be specified explicitly, computed by a script or localized dynamically, according to options selected and parameters defined here.

    Read list activity with the list specified explicitly and the Source filtering section.

  3. Add a Split activity to differentiate recipients who will celebrate their birthdays this month from other recipients.

  4. To split your list, in the Filtering of selected records category, select Add a filtering condition on the inbound population. Then, click Edit.

    Split Subsets tab with Add a filtering condition on the inbound population and the Edit link highlighted.

  5. Select Filtering conditions then click the Edit expression button to filter the month of the recipient’s birthday.

    Target element window with the Edit expression button highlighted next to the Expression field.

  6. Click Advanced Selection then Edit the formula using an expression and add the following expression: Month(@birthDate).

  7. In the Operator column, select the equal to.

  8. Further filter your condition, by adding the Value month of the current date: Month(GetDate()).

    This will query recipients whose birthday’s month corresponds to the current month.

    Target element condition: month of date of birth equal to month of current date plus 14 days.

  9. Click Finish. Then, in the General tab of your Split activity, click the Generate complement in the Results category.

    With the Complement result, you can add a delivery activity or update a list. Here, we just added an End activity.

    Split General tab with the Generate complement option checked in the Results section.

You now need to configure your Enrichment activity:

  1. Add an Enrichment activity after your subset to add your custom date fields.

    Workflow with an Enrichment activity added to the Subset transition of the Split activity.

  2. Open your Enrichment activity. In the Complementary information category, click Add data.

    Enrichment activity with the Add data link highlighted in the Complementary information section.

  3. Select Data linked to the filtering dimension then Data of the filtering dimension.

  4. Click the Add button.

    Data to add window with the Add button highlighted next to the Output columns list.

  5. Add a Label. Then, in the Expression column, click Edit expression.

    Output columns with the Birthdate label and the Edit expression button highlighted in the Expression column.

  6. First, we need to target the week before the birthdate as the Validity start date with the following Expression: SubDays([target/@birthDate], 7).

    Output columns with the Birthdate label and the expression Date of birth (target/@birthDate).

  7. Then, to create the custom date field Validity end date which will target the week after the birthdate, you need to add the Expression: AddDays([target/@birthDate], 7).

    You can add a label to your expression.

    Output columns listing Birthdate and the Validity start date column with its expression and alias.

  8. Click Ok. Your enrichment is now ready.

After your Enrichment activity, you can add a delivery. In this case, we added an email delivery to send recipients a special offer with validity dates to customers celebrating their birthdays this month.

  1. Drag and drop an Email delivery activity after your Enrichment activity.

    Workflow with an Email delivery activity added after the Enrichment activity.

  2. Double-click your Email delivery activity to start personalizing your delivery.

  3. Add a Label to your delivery and click Continue.

  4. Click Save to create your email delivery.

  5. Check in the Approval tab of the email delivery Properties that the Confirm delivery before sending option is checked.

    Then, start your workflow to enrich your outbound transition with the targeted information.

    Delivery properties Approvals tab with Confirm the delivery before sending checked.

You can now start designing your email delivery with the custom date fields created in the Enrichment activity.

  1. Double-click your Email delivery activity.

  2. Add your target extensions to your email. It should be inside the following expression in order to configure the format of your validity dates:

    code language-none
    <%=
            formatDate(targetData.alias of your expression,"%2D.%2M")  %>
    
  3. Click Personalization toolbar button with a drop-down arrow. . Select Target extension then the previously created custom validity dates with the Enrichment activity to add your extension to the formatDate expression.

    Personalization menu Target extension submenu listing validity start date and validity end date.

  4. Configure your email content as needed.

    Email HTML content with formatDate expressions using targetData fields for the validity dates.

  5. Preview your email to check if your custom date fields were correctly configured

    Email Preview tab showing the birthday message with the validity dates 12/20 to 01/03 filled in.

Your email is now ready. You can start sending your proofs and confirm your delivery to send your birthday emails.

recommendation-more-help
campaign-help-automation