Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

I had a question on the community that was kind of tricky, but still the use case was really good. It's was all about trying to use a processor to shorten down the url for knowledge articles that the end users were sharing.

Example 1 with original url: https://dev44006.service-now.com/sp?id=kb_article&sys_id=471ee81eff6002009b20ffffffffff34

Example 2 with short url: https://dev44006.service-now.com/kburl.do?article=KB0000032

In this case it also made it easier for the end user since it only needed the article number and can really easy just share the number with a colleague who can easy find it.

Requirement here was also that it should work for users that wasn't logged in.

Just to make sure I get your attention, I'll thrown in an issue with the solution that appears if you have installed applications like Customer Service Management and how to solve that.

 

//Göran

 

      find_real_file.png 

find_real_file.png

Comments
joedumond
Tera Contributor

Exactly what I was looking for!!!

Thank you

Michael Crocker
Giga Explorer

I see that processors are deprecated in Paris, and they are directing us to use Scripted REST APIs in their place. Do you have a similar mechanism for creating a short URL using scripted REST APIs as you did for processors?

Randall King
Tera Expert

We are interested in the same thing, too. We have yet to launch into production yet, and we don't want to develop something based on a deprecated process.

Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

I do not see how Scripted REST would replace this specific function (short URL) That would give you a bizarre URL for the end-users and not so short either. IF you don't want to build it on the processors, I would say there are 2 other options you can go for.

1. Build a UI Page that takes parameters in the URL and do the redirection there. The negative part is that it's jelly to some degree 😃

2.Handle this through a Service Portal Pages instead.

Also, remember that some of the widgets nowadays, if I don't remember wrong, e.g., knowledge, can take the article number as a parameter in the URL as well.

//Göran
Feel free to connect:
LinkedIn
Subscribe to my YouTube Channel
or look at my Book: The Witch Doctor's Guide To ServiceNow

Randall King
Tera Expert

It turns out that we were able to do this using UI Pages. Here's what it looks like if we want to direct ourdomain.edu/onedrive to a KB solution about OneDrive for Business:

find_real_file.png

One of our developers was able to make this work for us. I am not a developer, so I didn't understand what you were saying about Jelly. I didn't understand that Jelly is a technology of some sort. What are the negative implications of using that?

Roger Poore
Tera Guru

I know this is old but, for anyone looking for a solution for shrinking ServiceNow URL's, feel free to use or get ideas from my solution for this.

https://developer.servicenow.com/connect.do#!/share/contents/7571716_shrunknow_the_url_shortener_that...

 

Adam Flagg
Tera Contributor

This was very helpful. I would recommend removing everything before the /sp?sysparm etc. so it works on all prod and sub-prod instances with the local copy of the KB for testing.

 

Eg:

window.location.replace("/esc?id=kb_article&sys_id=54acdfbc1b981014b6381f4ead4bcb6f");
Roger Poore
Tera Guru

Scripted REST is how I did it.  Is it memorable?  No. Is it short?  It's much shorter than it could be if not used.

find_real_file.png

Randall King
Tera Expert
That wouldn’t have worked for our use case. We have published dozens of short URLs and trained our customers to use them. In our legacy environment, those mostly redirect to KB articles. We needed a solution where we could keep the exact URLs—without compromise—but have them redirect to KB articles in ServiceNow. The host name is going to be used for our service portal, so the redirect solution had to be in ServiceNow. UI Pages is a perfect solution for us.
cuong2
Tera Contributor

This link is not working.

Roger Poore
Tera Guru
cuong2
Tera Contributor

I get the message: "This project can not be found or is no longer available" when I click the link.

Version history
Last update:
‎08-19-2018 11:20 PM
Updated by: