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 address print 'ticket@company.com' in case of entitlement removal except "xyz group"

Santosh
Regular Contributor
Regular Contributor

Hello All, we want send a ticketing email to ticket@company.com in case of the entitlement removal except "xyz group", how is that possible? I am thinking of using a condition on TO address of the email template but didn't find any close resource, any leads?

18 REPLIES 18

rushikeshvartak
All-Star
All-Star

Please validate supported variables.

Purpose :

To get what variables are present to use in the email template.

Email Template steps :

keep Advanced HTML CSS flag is checked

Keep your email Address in TO

TO /CC/BCC & Subject - Don't use any dynamic variables

Add only below code in Email Body
${this.binding.variables.each {k,v -> println "$k = $v" + "" + "br" + ">"}}

Output : using the below expression. By putting it in the email body, it will print all variable names with values, and then accordingly, you can use it:


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

Santosh
Regular Contributor
Regular Contributor

This is what i got based on  above body, is it expected?

entitlement_endpoint_list = []br> manager = Donald.Duckbr> createdBy = adminbr> service_accounts_list = []br> ownerOnTerminate = Donald.Duckbr> serviceaccount_endpoints_list = []br> baseUrlForEmail = https://release-n-plus-one.saviyntcloud.com/ECMbr> user = Savtester.Thursdaybr> requestor = Santosh.Nepalbr> entitlement_value_list = []br> out = java.io.PrintWriter@2addee66br> [entitlement_endpoint_list:[], manager:Donald.Duck, createdBy:admin, service_accounts_list:[], ownerOnTerminate:Donald.Duck, serviceaccount_endpoints_list:[], baseUrlForEmail:https://release-n-plus-one.saviyntcloud.com/ECM, user:Savtester.Thursday, requestor:Santosh.Nepal, entitlement_value_list:[], out:java.io.PrintWriter@2addee66]

Since entitlement_value_list  is blank you can't filter on specific entitlement


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

Also, can we not utilize the entitlement_vlauekey !=108 or something like that on ars.task?

There is no task object also,

Where did you attached template ?


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

I have not attached the email template yet but was thinking on towards endpoint (access removal==task complete). the test earlier I did was from user update rule.

Variables varies where you attached. Hence if variable is exposed you can add conditional logic

<%if (task?.entitlementValueKey=='100') print "${user.email},${requestor.email}" else print "" %>


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

NM
Honored Contributor II
Honored Contributor II

Hi @Santosh , for remove access if you attach the email in endpoint .. you will get an entitlement variable which you can use.

Santosh
Regular Contributor
Regular Contributor

 tried this, 

<%if (task?.entitlementValueKey!='63175') print "hardcoded my email" else print "" %>,

attached the template to endpoint---remove Access---> Task complete

but it does not seem to be working, was I supposed to save the template in CSS/HTML format?

Did you validated variables exposed ?


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

Santosh
Regular Contributor
Regular Contributor

This is what i got on testing

resourceOwners = Person1, Person2br> tasktype = Remove Accessbr> manager = Donald.Duckbr> accountOwners = []br> randompassword = nullbr> entitlement = [Test Access]br> provisioningOwners = br> users = Frank.Costanzabr> requestor = Santosh.Nepalbr> out = java.io.PrintWriter@e7db16dbr> account_password = XXXXXXXbr> task = com.saviynt.ecm.task.ArsTasks : 41649br> accountname = frank.costanzabr> requestid = 2940126br> endpointDisplayName = ENDPOINTNAMEbr> account_name = frank.costanzabr> endpointOwners = br> requestormanager = Person1> baseUrlForEmail = https://release-n-plus-one.saviyntcloud.com/ECMbr> user = Frank.Costanzabr> taskaction = Remove Accessbr> account = frank.costanzabr> [resourceOwners:Person1, Person2, tasktype:Remove Access, manager:Donald.Duck, accountOwners:[], randompassword:null, entitlement:[Test Access], provisioningOwners:, users:Frank.Costanza, requestor:Santosh.Nepal, out:java.io.PrintWriter@e7db16d, account_password:XXXXXXX, task:com.saviynt.ecm.task.ArsTasks : 41649, accountname:frank.costanza, requestid:2940126, endpointDisplayName:ENDPOINTNAME, account_name:frank.costanza, endpointOwners:, requestormanager:Person1, baseUrlForEmail:https://release-n-plus-one.saviyntcloud.com/ECM, user:Frank.Costanza, taskaction:Remove Access, account:frank.costanza]

<%if (entitlement?.toString()?.contains('Test Access')) print "hardcoded my email" else print "" %>


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

Santosh
Regular Contributor
Regular Contributor

I used above script on TO address and saved the email template as Advanced HTML CSS. It failed to fetch following attribute values. The name of the test entitlement was "Test Access". Also the condition would be when the entitlement is not Test Access, so the query to use be (<%if (!entitlement?.toString()?.contains('Test Access')) print "hardcoded my email" else print "" %>)?

This email is auto-generated by Saviynt system. It is not a security awareness training exercise. An access removal request is pending your review and approval. Please review the request and provide a response by logging into Saviynt at the following internal location: Review Link Full Name: ${user.firstname} ${user.lastname} Email Address: ${user.email} Job Title: ${user.title} Department: ${user.departmentname} Manager: ${manager.firstname} ${manager.lastname} Company:${user.companyname} Location:${user.location} Application Access Requested: ${endpoint} Application Role/Profile Requested:${entitlements} 

  • ${entitlements}  is not exposed variable

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

So, it works on TO address for me to receive an email but does not work on the body to get that dynamic variable information?

What is working ? ${entitements} ?


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

<%if (!entitlement?.toString()?.contains('Test Access')) print "hardcoded my email" else print "" %>

this one is working.

You can use same in email body ${entitlement?.toString()}


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