How to customize employee center for different business unit

subhadutta23069
Tera Contributor

we have multiple business unit in our project so they want to have their different portal design different banding and logs . but I am not sure how to do that different and how to re direct that particular user to their particular EC. So I though of creating different portal for that

1 REPLY 1

HrishabhKumar
Kilo Sage

Hi @subhadutta23069 ,

Based on your requirement you should create multiple portals and redirect users to the corresponding portals based on their roles, or other criteria.

I have provided steps for that below, Try this and see if it works.

Step 1: Create Multiple Portals

  1. Navigate to Service Portal Configuration:

    • Go to Service Portal > Portals.
  2. Create New Portals:

    • Click New to create a new portal for each business unit.
    • Fill in the necessary details such as Title, URL Suffix, and Home Page.
  3. Customize Each Portal:

    • For each portal, you can customize the theme, branding, and layout.
    • Navigate to Service Portal > Themes to create and assign different themes for each portal.
    • Customize CSS and branding elements (like logos) specific to each business unit.

Step 2: Redirect Users to Their Specific Portals

  1. User Criteria and Roles:

    • Ensure users are assigned to different groups or roles that correspond to their business units.
  2. Scripted Redirect (Login Page Customization):

    • Customize the login page to redirect users based on their roles/groups. This can be done using a script include or business rule that runs on user login.

               

 

 

var UserPortalRedirect = Class.create();
UserPortalRedirect.prototype = {
    initialize: function() {},
    
    getUserPortal: function(userId) {
        var user = new GlideRecord('sys_user');
        user.get(userId);
        
        if (user.hasRole('business_unit_1')) {
            return 'portal_1';
        } else if (user.hasRole('business_unit_2')) {
            return 'portal_2';
        }
        
        return 'default_portal';
    }
};

 

 

 

Example Client Script on Login Page:

 

 

function onLogin() {
    var userPortalRedirect = new UserPortalRedirect();
    var userId = g_user.userID;
    var portal = userPortalRedirect.getUserPortal(userId);
    
    window.location.href = '/' + portal;
}

 

 

 

Step 3: Configure User Access

  1. User Roles and Groups:

    • Define roles and groups for each business unit.
    • Assign users to the appropriate roles/groups.
  2. Access Controls:

    • Configure access controls to restrict portal content to the intended users.
    • Navigate to Service Portal > Pages and configure access for each page within the respective portals.

 

Thanks,

Hope this helps.

If my response proves helpful please mark it helpful and accept it as solution to close this thread.