What happens to permalinks when you move to a new portal?

Max T
Tera Contributor

We are consolidating 5 portals into employee center and wanted to know what happens to the permalinks once all the articles are moved over to employee center? For example if IT has a permalink within a knowledge article referencing another article in their knowledge base would the permalink automatically render in the same employee center portal or would the link reference back to the current IT portal?

 

We have plans to add in a redirect if anyone attempts to access an old portal so that may take care of any rendering issues but not entirely sure. Redirect is not currently turned on in lower environments so it's a bit tough to test at the moment. 

 

 

3 REPLIES 3

Mike_R
Kilo Patron
Kilo Patron

I think it depends how they were linked. Example: 

/sp?id=kb_article&sysparm_article=KB0000028 - This will link to the SP portal

?id=kb_article&sysparm_article=KB0000028 - This will open up the article in the current portal, no matter what portal.

Leri Andrews
Tera Guru

It's a bit of a minefield. We found a range of syntaxes in use due to historical migrations and people mistakenly using the url from the address bar. You can run a script to update any links in your articles and replace and you can apply a redirect for any that arrive in your 'old' portal - but beware of doubling article views as a result.

Lauren Methena
Giga Guru

This one is tricky. (The "minefield" description is appropriate here.)

IF you have followed a best practice of using "responsive links" in your articles, then you may have a chance to make them work. (Maybe.) It also depends on how you combine your KBs.

 

Responsive links .... When we code our permalinks, we leave off the first half of the URL. That way, whatever environment we're in, ServiceNow fills in the missing bit. 

So, a link that would normally be coded as https://hr-servicenow.com/hrportal?id=kb_article_view&sysparm_article=KB0010763 would become ?id=kb_article_view&sysparm_article=KB0010763.

Then - what happens is when that article gets cloned into any of the environments (Dev, QA, Prod), ServiceNow will fill in the first half. Examples: https://www.hr-dev.com/hrportal  or https://www.hr-qa.com/hrportal  (just examples - not real websites, but you get the idea - you can see the "dev" or "qa" differences. That way, your article opens in the same environment that you started in instead of taking you out of it completely and going to a different part of SNOW.

 

Here's the catch! (There's always a catch, right?) That article you're linking to must exist in the environment where you have the responsive link.

 

How it works: If I have copied Article A into a new knowledge base, and it has a responsive permalink to Article B, Article B must be in that new knowledge base, too, with the same KB number that's used in the permalink in Article A. Otherwise, the link will autofill with the appropriate front part of the URL - but the link won't work, because Article B doesn't exist in the new knowledge base.

 

The trick is to get the articles loaded into your new employee center/knowledge base using the same KB numbers AND for your links to all have been coded as responsive links.

 

If you haven't been doing that, you'll have to recode the links anyway. You might not have to map as many things or recode completely if you can get the articles combined with their same KB numbers, but you will still have some work cut out for you, if you have to make the links responsive or change the first parts of the URLs to match the environment or knowledge base you're in.

 

I hope this helps give you some ideas for how you might be able to do this a little more easily. OR, at least some best practices moving forward now that you're consolidating everything.

 

Good luck! I hope it goes smoothly and you have all the resources you need to get it done!