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

How to Send Approval to the Manager's Manager's Delegate

amitasingh123
New Contributor III
New Contributor III

In our application, we have a workflow where approval requests are sent to the manager and the manager’s delegate if one is set. Here’s the process:

  1. First Level Approval:

    • When a request is initiated, it goes to both the manager and the manager's delegate (if set).
  2. Second Level Approval:

    • After the first level approval, the request should go to the manager's manager and the manager's manager's delegate (if set).

Issue: During the second level approval, if the manager’s manager’s delegate is set, the request is not being sent to the delegate.

Question: Why, during the second level approval, does the request not go to the manager's manager's delegate if one is set? Is there a way to use a custom query in a custom assignment block to fetch the manager's manager's delegate user key?

 

amitasingh123_1-1722611255040.png

 

3 REPLIES 3

amitasingh123
New Contributor III
New Contributor III

I found the solution. By using the query below in a Custom Assignment block of the workflow, the approval is directed to the delegate assigned to the manager's manager. We need to set the assigned delegate's name for the user on the "Do Not Disturb Delegate" at the user level.

SELECT userkey
FROM users
WHERE userkey = (SELECT u1.userkey
FROM users u
JOIN users m ON u.manager = m.userkey
JOIN users mm ON m.manager = mm.userkey
JOIN users u1 ON mm.donotdisturbdelegate = u1.username
WHERE u.userkey = ${user.id}
)

amitasingh123_0-1722616398951.png

 

 

 

So is there is any need to use custom assignment block?

Thanks,
Devang Gandhi
If this reply answered your question, please Accept As Solution and give Kudos to help others who may have a similar problem.

Its not mandatory to set users in donotdelegate 

Use below query

select
delegatedUserManager.userkey
from delegates d,
USERS delegatedUser,
USERS delegatedUserManager
WHERE delegatedUser.USERKEY = D.DELEGATEUSERKEY
AND delegatedUser.STATUSKEY = 1 AND DATE(D.ENDDATE) >= DATE(NOW())
AND delegatedUserManager.userkey=delegatedUser.manager AND D.userkey = ${user.id}


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