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

How to access Analytics Data in Email Template using variables?

amanmalakar007
New Contributor III
New Contributor III

Hi Saviynt family,

I need to refer back to, or 'access' certain values from the Analytics report data in my email template. I tried using ANALYTICSDATA.'USERNAME'[i] and ANALYTICSDATA.'firstname'[i] but they don't seem to work. 

Can someone suggest what I might be missing? Attaching the Email Template below.

 

Hi,
Please find data table below :
<table>
<tr><th>Username</th><th>First Name</th><th>Account End Date</th></tr>

<%int count=Integer.parseint(“${ANALYTICSDATA.Application.size()}”); for(int i=0;i<count;i=i+1){%>

<tr><td>${ANALYTICSDATA.'USERNAME'[i]}</td><td>${ANALYTICSDATA.'firstname'[i]}</td><td>${ANALYTICSDATA.'enddate'[i]}</td></tr><%}%>

</table>
Thank you!

4 REPLIES 4

rushikeshvartak
All-Star
All-Star

Your email To should be ${userEmail} and SQL query should have column alias as usename

Please share report and email template config screenshot if still facing issue after validating above 


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

Sure, please find the Analytics Query, Report config and Email Template below : 

Analytics Report Query:

amanmalakar007_0-1722265217432.png

Analytics Report Config:

amanmalakar007_4-1722265673150.png

Email Template:

amanmalakar007_5-1722265863580.png

 

 

 

  • There are 2 issues
  • Report --> Alias should be exact username 
    • so change username1 to username
  • Email
    • TO Should be only ${userEmail}
      • Remove your email or move to CC/BCC

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

Raghu
All-Star
All-Star

@amanmalakar007  please flow below article it will help u.

 

query  remove for username alias , want use other username

example :

select u.username,u.username as 'username1',u.email as 'email' from user u

 

 

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.