Knowledge management customize workflow to approvals can only send to knowledge managers

sekharksnow
Tera Contributor

Hi,

In our organization knowledge management Ownership Group was defined as a mandatory field in the knowledge form, I don't want to remove this field. If I use the OOB approval workflow then the ownership group members receives the approval notifications. I want only the knowledge base managers will receive the approval notifications not the ownership group. Is there any customization is possible to only knowledge managers get the approval notification.

3 ACCEPTED SOLUTIONS

AMan1997
Tera Guru

Hi @sekharksnow,

 

Yes, we need to customize the Script Include - KBWorkflow for your requirement.
To elaborate :-
OOB Workflow is:
Knowledge - Approval Publish

It uses Script Include: KBWorkflow() and function: getApprovers()

So we will add below script to the Script Include:

 

 

getApprovers: function(knowledgeGR) {
        
        var kbManagers = knowledgeGR.kb_knowledge_base.kb_managers;
        var approvers = '';
        approvers = approvers + this._filterInactiveUsers(kbManagers);
        return approvers;
    },

 

 

 

See my example below:

 

For Knowledge Base : IT
The Owner and KB managers are assigned. (refer to the screenshot below)

AMan27_0-1691567044790.png

 

1. With OOB approval process, the approval goes to Owner and well as the Managers:

AMan27_1-1691567175936.png

 

2. But with the customized script include and function, the approval goes to only the Managers (as requested):

AMan27_2-1691567256988.png

 

AMan27_3-1691567296580.png

 

Please make the mentioned changes.

 

Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.

Thanks,



View solution in original post

Thanks, if my reply helped please mark it as helpful and correct based on impact.

 

To answer your doubt we have some OOB notifications which are triggered when state on Knowledge changes.

You can check for those notifications in "sysevent_email_action" table. (E.g. KM: Approve article for publishing).

View solution in original post

There doesn't exist a property for this. And unfortunately neither any OOB notification for retiring an article.

But you can create a custom notification for this requirement:

In Notifications table (sysevent_email_action), take reference of "KM: Approve article for publishing" and create a custom for "Retire".

 

Thanks,

View solution in original post

7 REPLIES 7

sekharksnow
Tera Contributor

"I have one more question. When I attempt to publish the article, an out-of-the-box notification is sent by ServiceNow to the managers. However, when I try to retire the article, no email notifications are sent to the managers. Is there any out-of-the-box property that needs to be enabled to send notifications to KB managers at the time of retirement?"

 

There doesn't exist a property for this. And unfortunately neither any OOB notification for retiring an article.

But you can create a custom notification for this requirement:

In Notifications table (sysevent_email_action), take reference of "KM: Approve article for publishing" and create a custom for "Retire".

 

Thanks,

 

 Thank you very much for your quick response.