Knowledge Article expiry notification process - new author issue

Rob Sestito
Mega Sage

Hey SN Comm Team,

So, I had opened a case with SN on this one since it is all an OOTB process. They got back to me with a proposed solution. Basically, they said that normally their best practice for article author is for that never to change. That is why OOTB the author field is hidden - but I feel that the author changing is pretty normal. When someone moves on out of the company or to another group, an article they created and became author for may not apply to them anymore when they change groups/positions/etc.. And of course if they leave the company then the article has nothing to do with them at all.

There is also a before inset business rule that controls the auto-subscription when someone becomes the author, reviser, and group owner.

Name: Auto subscribe author, reviser, & kb owner

(function executeRule(current, previous /*null when async*/) {
	
	if(gs.getProperty('glide.knowman.enable_km_subscription', 'true') == 'false') 
		return;
		
	var context = new ActivitySubscriptionContext();
	if(!current.article_id.nil()) {
		var knowledge_gr = new GlideRecord('kb_knowledge');
		knowledge_gr.addActiveQuery();
		knowledge_gr.setWorkflow(false);
		knowledge_gr.addQuery('article_id',current.article_id);
		knowledge_gr.orderByDesc('sys_created_on');
		knowledge_gr.query();
		if(knowledge_gr.next()){
			var subscription_gr = new GlideRecord('sn_actsub_subobject_stream');
			subscription_gr.addQuery('sub_obj_id',knowledge_gr.sys_id);
			subscription_gr.query();
			while(subscription_gr.next()) {
					context.getSubscriptionService().subscribeUser('7d8f537453003200fa9bd7b08cc5872c',current.sys_id,subscription_gr.subscriber_id.document);	
			}
			context.getSubscriptionService().subscribeUser('7d8f537453003200fa9bd7b08cc5872c',current.sys_id,current.revised_by);
		}
	}
	else {
		// for the newly created articles
		context.getSubscriptionService().subscribeUser('7d8f537453003200fa9bd7b08cc5872c',current.sys_id,current.author);
	}

})(current, previous);


SN has informed me of their suggestion that I can unhide the author name (already a thing for us), but it still does not apply with the business rule doing its job.

So, anyone know what I can do to this business rule to include when/if the author changes to someone new?

We would like to keep this process as it works very well, just not when the author changes which I feel is pretty common (with my given scenarios above).

Thank you in advance,

-Rob

1 ACCEPTED SOLUTION

Hey Lesley,

I built a Flow from Flow Designer and needed help. With the help of @Logan Poynter and his blog post Flow Designer Demo: Automate Knowledge Expiration Warning - I was able to achieve what I wanted and needed.

Highly, highly recommend it - this way is nice and clean, and able to hit current author. A lot of users that revise articles are just helping out and do not need to know what an article is retiring. So with this, we can just have the author and knowledge group managers know which articles are coming up for retirement.

Many do not like the auto-subscription method. Does not make sense in our world - but, this is personal preference.

Check out the post I reference, and let me know if you need additional help.

Cheers,

-Rob

View solution in original post

7 REPLIES 7

Susan Britt
Mega Sage
Mega Sage

Hi Rob,

Can you clarify exactly what you are wanting to achieve?  Is it the knowledge expiry notification you want to sent to the new author?

Hey, Yes - SN support told me that the process OOTB basically ignores the new author as best practices are the author never changing. I don't see how that's a best practice as that doesn't make sense. However, yes, when the author changes, I need the process to pick that up. I was thinking that the logic for that could be entered into the business rule. I ultimately think it would be better overall for the process to send the notification to whomever is the current author at the current moment in time the notification is gearing up to be sent, that it just gets sent to the current author. Advice, thoughts, know if this has been done/modified? Thanks, -Rob

Hey @sbritt - Any ideas on how I can achieve this with what is already OOTB? Or, should I start to design something from scratch to trigger a notification that grabs the current author, regardless if it has changed?

Thanks,

-Rob

Lesley W
Mega Guru

We are also currently workshopping this scenario. We have a user who has moved teams and is no longer working on knowledge articles but is Author/Revisor on just under 100 articles.

We managed to remove his subscriptions to the articles and update our notifications to only go to Ownership group members and unhide the author field to manually update to the Ownership Group Manager but the 'Articles expiring' notification is still going to the user as they are the revisor of previous article versions. Such a pain.

If you find a good process for this, please do share.