We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

Manager notification with list of reportee's

SureshV
New Contributor
New Contributor

Hello Team,

I would like to understand if there any option to include all the reportee's of a manager in a single email. There is a FreshDesk article explains this process but it doesnt work in our case since we are still at V5.5 SP3 product version. https://saviynt.freshdesk.com/support/solutions/articles/43000622153-managing-email-templates#Managi...

Please let me know if there is any other way to achieve this use case in Saviynt Version V5.5 SP3.

Thank you in advance for your insights on this.

Regards,

Suresh V.

@rushikeshvartak    @Sivagami 

13 REPLIES 13

Sivagami
Valued Contributor
Valued Contributor

Hi Suresh,

Can you help clarify the requirement?

Do you want to send an email to manager with all their reportee's information in one single email? (or) 

Do you want to send an email to manager with all their reportee's information in separate emails (one reportee info per email)?

-Siva

Hi @Sivagami , 

The requirement here is to trigger a notification to manager with all his reportee's listed.

For Ex: If manager A is having 10 reportees reporting to him, Then he should get 1 single email with all his reportee's.

I could see using  FOR loop in email template this can be achieved, but there is a limitation in Saviynt version. (available from Release v2020.1 and v5.5 SP5 onwards)

 

sk
All-Star
All-Star

If you just want to send a report of all users who are reporting to a manager. You can use analytics report with email notification. But if you have different use case to tigger this email please help us understand your use case/ requirement


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

SureshV
New Contributor
New Contributor

Hi @sk 

The requirement here is to trigger a notification to manager with all his reportee's listed.

For Ex: If manager A is having 10 reportees reporting to him, Then he should get 1 single email with all his reportee's.

I could see using  FOR loop in email template this can be achieved, but there is a limitation in Saviynt version. (available from Release v2020.1 and v5.5 SP5 onwards)

Our current version is V5.5 sp3 

Its working for me in v5.5 whats error are you getting 


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

 

@rushikeshvartak I could see no error logged in the logs as multiple emails  are getting triggered but the requirement is to trigger a group email

I'm using below syntax in email template and its triggering multiple emails to managers with reportee's details. for ex if i have 2 reportee's reporting to me then i'm receiving 2 different email with user details. 

Hi ${ANALYTICSDATA.MANAGER[0]},
Please find the monthly report of the details of all your reportees.
<table>
<tr>
<th>Reportee ID</th>
<th>Reportee Email</th>
<th>Title</th>
<th>City</th>
<th>Start Date</th>
</tr>
<% int count=Integer.parseInt("${ANALYTICSDATA.MANAGER.size()}"); for(int i=0;i<count;i=i+1){%>

<tr>
<td>${ANALYTICSDATA.'REPORTEE ID'[i]}</td>
<td>${ANALYTICSDATA.'REPORTEE EMAIL'[i]}</td>
<td>${ANALYTICSDATA.'TITLE'[i]}</td>
<td>${ANALYTICSDATA.'CITY'[i]}</td>
<td>${ANALYTICSDATA.'START DATE'[i]}</td>
</tr>
<% } %>
</table>

 

Now,As per freshdesk article this syntax should trigger one single email with list of all the reportees. So i should get only one email with list of 2 user details. 

 

 

Enable global configuration to Group by username under analytics


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

Hi @rushikeshvartak ,

Its already enabled 

SureshV_0-1675839886701.png

 

And also i have configured ${userEmail} in TO as FD states that it is mandatory to have useremail in To field.

  • To use ${ANALYTICSDATA} or ${ANALYTICSDATAMAP} in Analytics Emails, it is mandatory to have ${userEmail} in the TO of the email template.

Can you please share the query you have used?


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

SureshV
New Contributor
New Contributor

Here is the query which lists down the reportees.

