Taking Assessments under Employee Center UI

tahnalos
Kilo Sage

We have just put in Demand Management in the client's instance of ServiceNow.  We also have Employee Center installed on the client instance.  What we are looking for is a way to display the assessment while in the Employee Center, as stakeholders will be notified via email that they need to take an assessment.

 

The email will have this link which will take them to the assessment questionnaire:

 

https://<our_instance>.service-now.com/now/nav/ui/classic/params/target/assessment_take2.do%3Fsysparm_assessable_sysid%3D79b81e1b93309a106d07b0cd1dba10a7%26sysparm_assessable_type%3D0556fa9a8f12110040f82ab2f0f923f8

 

This takes us to the platform view which is not what we want.

 

Do we know how we can show the assessment questions in the Employee Center?

1 ACCEPTED SOLUTION

tahnalos
Kilo Sage

We used the following layout for the URL building.

 

        var homeURL = gs.getProperty ('glide.servlet.uri');
        var esc_link = 'esc?id=take_survey&instance_id=' + sysId;
        return homeURL + esc_link;
    
Thanks

View solution in original post

2 REPLIES 2

Bhavya11
Kilo Patron
Kilo Patron

Hi @tahnalos ,

 

From the OOTB we have Surveys in My active items, from that user can take questionnaires and complete Assessment.

 

Bhavya11_0-1728624058540.png

 

once Assessment trigger condition met then Assessment will be get created  and email will trigger to the User , then user can able to see in Surveys in My active items

Bhavya11_1-1728624221351.png

once clicked on that it will show the Questionnaires

 

Bhavya11_2-1728624247896.png

 

but if you want to change the email url then goto notification find the email client there they have defined, you want to change 

 

 

var portalSuffix = new sn_ex_emp_fd.FoundationNotificationUtil().getPortalSuffix();
	    var link = '/' + portalSuffix + '?id=ticket&table=incident&sys_id=' + inc.sys_id;
	    var message = 'View request';
	
	    if (email_action.sys_name.toString() === 'Incident Survey') {
	        link = event.parm2;
	        message = 'Take the survey';
	    }
	
	    var backgroundColor = 'background-color: #4F52BD;';
	    var color = 'color: #ffffff;';
	    var fontSize = 'font-size: 16px;';
	    var textDecoration = 'text-decoration: none; border-radius: 4px;';
	    var webKitBorder = '-webkit-border-radius: 4px;';
	    var mozBorder = '-moz-border-radius: 4px;';
	    var display = 'display: inline-block;';
	    var padding = 'padding: 6px 16px;';
	
	    template.print('<div style="margin-top: 16px;"><a href="' + link + '"');
	    template.print('style="' + backgroundColor + color + fontSize + textDecoration + webKitBorder + mozBorder + display + padding + '">');
	    template.print(message);
	    template.print('</a></div>');

 

 

 

Please mark helpful & correct answer if it's really worthy for you.

 

 

Thanks,

BK

 

 

   

 

tahnalos
Kilo Sage

We used the following layout for the URL building.

 

        var homeURL = gs.getProperty ('glide.servlet.uri');
        var esc_link = 'esc?id=take_survey&instance_id=' + sysId;
        return homeURL + esc_link;
    
Thanks