Automatically update the taxonomies quick link to the latest publish KB article,

Priyanka8
Tera Contributor

Hi All,

 

I have a requirement where i need to update the taxonomy quick link has to automatically get updated to the latest Kb article one the existing kb article is outdated or retired.

 

Thanks in advance.

3 REPLIES 3

Punit S
Giga Guru

Priyanka -Here's an outline of the steps you could take to automatically update the taxonomy quick link in ServiceNow when a KB article is retired or outdated:

Create a business rule that triggers when a KB article is retired or updated. The business rule can be based on the kb_knowledge table and the active field.

In the business rule script, retrieve the taxonomy quick link field value from the KB article record using GlideRecord.

Use the ServiceNow REST API to query the knowledge base to get the latest KB article that matches the taxonomy. You can use the sysparm_query parameter to specify the taxonomy filter and the sysparm_fields parameter to specify the fields you want to retrieve, such as the KB article number, title, and short description.

Update the taxonomy quick link field value in the original KB article record with the URL of the latest KB article. You can use GlideRecord to update the field value.

If the latest KB article is not found, you can update the taxonomy quick link field value to a default value, such as a generic message that the KB article is outdated or retired.

Add error handling and logging to the business rule to ensure that any errors or issues are captured and reported.

 

Hope you find this information useful. 

 

Thanks,

Punit

Priyanka8
Tera Contributor

Hi @Punit S 

 

Thanks for the response, can you please let me know who to get the servicenow rest api and how to achieve it.

 

 

Refer REST API documentation for further API guidance, you can achieve external data sync/connectivity with other KBs surnces as well  with REST. 

 

Mark this correct/helpful if it helps .