03/30/2023 11:18 AM
I want to know, where the below requirement is possible and the way how to do it.
Currently we have a requirement where we remove the user from all the entitlements in a specific endpoint when "last logon date" is greater than 90 days. Is there a way where we can send that user a email (one email with all entitlements) with list of all entitlements that user owns in that endpoint.
Can it be done via analytic report and if possible the binding variables to do that and columns names I need to include in the analytic report for making this to work. I referred this document and couldn't find any such use case.
03/30/2023 01:47 PM
Yes, you can create an analytic report with the entitlement owner's username and name the column as username, also populate all entitlement details in the report.
Then you can use ANALYTICSDATAMAP as mentioned here (Example 5) to get that data.
03/30/2023 02:06 PM
@Ishan In my case I do not want to send emails to entitlement owner
My use case is to send emails to those users who have access to those entitlements.
for example:
user A has 3 entitlements ent1, ent2, ent3 all these ents have user B as ent owner.
user D has 2 entitlements ent1 and ent4. ent1 has user B as owner, ent4 has user C as ent owner
Then I should send email to user A with ent1, ent2, ent3 and user D with ent1 and ent4. Hope you understood now
03/30/2023 06:13 PM
Enable group emails by username in global configuration and build a query such that you will output as list of entitlements of a user and make sure that username column is mapped to username of the user who is member of entitlement. In that way you can send one email for all entitlements that respective user is member of
03/30/2023 02:18 PM
Please refer to the document to send analytic reports via email
For example you can write a query as below
select u.username,u.email, group_concat(entitlement_value) as 'Entitlement_value', a.name from users u, user_accounts ua, accounts a, account_entitlements1 ae1, entitlement_values ev where u.userkey = ua.userkey and ua.accountkey = a .accountkey and a.accountkey = ae1.accountkey and ae1.entitlement_valuekey = ev.entitlement_valuekey and a.endpointkey = 43 group by a.name
The result from Data Analyzer as below
As long as the user comes in the report and has a valid email address the report will go the user.
In the email template in the To field use the variable ${user.email} and in the body you can use
{$ANALYTICSDATA} and {$ANALYTICSDATAMAP}