Have email notification on the 1st date of each month to group for contracts which reach or over expiration condition. (180 days expiration date)

sudaporn
Giga Expert

I want the system to send email when contracts reach or over expiration condition     , The email will notify everyone in group. For example , contract ends on 30/12/2017. For example , contract ends on 30/12/2017. Notification condition is 6 months before end date. So the system should send notification from 1/6/2017 ,1/7/2017, 1/8/2017.... until the contract is renewed or extended.

Now I used condition checks within 180 days and used "Contract Threshold breached" on notification

>> I want to email notification on the 1st date of each month (within 180 days)     How I config this.

find_real_file.png

find_real_file.png

1 ACCEPTED SOLUTION

Since you want to send email to each user whose contract will end.


so trigger event from the script and set the recipient in mail notification script from the value of event parm


http://wiki.servicenow.com/?title=Scripting_for_Email_Notifications#gsc.tab=0


find_real_file.png


View solution in original post

14 REPLIES 14

Please you check that picture below , I config , Do you think it all right ?


find_real_file.png



find_real_file.png


find_real_file.png


Change the querystring from code to actual query.


open user table in list view and apply the filter as per your requirement. Run the filter then copy the query from there.


find_real_file.png


use encoded query as string.



var strQuery = 'active=true';


gr.addEncodedQuery(strQuery);


Prasun
Giga Guru

Hello Sudaporn,



Run a Schedule script daily 00hours and check the day difference between contract expiry. if the difference is 180, 150,120,90... then fire the event.


Based on event, trigger the notification.


Hope it helps.




PS- please hit like or mark as helpful if helps.



Thanks


Prasun