How do I redirect agents to the HR Agent Workspace?

miro2
Mega Sage

Hi

How can agents be redirected to the HR Agent Workspace landing page when they log in to the instance, so that the workspace is their first page? Also, how can they be redirected to "/now/hr/agent/home" when they click on Homepage at the top left corner? These redirects should be controlled via user rules, ensuring that each HR agent with a basic HR role is redirected to the HR Agent Workspace.

The user clicks homepage logo , then should be redirected to /now/hr/agent/home

miro2_0-1709061522449.png


and see HR agent workspace. The same landing page user should see when they log in to the instance.

miro2_2-1709061124910.png

 

I tried to modify script include SPEntryPage, getLoginURL() but it still doesn't work. 
 

miro2_0-1709060714318.png


Has someone worked on similar use case? 

2 ACCEPTED SOLUTIONS

Hi @miro2 ,

 

I am not sure SPEntrypage work on agent workspace. But try below approach:

 

https://www.servicenow.com/community/now-platform-blog/6-ways-to-set-up-your-service-portal-for-redi...

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,

Sumanth Meda

View solution in original post

@Sumanth16
I also found information that the script including 'SPEntryPage' is dedicated for Service Portal only.

In the meantime, I found a way to redirect agents to the HR agent workspace using this script include SPEntryPage. This modification works, but I forgot to create the system property glide.entry.first.page.script and set it to new SPEntryPage().getFirstPageURL(). Now, users with the HR role will be redirected to the workspace when logging into the classic instance.

View solution in original post

7 REPLIES 7

Sumanth16
Kilo Patron

Hi @miro2 ,

 

 Is it possible to only expose the HR Agent Workspace UI to all the HR Agents and block them from accessing the classic UI? From the list view for HR Case, this should automatically launch the HR Agent Workspace option only.

A: Our intention from a product perspective is that Agents live in one UI and don’t need to navigate between both platform and Workspace UIs to do their job. The use case we recommend allows an administrator to deploy HR Agent Workspace to specific roles or groups of Agents, while keeping other Agents on the platform UI. This should also account for these Agents working together, so platform UI Agent A sends an HR Case URL to Workspace Agent B. Navigation handlers are the preferred method to achieve this type of configuration. You can follow the steps below:

  • You can control URL redirection using Navigation Handlers and they can be scripted to base destination URLs based off of roles and permissions. For example, to control whether an Agent is routed to Workspace or the platform UI, you would create a Navigation Handler on table sn_hr_core_case based on a new role you will need to add a workspace_view_role.
  • See sample script: 

var answer = g_uri.toString();  

if (!gs.getUser().hasRole('workspace_view_role')) { 

answer = "/now/workspace/hr/record/" + current.getRecordClassName() + "/" + current.getUniqueValue();

else 

answer = "nav_to.do?uri=%2F" + current.getRecordClassName() + "%3Fsys_id%" + current.getUniqueValue();

 

Please refer to below thread:

https://www.servicenow.com/community/hrsd-articles/hr-agent-workspace-your-faqs-answered/ta-p/231077...

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,

Sumanth Meda

Hi @Sumanth16 thanks for quick reply
I'm aware of that article, but it seems its purpose is different—it's not to redirect agents from the Homepage or when they log in to the classic instance. Please correct me if I'm mistaken.

Hi @miro2 ,

 

I am not sure SPEntrypage work on agent workspace. But try below approach:

 

https://www.servicenow.com/community/now-platform-blog/6-ways-to-set-up-your-service-portal-for-redi...

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,

Sumanth Meda

@Sumanth16
I also found information that the script including 'SPEntryPage' is dedicated for Service Portal only.

In the meantime, I found a way to redirect agents to the HR agent workspace using this script include SPEntryPage. This modification works, but I forgot to create the system property glide.entry.first.page.script and set it to new SPEntryPage().getFirstPageURL(). Now, users with the HR role will be redirected to the workspace when logging into the classic instance.