select
u.username as USERNAME,
u.firstname as FIRSTNAME,
u.lastname as LASTNAME,
u.enddate as ENDDATE,
u.email as EMAIL,
a.validthrough as ACCENDDATE,
u1.email as MANAGEREMAIL,
u1.username as MANAGERNAME
from users u
join users u1 on u.manager=u1.userkey
JOIN USER_ACCOUNTS UA ON U.USERKEY=UA.USERKEY JOIN ACCOUNTS A ON UA.ACCOUNTKEY = A.ACCOUNTKEY
JOIN ENDPOINTS E ON A.ENDPOINTKEY = E.ENDPOINTKEY
WHERE U.STATUSKEY=1
AND A.STATUS in('1','Manually Provisioned')
AND A.VALIDTHROUGH IS NOT NULL AND U.EMPLOYEETYPE = 'Managed Contractor'
AND E.ENDPOINTKEY IN (SELECT ENDPOINTKEY FROM ENDPOINTS WHERE ENDPOINTNAME in ('AD ABC','AD ABPG'))
AND U.regioncode='NAZ'
AND (DATE(u.enddate) <CURDATE())

Email Template

Hi ${ANALYTICSDATA.MANAGERNAME[i]},
Please find the monthly report of the details of all your reportees.
<table>
<tr>
<th>USERNAME</th>
<th>ENDDATE</th>
<th>FIRSTNAME</th>
<th>LASTNAME</th>
<th>EMAIL</th>
</tr>
<% int count=Integer.parseInt("${ANALYTICSDATA.MANAGERNAME.size()}"); for(int i=0;i<count;i=i+1){%>

<tr>
<td>${ANALYTICSDATA.'USERNAME'[i]}</td>
<td>${ANALYTICSDATA.'ENDDATE'[i]}</td>
<td>${ANALYTICSDATA.'FIRSTNAME'[i]}</td>
<td>${ANALYTICSDATA.'LASTNAME'[i]}</td>
<td>${ANALYTICSDATA.'EMAIL'[i]}</td>
</tr>
<% } %>
</table>

Change query like below

select
u.username as USER_ID,
u.firstname as FIRSTNAME,
u.lastname as LASTNAME,
u.enddate as ENDDATE,
u.email as EMAIL,
a.validthrough as ACCENDDATE,
u1.email as MANAGEREMAIL,
u1.username as USERNAME
from users u
join users u1 on u.manager=u1.userkey
JOIN USER_ACCOUNTS UA ON U.USERKEY=UA.USERKEY JOIN ACCOUNTS A ON UA.ACCOUNTKEY = A.ACCOUNTKEY
JOIN ENDPOINTS E ON A.ENDPOINTKEY = E.ENDPOINTKEY
WHERE U.STATUSKEY=1
AND A.STATUS in('1','Manually Provisioned')
AND A.VALIDTHROUGH IS NOT NULL AND U.EMPLOYEETYPE = 'Managed Contractor'
AND E.ENDPOINTKEY IN (SELECT ENDPOINTKEY FROM ENDPOINTS WHERE ENDPOINTNAME in ('AD ABC','AD ABPG'))
AND U.regioncode='NAZ'
AND (DATE(u.enddate) <CURDATE())
ORDER BY USERNAME;

And email template as below

Hi ${ANALYTICSDATA.USERNAME[i]},
Please find the monthly report of the details of all your reportees.
<table>
<tr>
<th>USER_ID</th>
<th>ENDDATE</th>
<th>FIRSTNAME</th>
<th>LASTNAME</th>
<th>EMAIL</th>
</tr>
<% int count=Integer.parseInt("${ANALYTICSDATA.USERNAME.size()}"); for(int i=0;i<count;i=i+1){%>

<tr>
<td>${ANALYTICSDATA.'USER_ID'[i]}</td>
<td>${ANALYTICSDATA.'ENDDATE'[i]}</td>
<td>${ANALYTICSDATA.'FIRSTNAME'[i]}</td>
<td>${ANALYTICSDATA.'LASTNAME'[i]}</td>
<td>${ANALYTICSDATA.'EMAIL'[i]}</td>
</tr>
<% } %>
</table>

 


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

Hi @rushikeshvartak ,

May i know which service pack in V5.5 version you are referring to ?