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

User update rule to send email to manager

asharma
Regular Contributor II
Regular Contributor II

Hi Team,

I want to send user's manager email notification of third party users where enddate of third party user is after 14 days. I tried below query and it is not working.

Users.statuskey=0 AND Users.employeeType in ('Third Party','ABC-A') AND DATE_SUB(Users.enddate, INTERVAL 14 day) = CURDATE() AND(Users.statuskey isupdated);

11 REPLIES 11

asharma
Regular Contributor II
Regular Contributor II

in advance config it is 

a.statuskey=0 AND a.employeeType in ('Third Party','AGP-A') AND DATE_SUB(a.enddate, INTERVAL 14 day) = CURDATE() AND(##a.statuskey isupdated##);

Abhishek0406
New Contributor III
New Contributor III

a.statuskey=0 AND a.employeeType in ('Third Party','ABC-A') AND datediff(a.enddate,now()) = 0 AND (##a.statuskey isupdated##)

 

Try this one

asharma
Regular Contributor II
Regular Contributor II

what does this query mean?

Abhishek0406
New Contributor III
New Contributor III

a.statuskey=0 AND a.employeeType in ('Third Party','ABC-A') AND datediff(a.enddate,now()) = 14 AND (##a.statuskey isupdated##)

asharma
Regular Contributor II
Regular Contributor II

Also, this use case says third party users and those are created through UI so is there a way where we can check or schedule this rule as detective because that will not gona update any attribute before 14 days of enddate.

NM
Honored Contributor II
Honored Contributor II

Hi @asharma , yes you can make the rule detective .. you will see an option retrofit detective in user update rule.

You have to schedule detective rule job which detect the user and send an email.

asharma
Regular Contributor II
Regular Contributor II

Trying but it says invalid condition. I am now trying below.

a.employeeType in ('Third Party','ABC-A') AND datediff(a.enddate,now()) = 14;

 

asharma_0-1724330405404.png

 

NM
Honored Contributor II
Honored Contributor II

Hi @asharma , semicolon is not required.

rushikeshvartak_0-1724330634731.png

a.employeeType in ('Third Party','ABC-A') AND datediff(a.enddate,now()) = 14

 


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

asharma
Regular Contributor II
Regular Contributor II

This works, thankyou

asharma
Regular Contributor II
Regular Contributor II

It is working in data analyzer if i try individually.