Send out reminder email if KB article is in a state of "Draft" when it hits 30 days

Luke James
Tera Contributor

Hi All, 

 

I have a requirement from a customer for when a knowledge article has been in a state of draft for 30 days, that it sends an e-mail to the author to remind them. 

 

Has anyone had a similar requirement? If so how and what was the script? 

 

Many Thanks, 

 

Luke

7 REPLIES 7

Ideally such scheduled job should run at mid-night (00:01) when date change and we count the day.  The current day has 24hour window and you can't run this job every minute. KB counts are not that much to utilize the system resource just for draft reminder. 

 

The query returns all draft KB, where sys_updated_on is 30days ago , it can be last 31st day,32nd ...... and so on. You can check the output of below line in background.

 

Note: Today when you are testing, there may be some KB showing "sys_updated_on" much higher that 30days, but after you implement this scheduled job logic, 30day logic calculate everyday,  the email count may increase if KB Authors are not updating article even after reminder. 

gs.print("KB->"+grKB.number +"Updated on ->"+grKB.sys_updated_on+ "State->"+grKB.workflow_state);

 


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

Hi @AshishKM ,

 

Thanks very much for this. I've used this code. And it fires the event as expected. The issue I have is that when I preview the e-mail, it's not displaying the author? 

 

Kind Regards, 

 

Luke

can you share the email notification screenshot of both the part.

 

AshishKMishra_0-1702907687386.png

 

as this notification triggered from even and event is passing author to notification, this "parm 1" should be checked.

 

 

AshishKMishra_2-1702907875299.png

 


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution