Create knowledge based on Major Incident flag

General Add comments

When a major incident occurs you can inform your users via the “News” topic used in the Knowledge Base. This way the information can be displayed via Self-Service after publishing it, preventing your end-users from calling the Service Desk or creating additional tickets.

Create a Major Incident flag

Since the Major Incident flag isn’t an out-of-the-box field, lets start with creating the Major Incident flag in the incident table.

Create a new dictionary entry of the type “boolean”, called “Major Incident”.

After creating the checkbox you can add it to the Incident form.

Create a Business Rule

After you’ve added the field to the Incident form you need to create a simple business rule.

Create the Business rule using the following condition and script.

Condition: current.u_major_incident == true
[cc lang=”javascript”]
var kb = new GlideRecord(“kb_knowledge”);
kb.source = current.sys_id;
kb.short_description = ‘MAJOR INCIDENT: ‘ + current.short_description;
kb.sys_domain = current.sys_domain;
kb.text = current.comments.getHTMLValue();
kb.workflow_state = ‘draft’;
kb.topic = ‘News’;
kb.category = ‘Major Incident’;
kb.article_type = ‘HTML’;
gs.addInfoMessage(gs.getMessage(‘Knowledge Article created’) + ‘: ‘ + kb.number);

Add Knowledge category Major Incident

Since it’s also possible to categorize Knowledge articles I suggest to add a category “Major Incident” which depends on the topic “News“. To easily add a category, open a Knowledge article of the topic News. Now add a category “Major Incident“ by personalizing the choices of the category field. This also makes it possible to report on it afterwards.

Visiblity of related Knowedge on Incident form

To be able to see the link between the Incident and the Knowledge article you can make the link to the knowledge article available directly on your incident form by adding the Knowledge->Source.

Testing the functionality

Now that everything is setup let’s open an incident and flag it as a Major Incident

When you save the ticket you will see the confirmation that a Knowledge article has been created and you can see it’s linked to the knowledge article directly on your incident form. In the background ServiceNow also automatically links the Incident to the Knowledge article.

Knowledge workflow

The script mentioned in this blog creates a draft article so I assume you have a Knowledge Manager who’s responsible for reviewing the article before publishing it using the out-of-the-box knowledge workflow.

If you have any questions, please don’t hesitate to drop me an e-mail on .img[at].img.

Leave a Reply