Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Analytics - Notify the manager that the contract end date of his employees are soon

ray
Regular Contributor
Regular Contributor

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 :

ray_0-1710250807055.png

Can anyone help me with the body i must put on the email template? 

Regards,

Ray

7 REPLIES 7

ray
Regular Contributor
Regular Contributor

[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.]

CR
Regular Contributor III
Regular Contributor III

you can use below variables in email template

To : ${userEmail}
Cc : ${ANALYTICSDATA.'ManagerEmail'[0]}

 


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

naveenss
All-Star
All-Star

Hi @ray 

Please refer to the below forum post and documentation:

https://forums.saviynt.com/t5/identity-governance/need-to-send-emails-to-managers-who-reportees-have...

https://docs.saviyntcloud.com/bundle/EIC-Admin-v2022x/page/Content/Chapter17-EIC-Analytics/Analytics...

 

Regards,
Naveen Sakleshpur
If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.

Manu269
All-Star
All-Star

@ray check this :

Solved: Report to Manager || Reportee end date is approach... - Saviynt Forums - 80198

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.

rushikeshvartak
All-Star
All-Star

make username alias in lower case


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

ray
Regular Contributor
Regular Contributor

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

Sunil
Community Manager
Community Manager

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!]