Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Email Template Configuration ANALYTICSDATA

Asd
New Contributor II
New Contributor II

Hi,

I am using analytics to get a weeks report of users who were added/removed to entitlement we need to  sent an email of the report to a specific mail id, whenever we are using 

${ANALYTICSDATA.'column name'[i]} we are not receiving an email and upon checking on logs getting  below error.
 
Error:
groovy.lang.MissingPropertyException: No such property: ANALYTICSDATA for class: SimpleTemplateScript13863 at SimpleTemplateScript13863.run(SimpleTemplateScript13863.groovy:39) at com.saviynt.ecm.analytics.AnalyticsESService.notifyEmailToOwner(AnalyticsESService.groovy:2677)
 
HTML:
<table>
<tr>
<th>Task Type</th><th>Username</th>
<th>Task Date</th>
</tr>
<% int count=Integer.parseInt("${ANALYTICSDATA.USERNAME.size()}"); for(int i=0;i<count;i=i+1){%>
<tr>
<td>${ANALYTICSDATA.'TASK_TYPE'[i]}</td>
<td>${ANALYTICSDATA.'USERNAME'[i]}</td>
<td>${ANALYTICSDATA.'TASK DATE'[i]}</td>
</tr>
<%}%>
</table>

----------------------------------------------------------------------------------------------------
Advanced HTML CSS: NOT CHECKED
Content As HTML : False

TO field : test@email.com

 

Query

SELECT at.tasktype AS 'TASK_TYPE',
u.username AS 'USERNAME',
u.displayname AS 'DISPLAYNAME',
ev.displayname AS 'ENTITLEMENT NAME',
at.taskdate AS 'TASK DATE',
at.status AS 'TASK_STATUS',
FROM arstasks at
left join users u
ON at.userkey = u.userkey
left join entitlement_values ev
ON at.entitlement_valuekey = ev.entitlement_valuekey
WHERE at.source != 'REQUEST'
AND at.requestkey IS NULL
AND Date_format(at.taskdate, "%y-%m-%d") >= Date_sub(current_date, interval 7 day)
AND at.entitlement_valuekey = 123

 

 

 
 
Thanks,
Aswin
 
16 REPLIES 16

Asd
New Contributor II
New Contributor II

when i give the below code in Email Body
${this.binding.variables.each {k,v -> println "$k = $v" + "" + "br" + ">"}}

im getting this in email:

date = 2024-08-08 12:38:45br> endpoint = nullbr> totalRecords = 2br> analyticsConfig = com.saviynt.ecm.analytics.AnalyticsConfigES : 1715br> endpointDisplayName = nullbr> baseUrlForEmail = https://release-n-plus-one.saviyntcloud.com/ECMbr> ownerEmail = br> out = java.io.PrintWriter@3b933876br> [date:2024-08-08 12:38:45, endpoint:null, totalRecords:2, analyticsConfig:com.saviynt.ecm.analytics.AnalyticsConfigES : 1715, endpointDisplayName:null, baseUrlForEmail:https://release-n-plus-one.saviyntcloud.com/ECM, ownerEmail:, out:java.io.PrintWriter@3b933876]

 

the query will give the output as

Asd_1-1723122125844.png

 

Raghu
All-Star
All-Star

@Asd  try below query

SELECT u.username,at.tasktype AS 'TASK_TYPE',
u.username AS 'USERNAME',
u.displayname AS 'DISPLAYNAME',
ev.displayname AS 'ENTITLEMENT NAME',
at.taskdate AS 'TASK DATE',
at.status AS 'TASK_STATUS',
FROM arstasks at
left join users u
ON at.userkey = u.userkey
left join entitlement_values ev
ON at.entitlement_valuekey = ev.entitlement_valuekey
WHERE at.source != 'REQUEST'
AND at.requestkey IS NULL
AND Date_format(at.taskdate, "%y-%m-%d") >= Date_sub(current_date, interval 7 day)
AND at.entitlement_valuekey = 123

