login event

avani2
Giga Contributor

Hi,

I need to run a script on events table to check the frequency of user logging in.

Where the count of successful login attempts over the last 30 calendar days is greater than or equal to10, then the user is returned as a "Frequent" user.

Where the count of login attempts retrieved from the events table over the last   30 calendar days is lesser than 10, then the user is returned as a "Infrequent" user.

For the frequent users will have property set to "Opted out" i.e., for the newly introduced notification, the notification preference will be set as "Opted out".

For the infrequent users will have property set to "Opted in" i.e., for the newly introduced notification, the notification preference will be set as "Opted in".

Kindly help me how to achieve this logic.

2 REPLIES 2

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Avani,



You may find few artifacts from share helpful. Please search with keyword "Login" on share.


ServiceNow ShareNow Portal


Hetang Modi
Tera Contributor

Hi Pradeep, can you please share the updated link for the ServiceNow share portal?