Service Portal basic structure for multiple homepages

yundlu316
Kilo Guru

Hi Experts,

I have a general question regarding Service Portal and how it's meant to be structured.   Our team is working on building a site with a single log-in   page and based on the role that a user may have, they would be directed to a certain page.   For example, let's say there are three roles: HR Specialist, IT Specialist, New Hire.   Depending on a user's role, they would be directed to one of those three site's homepage.   Should all three of those sites be it's own Portal?   Or should they all be within a single Portal?

From some of the available widgets, it seems like they should be separate Portals.   For instance, the Breadcrumb widget has "Home" defined as whatever is defined as the Homepage in the sp_portal form.   If each one of those roles have their own homepage, then this would be impossible if they were all housed within a single portal.

If the structure of my example is indeed to create three separate Portals, if I wanted all three of these Portals to come from a single login page, where do I put in the logic so that SN can direct the user to the right place?

Any insights or advice would be greatly appreciated!

1 REPLY 1

gustavogarcia_n
ServiceNow Employee
ServiceNow Employee

Hi David,



Each separate Portal allows you to create an SP environment with different themes, login pages, search sources, menus, etc. The SP pages, on the other hand, are portable from one Service Portal (e.g. sp) to another (e.g. hrsp). This means you can design each portal independent of each other for the purposes of their branding but create portal agnostic pages. You only need to be careful when a widget in one of these pages relies on code that lives in an include which is only imported in one of the portals. You'll see this in a baseline instance with the HR Service Portal.



For the purposes of your login page this means your login page can be moved from portal to portal. Once authenticated what you want to do is identify the correct portal to drop the user into by manipulating the global.SPEntryPage script include (nav_to.do?uri=sys_script_include.do?sys_id=3647c37253221200b0b0547cedc587fd) and modifying the getFirstPageURL function. Starting at line 90 we identify what SP you're on and redirect you to the correct URL. This likely just needs to be updated to check your roles and modify the service portal it redirects you to accordingly.



This is a pretty high level overview which I think may be helpful. Let me know if you have any questions!



Thanks,
Gustavo Garcia