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

Triggering Email Through Analytics

rama_roy
New Contributor III
New Contributor III

Hi Team,

We have an analytics which will give roles and Entailments owner name and attached a email template in it. Now the requirement is to send it to Individual owners.

Analytics:

select r.ROLE_NAME as Access,
u.username) as OWNER,
ro.RANK as RANK,
"Enterprise Role" as ENDPOINT,
r.UPDATEDATE as UPDATE_DATE
from
roles r,
role_owners ro,
users u
where
r.ROLEKEY=ro.ROLEKEY
and
ro.USERKEY=u.USERKEY and r.status=1
union
select
ev.ENTITLEMENT_VALUE as Access,
u.username as OWNER,
eo.rank as RANK,
e.endpointname as ENDPOINT,
eo.UPDATEDATE as UPDATE_DATE
from entitlement_values ev,
entitlement_owners eo,
users u,
entitlement_types et,
endpoints e
where
ev. ENTITLEMENT_VALUEKEY=eo.ENTITLEMENT_VALUEKEY and
eo.USERKEY=u.USERKEY and
ev.ENTITLEMENTTYPEKEY=et.ENTITLEMENTTYPEKEY and
et.ENDPOINTKEY=et.ENDPOINTKEY and PARENTENDPOINTKEY=5 and ev.status=1

Email Template:

<p>The attachment contains all the roles and entitlements that you are the owner. Please refer to it.<br><p>

Exposed Variables:

date = 
endpoint = null
totalRecords = 
analyticsConfig = 
endpointDisplayName = null
baseUrlForEmail = 
ownerEmail =
out = java.io.PrintWriter@201abed

Now I am having the below queries:

  1. what are the variables can be used in the email template?
  2. what will be the variable in To address for sending it to the ind
4 REPLIES 4

rushikeshvartak
All-Star
All-Star

select r.ROLE_NAME as Access,
u.username as username,
ro.RANK as RANK,
"Enterprise Role" as ENDPOINT,
r.UPDATEDATE as UPDATE_DATE
from
roles r,
role_owners ro,
users u
where
r.ROLEKEY=ro.ROLEKEY
and
ro.USERKEY=u.USERKEY and r.status=1
union
select
ev.ENTITLEMENT_VALUE as Access,
u.username as username,
eo.rank as RANK,
e.endpointname as ENDPOINT,
eo.UPDATEDATE as UPDATE_DATE
from entitlement_values ev,
entitlement_owners eo,
users u,
entitlement_types et,
endpoints e
where
ev. ENTITLEMENT_VALUEKEY=eo.ENTITLEMENT_VALUEKEY and
eo.USERKEY=u.USERKEY and
ev.ENTITLEMENTTYPEKEY=et.ENTITLEMENTTYPEKEY and
et.ENDPOINTKEY=et.ENDPOINTKEY and PARENTENDPOINTKEY=5 and ev.status=1

 

mail to just keep ${userEmail}


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

rama_roy
New Contributor III
New Contributor III

Hi Rushikesh,

I have to use u.username as username instead of u.username as OWNER and mail to address will be ${userEmail}

I will try it.

If you could let me know what are the variables I can use in the mail body. eg. if I want to say Hi -User first name. I tried with Hi ${user.firstname} but not working

Column alias in query must be username


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

@rama_roy  try below

1.

select r.ROLE_NAME as Access,
u.username as 'UsernameOfName',

u.firstname as 'FirstName',
ro.RANK as 'RANK',
"Enterprise Role" as ENDPOINT,
r.UPDATEDATE as UPDATE_DATE
from
roles r,
role_owners ro,
users u
where
r.ROLEKEY=ro.ROLEKEY
and
ro.USERKEY=u.USERKEY and r.status=1
union
select
ev.ENTITLEMENT_VALUE as Access,
u.username,
eo.rank as RANK,
e.endpointname as ENDPOINT,
eo.UPDATEDATE as UPDATE_DATE
from entitlement_values ev,
entitlement_owners eo,
users u,
entitlement_types et,
endpoints e
where
ev. ENTITLEMENT_VALUEKEY=eo.ENTITLEMENT_VALUEKEY and
eo.USERKEY=u.USERKEY and
ev.ENTITLEMENTTYPEKEY=et.ENTITLEMENTTYPEKEY and

 

2.if you going to create new template please check  enable Advanced HTML/CSS

3.Body:

Hi ${ANALYTICSDATA.'UsernameOfName'[0]} 

4.

Raghu_0-1718876397572.png

 

 


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