The CreatorCon Call for Content is officially open! Get started here.

KB article expiry warning email

ND7
Kilo Sage

Dear Experts,

 

I am trying to set an email notification. 

Send an Email if the KB article is going to retire in the next 7 days. Even though I have three KB articles expiring in 7 days I email did not trigger.  

Please help! 

Thank you.. 

Is my condition correct? 

find_real_file.png

find_real_file.png

1 ACCEPTED SOLUTION

Hi,

I just wanted to check-in on this and see if my reply above helped recap everything and guide you Correctly.

If so, please mark my above reply as Correct.

Thanks! 🙂


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

17 REPLIES 17

You are absolutely correct. Thank you for your encouragement. 

Great

Let me know if I can assist any further.

If one of my replies above helped also guide you Correctly, please mark it as Correct so that others can quickly jump to that information if they have a similar question.

Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Prasad Dhumal
Mega Sage

1) Create event by going to System Policy > Registry,

2) Then go to System Notification > Notifications and create a new notification. On the first tab, "when to send": choose "Event is Fired" then select your event

3) In who will receive, Configure as per your requirement.

4) Create a new scheduled job. Make Configure it to run daily 

refer below code 

var gr = new GlideRecord('kb_knowledge');
gr.query();
while(gr.next())
{
var exp = new GlideDateTime(gr.exp_date).getDate(); //exp_date as Article Expiry Date
if(exp.addDaysUTC(7)==new GlideDateTime().getDate())
{
gs.eventQueue('your_event_name',gr,gs.getUser()); //add the recepients according to your requirement
}
}

Regards

Thanks

I will create an event and schedule a job and see how that will go and let you know. 

Thank you Again.