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 Notification to Application Owner Incorrectly Sent to Manager Due to Variable Conflict

LauleshaNigade
New Contributor II
New Contributor II

Hi,
We have created a two-level workflow: the first approval is by the manager, and the second is by the application owner. We want the approvers' names/usernames to be included in the email notification to the application owner so that  the application owner can know who was the first approver of the request.

Currently, when the manager/admin approves the request, it is correctly assigned to the application owner and shown in the Saviynt UI, as illustrated in the image below.

 

LauleshaNigade_0-1721382290233.jpeg

 

 

To collect the approvers' names, we are using the "${allApprovers.collect{it.username}}" variable. However, because of this variable, the email is going to the first approver who was manager/admin instead of the application owner. And in the mail because of the "${allApprovers.collect{it.username}}"variable it is affecting the "${assignee}" variable and printing the value of approver in the assignee's section of name & email.

Below is the email image:

 

LauleshaNigade_1-1721382290235.jpeg

 

Below is the mail template :

To : ${assignee.email}

Hi ${assignee.firstname} ${assignee.lastname},


The first level of approval is approved by ${allApprovers.collect{it.username}}.

The user ${user.firstname} ${user.lastname} has requested for the following access :

UserName : ${user.firstname} ${user.lastname}

Account Name : ${accounts.name}

Application Name : ${endpoints}

 

Take an sample data : 

User - Enduser9

Manager - Anna

Application Owner - Ron

 

So when Anna approves the request, Ron should get the mail notification but it's going to Anna only.



Please provide any possible solution.

Thanks & Regards,
Laulesha Nigade.

8 REPLIES 8

Raghu
All-Star
All-Star

@LauleshaNigade  1 level approval approved manager then it shud go owner right

what is workflow using ? after manager did you configured Grant acces mail ?


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

We are using 2 level workflow.
start ---> manager approval ---> application owner aaproval---> grant access / reject access ----> end.

 

LauleshaNigade_1-1721390915690.png

So, when manager approves the request, application owner should get the mail notification but it's going to manager only although in the UI the request is assigned to application owner itself.

This happens only when we use "${allApprovers.collect{it.username}}" variable in email template. If we don’t use that variable in email template, then all the mails go to the expected receiver.

Please provide any possible solution.

Thanks and Regards,
Laulesha Nigade.

NM
Honored Contributor II
Honored Contributor II

Hi @LauleshaNigade what happens inthe case of assignee in to field?

LauleshaNigade
New Contributor II
New Contributor II


To collect the approvers' names, we are using the "${allApprovers.collect{it.username}}" variable. However, this variable causes the email to be sent to the first approver (the manager) instead of the application owner. Additionally, in the email, the "${allApprovers.collect{it.username}}" variable affects the "${assignee}"variable, causing it to print the value of the first approver (the manager) in the assignee's section of the name and email, which should go to the application owner.

Thanks and Regards,
Laulesha Nigade.

  • Use custom assignment block instead of Resource owner block with custom query

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

Hi @rushikeshvartak ,
As you suggested we used the custom assignment block with custom query  but still getting the same issue.

In the email, the `${allApprovers.collect{it.username}}` variable affects the `${assignee}` variable, causing it to print the value of the first approver (the manager) in the assignee's section, instead of the application owner's name and email. When we used the `${accessapprovers}` variable, the email correctly goes to the application owner without affecting the `${assignee}` variable, but `${accessapprovers}` prints the object value instead of the usernames  as showed in below image

LauleshaNigade_0-1721646126812 (1).png

Tried to modify the variable as below but not working 
${accessapprovers.username}
${accessapprovers.collect{it.username}}
${accessapprovers?.username}

${approvedBy.username} this variable is also not working.

Is there any variable which we can use to collect the previous approvars name?

Please provide any possible solution.

Thanks and Regards,
Laulesha Nigade.

[This message has been edited by moderator to mask email address from an image]

This seems not exposed

refer https://ideas.saviynt.com/ideas/EIC-I-5408


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

@LauleshaNigade seems like a bug with resource owner block try once what @rushikeshvartak suggested ..