Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

glennguzzo
ServiceNow Employee
ServiceNow Employee

Following on from the great work to bring a custom Now Assist skill to review the quality of articles, in provides an option to replace the more subjective Article Quality Index (AQI) checklist approach on Knowledge Articles.

 

From this UI action, I have built a workflow that allows the Author to effectively ensure it has passed the quality check before allowing it to be sent for Publishing, following a workflow like this:

glennguzzo_0-1763103065704.png

 

This has been extended in the following way:

  • Custom Read-only field 'Quality Check Passed' on 'kb_knowledge' - which is set to Default.
  • UI action for List Edit, & Form view that has been modified to check for 4 x Satisfactory in the Response from the Now Assist Skill, to determine if it successful
 // Now check we have 4 : Satisfactory to pass it on u_quality_check_passed=true
    var satisCheck = /: Satisfactory/gim;
    var match = JSON.parse(output).model_output.match(satisCheck) || [];
    if (match.length == '4'){
        current.u_quality_check_passed='true';
        current.update();
    }

 

 

  • The UI actions for publish have an added condition && 'current.u_quality_check_passed'
  • The UI action for Checkout on a Knowledge Article calls :
 var newRecord = new KBVersioning().checkout(kbGr);

 

The function for performCheckout has been copied from KBVersioningSNC to KBVersioning, with the following line to set the Quality Check passed to False

 

KBVersioning.prototype = Object.extendsObject(KBVersioningSNC, {
    _performCheckout: function(current, ignoreAttachments){
        var oldSysId = current.sys_id+'';
        var currentLatest = this.getLatestVersion(current.article_id);
        this._resetFieldsForCheckout(current,currentLatest);
        current.u_quality_check_passed='false';

 

Version history
Last update:
yesterday
Updated by:
Contributors