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

Email history job is failing to trigger access approval mails

Harsha
Regular Contributor II
Regular Contributor II

Hi,

For the following workflow, email history job is triggering mails for manager and entitlement owner mails but marked templates are failing to trigger. Please let me know if anyone knows the cause of this. 

Tried checking in data analyzer with following query:

select SUBJECTOFEMAIL,TOADDRESS,CCADDRESS,BODYOFEMAIL,PROCESSINSTANCEID from emailhistory where TOADDRESS ='email@email.com' order by emailhistorykey

and 

select EMAILFAILURELOGS, OLDEMAILHISTORYKEY from emailhistoryprocess

Showed No data found;

Harsha_0-1673352476246.png

Also did not find any logs that could tell the issue.

19 REPLIES 19

rushikeshvartak
All-Star
All-Star

Share email template content


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

Harsha
Regular Contributor II
Regular Contributor II

Hello, 

Thank you for your quick response below is email template contents:

For Approval:
Hi ${requestor.firstname} ${requestor.lastname},

Your request for ${user?.username} for ${endpoint} with Request ID - ${requestid} has been approved.

Account Name - ${if(accounts?.name!= null){accounts?.name} else{ACCOUNTNAME}}
Request Type - ${requesttype} ( ${request.requesttype} )
Request Submission Date - ${request.requestdate}
Approvers names - ${if(allApprovers.collect{it.username}!= null){allApprovers.collect{it.username}} else{{approvedby.firstname},{approvedby.lastname}}}

 

For rejection:
Hi ${requestor.firstname} ${requestor.lastname},

Your request for ${user?.username} for ${endpoint} with Request ID - ${requestid} has been rejected.

Account Name - ${if(accounts?.name!= null){accounts?.name} else{ACCOUNTNAME}}
Request Type - ${requesttype}
Request Submission Date - ${request.requestdate}
Rejected By - ${allRejectors.collect{it.username}.join(',')}
Entitlements rejected - ${entitlementshtmltablerows}

 

Request. Variable seems wrong

Create new template and add below content in email body and attach to workflow for grant & reject block to find available variables 

 

${this.binding.variables.each {k,v -> println "$k = $v" + "<" + "br" + ">"}}


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

Harsha
Regular Contributor II
Regular Contributor II

Hello, I attached it I had a query whether email will trigger after completion of task(grant& reject) because as in below you can see it was approved but did not receive email.

Harsha_1-1673357145202.png

mail did not trigger even though template was attached as shown below:

Harsha_2-1673357224528.png

 

And also template was attached in workflow:

Harsha_3-1673357424311.png

 

Hardcode to email to your email ?

Did you approved the workflow change s?

any endpoint level template added?


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

Harsha
Regular Contributor II
Regular Contributor II

Hardcode to email to your email ?                  yes

Did you approved the workflow change s?       yes

any endpoint level template added?     no

Did you see any error in logs? Also what is the frequency that email history job is scheduled?


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

Enable Advance CSS option


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

Harsha
Regular Contributor II
Regular Contributor II

Hi Rushikesh,

Please find attached. And please help me find out which variable is causing an issue.

Thank you

We need logs not binding variables 

logs from admin function 


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

Harsha
Regular Contributor II
Regular Contributor II

Hello,

Please find attached. 

Thank you

Logs are for successful attempt where you received email for variables. We are looking for logs from failure attempt.

Anyway can you try below modifications for approval email and see if that works. I removed approvedby.firstname and approvedby.lastname parameters as they are not supported in approval/reject email.

Also check advanced html css

 

Hi ${requestor?.firstname} ${requestor?.lastname},

Your request for ${user?.username} for ${endpoint} with Request ID - ${requestid} has been approved.

Account Name - ${ACCOUNTNAME}
Request Type - ${requesttype}
Request Submission Date - ${request.requestdate}
Approvers names - ${allApprovers.collect{it.username}}

 


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

Try below Email template 

task Reject :

 

Hello ${requestor.firstname},

The request ${requestid} has been rejected either in full or part. For more details click the Request ID link below.


Request ID: ${requestid}
Request For: ${ACCOUNTNAME}
Requested By: ${requestor.firstname} ${requestor.lastname}
Requested On: ${request.requestdate.toString().substring(0,10)}

 

 

 

Task Approved

Hello ${requestor.firstname},

The request ${requestid} has been approved. You will be notified when the account or access is removed.


Request ID: ${requestid}
Request For: ${ACCOUNTNAME}
Requested On: ${request.requestdate.toString().substring(0,10)}


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

Harsha
Regular Contributor II
Regular Contributor II

Hi,

Thank you for template, main concern is  during first stage after risk check it is triggering both manager approval mail as well as  access granted mail. Can you please help me why this is happening. Sorry new to saviynt.

Thank you

You must be having account getting auto approved. Share workflow snippets 


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

Harsha
Regular Contributor II
Regular Contributor II

yes it has auto approval if entitlement risk is low and if its high goes through 2 stage approval( Manager and entitlement Owner) 

Please find attached for the xml snippet.

Thank you

Are you getting both emails at a time same time for low risk entitlements(risk!=4) or high risk entitlements(risk=4)?


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

PFA 


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

Harsha
Regular Contributor II
Regular Contributor II

Hello,

Quick update not sure if it was bug, we recently upgraded to 23 version so workflow is sending correct mails.  So thank you for your help.