Leveraging Intelligent Recommendations for Operational Transformation. AMS Partners click HERE | EMEA/APJ Partners click HERE |
08/08/2024 04:35 AM - edited 08/08/2024 05:45 AM
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
----------------------------------------------------------------------------------------------------
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
08/08/2024 06:01 AM - edited 08/08/2024 06:02 AM
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
08/08/2024 06:04 AM - edited 08/08/2024 06:06 AM
@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
08/09/2024 10:58 AM
@Asd Did you tested i provided query ?
08/08/2024 06:05 AM
To field should be ${userEmail} only
08/08/2024 08:51 AM
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.
08/08/2024 09:11 AM
In that case in query keep 'admin' as username and cc you can add dl
08/08/2024 10:13 AM
08/09/2024 09:01 AM
Hi @rushikeshvartak , @NM
when I give 'admin' as username and ${userEmail} I'm not getting the mail ive attached the logs below for reference
Error:
08/09/2024 11:20 AM
Keep USERNAME in full capital and create new report and validate
08/12/2024 02:05 AM
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)
08/12/2024 04:50 AM
08/12/2024 05:06 AM
Hi @Asd did you try creating a new analytics report as mentioned in by previous comment?
08/12/2024 05:46 AM
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.
08/12/2024 05:56 AM - edited 08/12/2024 05:56 AM
Delete all run history of report and schedule report
08/09/2024 10:12 AM
@Asd , can you create a new report and then share logs?