Send out reminder email if KB article is in a state of "Draft" when it hits 30 days
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 10:38 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 11:07 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2023 04:57 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2023 05:54 AM - edited 12-18-2023 05:58 AM
can you share the email notification screenshot of both the part.
as this notification triggered from even and event is passing author to notification, this "parm 1" should be checked.
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution