Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Knowledge Base View log data retention

Akshay Kumar3
Tera Contributor

I need to have the retention policy for records in the Knowledge Use [kb_use] table set to [time period] so the number of records in the table stay manageable.

Acceptance criteria is like there are records in the [kb_use] table exactly [time period] old, when the system is left for 24 hours those records are automatically deleted from the table.

So is this something out of the box or we need to customize this?

2 ACCEPTED SOLUTIONS

sachinvic
Giga Guru

@Akshay Kumar3 

Hi,

This is available OOTB; you don't need to build a custom scheduled job.

  1. Navigate to All >>System Maintenance >>Table Cleanup (in some releases, this appears under Instance Scan).

  2. Search for the kb_use table and open its Auto Flush configuration.

  3. Enable the cleanup job and set Age in seconds to your required retention period.

  4. Save the configuration and verify the cleanup behavior.

By default, the retention is set to 365 days. The cleanup job must be activated for older records to be deleted automatically.

 

Modify the data retention policy for View logs

https://www.servicenow.com/docs/r/servicenow-platform/knowledge-management/auto-flush-kb-use.html

 

Helpful? Please mark the response as Accepted Solution ✅ and close the thread — this helps future readers find the solution faster.


Regards,
Sachinvic
✨ ArchX Certified | ✨ 16x ServiceNow AI MVP

View solution in original post

Tanushree Maiti
Tera Patron

Hi @Akshay Kumar3 

 

The OOB autoflush rule for kb_use is already defined in the sys_auto_flush table.

 

You just need to connect with your business stakeholders to confirm the retention period for KB articles, update the existing OOB rule accordingly, and activate it.

 

Link: https://<your_instance_name>.service-now.com/sys_auto_flush.do?sys_id=b7756171878d50106664857fe5cb0b14&sysparm_view=&sysparm_record_target=sys_auto_flush&sysparm_record_row=1&sysparm_record_list=tablenameSTARTSWITHkb_use%5EORDERBYname&sysparm_record_rows=1 

 

TanushreeMaiti_0-1791879761394.png

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

View solution in original post

2 REPLIES 2

sachinvic
Giga Guru

@Akshay Kumar3 

Hi,

This is available OOTB; you don't need to build a custom scheduled job.

  1. Navigate to All >>System Maintenance >>Table Cleanup (in some releases, this appears under Instance Scan).

  2. Search for the kb_use table and open its Auto Flush configuration.

  3. Enable the cleanup job and set Age in seconds to your required retention period.

  4. Save the configuration and verify the cleanup behavior.

By default, the retention is set to 365 days. The cleanup job must be activated for older records to be deleted automatically.

 

Modify the data retention policy for View logs

https://www.servicenow.com/docs/r/servicenow-platform/knowledge-management/auto-flush-kb-use.html

 

Helpful? Please mark the response as Accepted Solution ✅ and close the thread — this helps future readers find the solution faster.


Regards,
Sachinvic
✨ ArchX Certified | ✨ 16x ServiceNow AI MVP

Tanushree Maiti
Tera Patron

Hi @Akshay Kumar3 

 

The OOB autoflush rule for kb_use is already defined in the sys_auto_flush table.

 

You just need to connect with your business stakeholders to confirm the retention period for KB articles, update the existing OOB rule accordingly, and activate it.

 

Link: https://<your_instance_name>.service-now.com/sys_auto_flush.do?sys_id=b7756171878d50106664857fe5cb0b14&sysparm_view=&sysparm_record_target=sys_auto_flush&sysparm_record_row=1&sysparm_record_list=tablenameSTARTSWITHkb_use%5EORDERBYname&sysparm_record_rows=1 

 

TanushreeMaiti_0-1791879761394.png

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti