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

Email Notifications are sent only when i add ${userEmail} in to/cc field

Prithviraj1
New Contributor
New Contributor

Hi Everyone,

Our requirement is to send analytic report via email to an specific email id. We have created an analytics with the below configuration. The Email notifications are also sent but the issue is the notifications are sent only when i add ${userEmail} in to/cc field when i do not add it notification are not sent.

Also when i add the ${userEmail} in to/cc field the mail is sent to each and every user and the notification in which the owner is, only gets the report attached in the email with one of the user's details.

Requesting your help to please let me know how can i only send the report and notification to the owner only.

Please find below the following details.

Analytic : 

select
u.firstname as 'First Name',
u.lastname as 'Last Name',
u.email as 'Email',
u.startdate as 'Start Date',
(
select
u1.email
from
users u1
where
u.manager = u1.userkey
) as 'Manager Email'
from
users u

Email template :

Name : Test
To : ${ownerEmail}
Cc : ${userEmail}
Subject : Hello
Bcc :
From :
Body<span><div></div><div><span><b>${ANALYTICSDATA.'First Name'[0]}<br> ${ANALYTICSDATA.'Last Name'[0]}<br><br></span><b><b><br></b></b></div><div></div></span>

 

15 REPLIES 15

rushikeshvartak
All-Star
All-Star

select

u.username,

u.firstname as 'First Name',
u.lastname as 'Last Name',
u.email as 'Email',
u.startdate as 'Start Date',
(
select
u1.email
from
users u1
where
u.manager = u1.userkey
) as 'Manager Email'
from
users u

 

 

------------

Name : Test
To : ${userEmail}
Cc : 
Subject : Hello
Bcc :
From :
Body<span><div></div><div><span><b>${ANALYTICSDATA.'First Name'[0]}<br> ${ANALYTICSDATA.'Last Name'[0]}<br><br></span><b><b><br></b></b></div><div></div></span>


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

Hi @rushikeshvartak , I have the username column in my analytics by mistakenly it just got removed before posting here. The issue still remains.

Thanks for your quick response

in email template body

To get what variables are present to use in the email template, check using the below expression. By putting it in the email body, it will print all variable names with values, and then accordingly, you can use it:


${this.binding.variables.each {k,v -> println "$k = $v" + "" + "br" + ">"}}


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

Hi @rushikeshvartak , i tried with inserting the above statement in body i received information of attributes which are included in analytics. i get what we are trying to achieve here, but the issue still remains why there is a compulsion to add ${userEmail} in to/cc field, and when i do not add it notification are not sent.

CR
Regular Contributor III
Regular Contributor III

@Prithviraj1,

Can you try in mail to in ${ownerEmail}

Thanks,
Raghu
If this reply answered your question, please Accept As Solution and give Kudos to help others who may have a similar problem.


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

Prithviraj1
New Contributor
New Contributor

Hi @CR ,

I am currently using the below email template and having the issue.

Name :
To : ${ownerEmail}
Cc : ${userEmail}
Subject : Hello
Bcc :
From :
Body<span><div></div><div><span><b>${ANALYTICSDATA.'First Name'[0]}<br> ${ANALYTICSDATA.'Last Name'[0]}<br></span><b><b><br></b></b></div><div></div></span>

CR
Regular Contributor III
Regular Contributor III

can you try without body and confirm please ? owner getting mails or not?


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

Prithviraj1
New Contributor
New Contributor

No email notifications are received.

CR
Regular Contributor III
Regular Contributor III

try below:

Name :
To : ${ownerEmail}
Cc : {your mails id pass it}
Subject : Hello

 


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

CR
Regular Contributor III
Regular Contributor III

@Prithviraj1 

Raghu_0-1707310768663.png

 

am using same syntax it working for me


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

NM
Regular Contributor III
Regular Contributor III

Hi @Prithviraj1 ,

I hope you have assigned an owner to actionable analytics.

Prithviraj1
New Contributor
New Contributor

Yes, i have added owner in the analytics.

Prithviraj1_0-1707301372142.png

 

NM
Regular Contributor III
Regular Contributor III

Does this user have email field populated in saviynt? if yes.. try hardcoding the same email once in "to" field of emal template and check if you are receiving notification.

Prithviraj1
New Contributor
New Contributor

Yes, User has email populated, if i have ${userEmail} in to/cc field the email are sent, and when i do not add it notification are not sent.

${userEmail} is mandatory field 


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