The page for Vtexperts.com, shows on his blog that the vTiger CRM 7.4 introduced some new email action features, one of which is the substring function. Using the substring function, users can now calculate a birthday and send an email in vTiger 7.4 using workflows.
Let's take a look at how you can automatically send a birthday greeting email to that customer.

To do this, you must first create three fields, in addition to the default birthday field:
1- Date of Birth: This field displays the contact's actual date of birth.
2- Today – Date of the Month: You need to create a text field that will display the current month and today's date.
3. Birthday – Date of the month: You must create a text field that displays the month and date of the birthday.
4. It's a birthday today: This is a text field whose value will be «Yes» or «No» depending on whether your contacts have a birthday today or not.
For this to work, we need to set up two workflows
- Workflow 1: This workflow will update the fields (Today-Month Date, Birthday-Month Date, and "Is today the birthday?").
- Workflow 2: This workflow will send an automatic email when the value in the «Today is a birthday» drop-down list is set to «Yes,» wishing them a happy birthday.
Workflow Configuration 1:
- Provide details about the workflow name, description, target module, and status in the Basic Information section.

2. In the workflow trigger, select the time interval option for «Rigger Workflow On.» Select «Daily» in the «Run Workflow Field» because the workflow will run daily and determine the contacts’ birthdays. Set a time at which the workflow will run.

3. Add the condition based on your requirements. In this example, no condition has been configured.

4. Work actions: For work actions, the user must configure three actions
- Update the «Today’s Date—Month» field: Using the substring expression, the value for the month and today’s date will be calculated in the «Today’s Date—Month» field. The value will be formatted as MM-DD, since the database reads the date in this format. The expression we’ll use is “substring(string,start,end)”; in this example, it is “substring(get_date(‘Today’),5,10)”.
Note: 5, 10 specifies the characters whose values will be captured; in this case, it is from Character5 to Character10. For example, if today is 2022-01-01 (YYYY-MM-DD), it will capture 01-01 (MM-DD), since we set the start to 5 and the end to 10 for the string.

2. Update the «Birthday Month» field: Now set up the second action, use the substring expression to determine the birth month and date, and update the «Birthday Month» field with that information.

3. Update the «Is it their birthday today?» field: Compare the values in the «Today-Month Date» and «Birthday-Month Date» fields. If they match, select «Yes» for «Is it their birthday today?» and «No» for the other option.

Workflow Configuration 2:
This workflow is simpler. This workflow will check the value of the «Is today their birthday?» field, and if it is «Yes,» it will send an email to the contact with birthday wishes.
- Fill in the basic details.

2. Configure the workflow trigger based on the time interval
Make sure this workflow runs at a later time than the first workflow. For example, in this example, it is 10:00 a.m. for the second workflow and 9:00 a.m. for the first workflow.

3. Set the condition. If «Is today your birthday?» is »Yes.”.

4. Set up actions for this workflow: Send a birthday email to the contact.

How Workflows Work
When the birthday (month, date) and today's date (month, date) are different.

In this example, today's date is 01/05/2022, and workflow one is running
Date of birth: The date of birth is set as January 25, 2022
Today – Date of the month: After the workflow runs, that value is calculated as 01-05, since today is January 5
Birthday – Date of the Month: After the workflow runs, that value is calculated as 01-25, since the contacts' birthdays are on January 25.
It's a birthday today: Since today is not the birthday, the value of this field is set to «No»
So, in this example, the values in the "today" and "birthday" fields were not the same, which is why no email will be sent.
When the birthday (month, date) and today's date (month, date) are the same

In this example, today's date is 01/05/2022, and workflow one is running
Date of Birth: The date of birth is set as January 5, 2022
Today – Date of the month: After the workflow runs, that value is calculated as 01-05, since today is January 5
Birthday – Date of the Month: After the workflow runs, that value is calculated as 01-05, since the contacts' birthdays are on January 5.
Is it their birthday today?: Since the current date and the date of birth are the same, except for the year, that is why the value of this field is set to «Yes.».
So, in this example, the values in the "Today" and "Birthday" fields are the same, which is why an email is sent to the contact
Email Preview
The preview of the email received is as follows:

With this update, you can now calculate birthdays and send emails in vTiger 7.4
To learn more about the new features in vTiger 7.4, visit the link.
for more information, please consult our experts, who are ready to answer any questions you may have. Click the button below: Request Information



