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.
To create this example, apply the following steps:
In the Targeting and workflows tab of your campaign, drag and drop a Read list activity to target your list of recipients.
The list to be processed can be specified explicitly, computed by a script or localized dynamically, according to options selected and parameters defined here.
Add a Split activity to differentiate recipients who will celebrate their birthdays this month from other recipients.
To split your list, in the Filtering of selected records category, select Add a filtering condition on the inbound population. Then, click Edit.
Select Filtering conditions then click the Edit expression button to filter the month of the recipient’s birthday.
Click Advanced Selection then Edit the formula using an expression and add the following expression: Month(@birthDate).
In the Operator column, select the equal to.
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.
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.
You now need to configure your Enrichment activity:
Add an Enrichment activity after your subset to add your custom date fields.
Open your Enrichment activity. In the Complementary information category, click Add data.
Select Data linked to the filtering dimension then Data of the filtering dimension.
Click the Add button.
Add a Label. Then, in the Expression column, click Edit expression.
First, we need to target the week before the birthdate as the Validity start date with the following Expression:
Then, to create the custom date field Validity end date which will target the week after the birthdate, you need to add the Expression:
You can add a label to your expression.
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.
Drag and drop an Email delivery activity after your Enrichment activity.
Double-click your Email delivery activity to start personalizing your delivery.
Add a Label to your delivery and click Continue.
Click Save to create your email delivery.
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.
You can now start designing your email delivery with the custom date fields created in the Enrichment activity.
Double-click your Email delivery activity.
Add your target extensions to your email. It should be inside the following expression in order to configure the format of your validity dates:
<%= formatDate(targetData.alias of your expression,"%2D.%2M") %>
Click . Select Target extension then the previously created custom validity dates with the Enrichment activity to add your extension to the formatDate expression.
Configure your email content as needed.
Preview your email to check if your custom date fields were correctly configured
Your email is now ready. You can start sending your proofs and confirm your delivery to send your birthday emails.