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

Need to send emails to managers who reportees have expiring contracts

PRATYUSH1
New Contributor III
New Contributor III

We have a usecase where we have to send emails to managers whose reportees have approaching enddates. We don't have all the managers as users in Saviynt but we are storing manager emails for all users in customproperty16.

We are using this analytic to find the approaching end dates:

select u.username,u.customproperty16 as "Manager Email", u.email, u.employeetype, u.startdate,u.enddate, u.customproperty1 as "samaccountname", u.customproperty3 as "BU", u.customproperty13 as "CN" from users u where u.employeetype = 'Contractor' and u.enddate between CURDATE() and CURDATE()+7

How to send emails to all the managers whose reportees have end dates approaching ?

11 REPLIES 11

nimitdave
Saviynt Employee
Saviynt Employee

Please refer to section "Sending Analytics Report to Users" in the below documentation:

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

sk
All-Star
All-Star

You can send email to managers but problem is since manager identity may not include in saviynt you have to include user email as well along with manager then only you should be able to send the emails.

Another problem is manager will receive individual email for each identified user.

 

For instructions you can follow the link shared by @nimitdave under section: Sending Analytics Report to Users


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

PRATYUSH1
New Contributor III
New Contributor III

Hi sk,

Can you please provide the name of the variable I should use to send the email to the manager if the manager email is stored in customproperty16?

When I am using only "${userEmail}" in To field, the mail is triggering. But adding anything in the cc field causes the mail to not trigger.

Till now, I have tried to add:

${ANALYTICSDATAMAP.get("MANAGER EMAIL")}

${ANALYTICSDATAMAP.get("Manager Email")}

${ANALYTICSDATAMAP.get("customproperty16")}

What is the query you have used? Please share the query. You should use the column name you referred to manager email


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

in query manager username column alias name should be username


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

PRATYUSH1
New Contributor III
New Contributor III

Hi,

All the manager user identities do not exist in Saviynt at the current time. But every user's manager email is stored in cp16 of the user.

The query we are using is:

select u.username,u.customproperty16 as"Manager Email", u.email, u.employeetype, u.startdate,u.enddate, u.customproperty1 as "samaccountname", u.customproperty3 as "BU", u.customproperty13 as "CN" from users u where u.employeetype = 'Contractor' and u.enddate between CURDATE() and CURDATE()+7

 

Will giving cp16 "username" alias work?

 

It should send an email, to send email it requires alias as username & it should be username not email

 

what is error you are getting?


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

If cp16 is storing "pratyush@email.com", will it send email if i give cp16 as "username" in query?

Also, is it possible that to add cp16 in cc in some other way while putting userEmail for the user itself?

 

it should  username field from users , no cc


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

@PRATYUSH1 : No it will not work that way username alias should point to username of the user.

As mentioned in my previous comment the way you can send email to manager is by including respective column in CC or TO along with user.email in TO which is user's email. So for each user manager will receive email along with user.

If you are using below query then try using  ${ANALYTICSDATA.'Manager Email'[0]} for manager email, Assuming that Group Analytics Emails by Username is enabled

select u.username,u.customproperty16 as "Manager Email", u.email, u.employeetype, u.startdate,u.enddate, u.customproperty1 as "samaccountname", u.customproperty3 as "BU", u.customproperty13 as "CN" from users u where u.employeetype = 'Contractor' and u.enddate between CURDATE() and CURDATE()+7


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

PRATYUSH1
New Contributor III
New Contributor III

@sk : Thanks. Your solution worked for me.