and HTML template shoud be enable Advance HTML while creating if not please enable.

Please chek below article it will help you

https://forums.saviynt.com/t5/identity-governance/analyticsdata-and-analyticsdatamap-are-not-working...

 


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

@Asd  Did you tested i provided query ?


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

rushikeshvartak
All-Star
All-Star

To field should be ${userEmail} only


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Asd
New Contributor II
New Contributor II

HI @rushikeshvartak,

If I set the To field to ${userEmail}, will it sent email to every user present in the list?

I only want to sent the email to a specific person and a group DL

Thanks,

Aswin.

In that case in query keep 'admin' as username and cc you can add dl


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

NM
Esteemed Contributor
Esteemed Contributor

@Asd  2 things 

Tick advance html css

'admin' as username and user ${userEmail} in To and add dl in cc


If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'

Asd
New Contributor II
New Contributor II

Hi @rushikeshvartak , @NM 

when I give 'admin' as username and ${userEmail} I'm not getting the mail ive attached the logs below for reference

Asd_0-1723196259757.png

Asd_1-1723196330090.png

Error:

groovy.lang.MissingPropertyException: No such property: lastAnalyticsHistoryKey for class: com.saviynt.ecm.analytics.AnalyticsESService at com.saviynt.ecm.analytics.AnalyticsESService.notifyEmailToOwner(AnalyticsESService.groovy:2465) at com.saviynt.ecm.analytics.AnalyticsESService.emailAction(AnalyticsESService.groovy:16630) at com.saviynt.ecm.analytics.AnalyticsESService.doFileArchivalAndSendEmail(AnalyticsESService.groovy:14802) at com.saviynt.ecm.analytics.AnalyticsESService$_runControl_closure211_closure322.doCall(AnalyticsESService.groovy:14634) at com.saviynt.ecm.analytics.AnalyticsESService$_runControl_closure211.doCall(AnalyticsESService.groovy:14633) at java.lang.Thread.run(Thread.java:750)
 
 
 
previously I used the query and email template in version 23.5 it worked fine
 
Regards,
Aswin

 

Keep USERNAME in full capital and create new report and validate


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Asd
New Contributor II
New Contributor II

Im getting the below error

 

Log:

groovy.lang.MissingPropertyException: No such property: lastAnalyticsHistoryKey for class: com.saviynt.ecm.analytics.AnalyticsESService at com.saviynt.ecm.analytics.AnalyticsESService.notifyEmailToOwner(AnalyticsESService.groovy:2465) at com.saviynt.ecm.analytics.AnalyticsESService.emailAction(AnalyticsESService.groovy:16630) at com.saviynt.ecm.analytics.AnalyticsESService.doFileArchivalAndSendEmail(AnalyticsESService.groovy:14802) at com.saviynt.ecm.analytics.AnalyticsESService$_runControl_closure211_closure322.doCall(AnalyticsESService.groovy:14634) at com.saviynt.ecm.analytics.AnalyticsESService$_runControl_closure211.doCall(AnalyticsESService.groovy:14633) at java.lang.Thread.run(Thread.java:750)

  • Create new analytics report

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

NM
Esteemed Contributor
Esteemed Contributor

Hi @Asd did you try creating a new analytics report as mentioned in by previous comment?


If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'

Asd
New Contributor II
New Contributor II

Hi @rushikeshvartak@NM 

yes, the log mentioned above was when I did with a new analytical report. im attaching the screenshot of the logs (this is again for a new report) the same error. 

Asd_0-1723466487955.png

 

 

Delete all run history of report and schedule report


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

NM
Esteemed Contributor
Esteemed Contributor

@Asd , can you create a new report and then share logs?


If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'

igorvt77
New Contributor III
New Contributor III

For those that are receiving "groovy.lang.MissingPropertyException: No such property: lastAnalyticsHistoryKey for class:" error message in the logs, support confirm that this was a bug in version 24.5 (could also be in earlier versions).  Support says it should be fixed in 24.6 and later versions.