and more in a single search tool across platforms. Read the announcement here. |
02/05/2024 10:16 PM
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>
02/05/2024 10:31 PM
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>
02/05/2024 10:46 PM
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
02/06/2024 08:59 PM
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" + ">"}}
02/07/2024 01:35 AM
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.
02/06/2024 10:51 PM
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.
02/07/2024 01:08 AM
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>
02/07/2024 01:27 AM
can you try without body and confirm please ? owner getting mails or not?
02/07/2024 01:32 AM
No email notifications are received.
02/07/2024 01:55 AM
try below:
Name :
To : ${ownerEmail}
Cc : {your mails id pass it}
Subject : Hello
02/07/2024 05:00 AM - edited 02/07/2024 05:01 AM
am using same syntax it working for me
02/07/2024 02:09 AM
Hi @Prithviraj1 ,
I hope you have assigned an owner to actionable analytics.
02/07/2024 02:23 AM
Yes, i have added owner in the analytics.
02/07/2024 03:06 AM
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.
02/07/2024 10:43 PM
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.
02/07/2024 10:48 PM
${userEmail} is mandatory field