Exercise: Customer Anniversary Email Activity
In this exercise, schedule storing records for customer anniversary emails.
Requirements
The Process will:
Run immediately.
Check the customer join date from the entity “UserName_Acc_customers” (click here to see the entity creation steps) and compare it to the current date.
If the customer join date and current date are the same, check if the anniversary email is already created in the “UserName_Acc_Activities” entity (click here to see the entity creation steps).
If the customer join date and current date are the same and an anniversary record is already created, do not send the customer an anniversary email.
If the customer's join date and current date are the same and no anniversary record is created, send the customer an anniversary email.
Create a new record in the target entity “UserName_Acc_Activities”.
In this exercise, the actual customer anniversary email is not sent; however, all other steps, including customer email record creation, are included.
Solution
The solution is implemented in two steps:
Step 1: First, traverse the records in the “UserName_Acc_customers” entity to check if the join date (day and month) matches the current date. Filter out customers with the matched date that may already have an anniversary email record in the “UserName_Acc_Activities” entity.
Step 2: If a customer has the join date as the current date and has no anniversary record, create and store an anniversary record in the “UserName_Acc_Activities” entity.
Last updated