and more in a single search tool across platforms. Read the announcement here. |
03/12/2024 06:42 AM
Hello,
i want to send an email to every manager listing his employees having a contact end date in 30 days.
This email aims to provide a list of employees with contact end dates approaching within the next 30 days.
Below the analytics i did :
Can anyone help me with the body i must put on the email template?
Regards,
Ray
Solved! Go to Solution.
03/12/2024 06:43 AM - last edited on 03/12/2024 08:14 AM by Dave
[This post has been edited by a Moderator. We discourage the @ mention of other forum users or employees unless they have already involved themselves on the forum post.]
03/12/2024 07:16 AM
you can use below variables in email template
To : ${userEmail}
Cc : ${ANALYTICSDATA.'ManagerEmail'[0]}
03/12/2024 06:44 AM
Hi @ray
Please refer to the below forum post and documentation:
03/12/2024 08:40 AM
@ray check this :
Solved: Report to Manager || Reportee end date is approach... - Saviynt Forums - 80198
03/12/2024 10:36 AM
make username alias in lower case
03/13/2024 02:35 AM
Hello,
It is working now, I used this Analytics :
SELECT distinct
u.USERNAME AS 'Employee_username',
u.firstname AS 'User_Firstname',
u.lastname AS 'User_Lastname',
m.username AS 'USERNAME',
m.firstname AS 'ManagerFirstName',
m.lastname AS 'ManagerLastName',
u.manager AS 'ManagerUserkey',
m.email AS 'ManagerEmail'
FROM users u INNER JOINusers m ON m.userkey = u.manager
WHERE u.statuskey = 1 AND ( (Date_format(u.enddate, '%Y-%m-%d') - INTERVAL 546 DAY) = Date_format(Curdate(), '%Y-%m-%d') )
and this is the Email Template :
To : ${userEmail}
<body><p style="text-align:left"><span class="title1">Account Creation /</span><span class="title2">Création d'un compte</span></p><br><p>Bonjour ${ANALYTICSDATA.ManagerFirstName[0]} ${ANALYTICSDATA.ManagerLastName[0]},</p><p>Voici la liste des utilisateurs vous appartenant dont la date de fin de contrat est dans 30 jours :</p><table border="1"><thead><tr><th>Prénom</th><th>Nom de famille</th></tr></thead><tbody> <%
int count = Integer.parseInt("${ANALYTICSDATA.MANAGER.size()}");
for (int i = 0; i < count; i = i + 1) {
%> <tr><td>${ANALYTICSDATA.User_Firstname[i]}</td><td>${ANALYTICSDATA.User_Lastname[i]}</td></tr> <%
}
%> </tbody></table></body>
Thanks All
03/13/2024 02:46 AM
If your query is resolved, please mark the post solved by choosing appropriate comment/reply "Accept As Solution".
[Marking the solution will help future users who have the same problem. Be a hero to someone!]