ServiceNow Portal Interview Questions 2026
What is Widget in Service Portal?
Widgets are reusable components which make up the functionality of a portal page. Widgets define what a portal does and what information a user sees. ServiceNow provides a large number of baseline widgets.
Examples include:
Approvals
Knowledge Base
My Requests
Widgets are reusable components which make up the functionality of a portal page. Widgets define what a portal does and what information a user sees. ServiceNow provides a large number of baseline widgets.
Examples include:
Approvals
Knowledge Base
My Requests
What is difference between widget and widget instance?
A Widget is the code template used to display content in the portal.
A Widget Instance is created when a Widget is added to a Page.
Every time a Widget is added to a Page it creates a new Widget Instance. Each Instance can be configured separately, allowing the same code template to be applied to different configurations. This allows a single Widget like the Simple List Widget to render multiple different types of content like a list of Incidents, a list of Links, or a list of Change Requests.
A Widget is the code template used to display content in the portal.
A Widget Instance is created when a Widget is added to a Page.
Every time a Widget is added to a Page it creates a new Widget Instance. Each Instance can be configured separately, allowing the same code template to be applied to different configurations. This allows a single Widget like the Simple List Widget to render multiple different types of content like a list of Incidents, a list of Links, or a list of Change Requests.
How to pass data from one widget to another widget?
We can use $emit, $broadcast and $on to send and recieve the data.
- Example by using $broadcast
Include below code in client controller on source widget to send data.
$rootScope.$broadcast('dataEvent', data);
Include below code in client controller on target widget to recieve data.
$scope.$on('dataEvent', function (event, data) {
console.log(data); // 'recieved data'
});
- Example by using $emit
Include below code in client controller on source widget to send data.
$rootScope.$emit('dataEvent', id);
Include below code in client controller on target widget to recieve data.
$scope.$on('dataEvent', function (event, data) {
console.log(data); // 'recieved data'
});
Note : According to ServiceNow San diego docs, Avoid the use of $rootScope.$broadcast() because it can cause performance issues. Reference link - Using AngularJS Events with Widgets
Detailed article about widget communication : How to communicate between widgets in Service Portal
We can use $emit, $broadcast and $on to send and recieve the data.
- Example by using $broadcast
Include below code in client controller on source widget to send data.
$rootScope.$broadcast('dataEvent', data);
Include below code in client controller on target widget to recieve data.
$scope.$on('dataEvent', function (event, data) {
console.log(data); // 'recieved data'
});
- Example by using $emit
Include below code in client controller on source widget to send data.
$rootScope.$emit('dataEvent', id);
Include below code in client controller on target widget to recieve data.
$scope.$on('dataEvent', function (event, data) {
console.log(data); // 'recieved data'
});
Note : According to ServiceNow San diego docs, Avoid the use of $rootScope.$broadcast() because it can cause performance issues. Reference link - Using AngularJS Events with Widgets
Detailed article about widget communication : How to communicate between widgets in Service Portal
How to pass data from one portal page to another portal page?
To access data between two pages, we need to send data via URL as shown below.
Set URL as below on source page client controller :
function ($scope, $window) {
var c = this:
c.onClick = function () {
$window.location.href = "/sp?id=new_portal_page&incidentNumber=" + INC00001234;
}
}
On the server side of the target page, we can use below code to access those parameters:
var incNumber = $sp.getParameter('incidentNumber');
To access data between two pages, we need to send data via URL as shown below.
Set URL as below on source page client controller :
function ($scope, $window) {
var c = this:
c.onClick = function () {
$window.location.href = "/sp?id=new_portal_page&incidentNumber=" + INC00001234;
}
}
On the server side of the target page, we can use below code to access those parameters:
var incNumber = $sp.getParameter('incidentNumber');
How to pass data from Server side to client side in widget?
We have data object to store data on server side script which later can be accessed in client script as shown in below example.
Server side script :
data.myNumber = 10;
data.myID = gs.getUserID(); //store data in myID variable
Client side script :
var userID = c.data.myID; //access stored data here
We have data object to store data on server side script which later can be accessed in client script as shown in below example.
Server side script :
data.myNumber = 10;
data.myID = gs.getUserID(); //store data in myID variable
Client side script :
var userID = c.data.myID; //access stored data here
How to pass data from Client side to Server side in widget?
We can use c.server.update() method to execute server side script again where it can access client side 'data' object as 'input' object.
Example : Send incident number from client side to server side code and get associated assignment group.
Client Script Code :
function() {
/* widget controller */
var c = this;
c.data.incNumber = "INC0001234";
c.data.actionName="getIncidentAssignmentGroup"
c.server.update().then(function(response){
console.log(response.assignment_group;
});
}
Server side code :
if (input) {
if (input.actionName == "getIncidentAssignmentGroup") {
var grIncident=new GlideRecord("incident");
if(grIncident.get("number",input.incNumber){
input.assignment_group=grIncident.assignment_group;
}
}
}
We can use c.server.update() method to execute server side script again where it can access client side 'data' object as 'input' object.
Example : Send incident number from client side to server side code and get associated assignment group.
Client Script Code :
function() {
/* widget controller */
var c = this;
c.data.incNumber = "INC0001234";
c.data.actionName="getIncidentAssignmentGroup"
c.server.update().then(function(response){
console.log(response.assignment_group;
});
}
Server side code :
if (input) {
if (input.actionName == "getIncidentAssignmentGroup") {
var grIncident=new GlideRecord("incident");
if(grIncident.get("number",input.incNumber){
input.assignment_group=grIncident.assignment_group;
}
}
}
Name different API's which are used in Service Portal?
Here is list of Service Portal API's that we can utilise, they are divided into two types Client Side and Server Side:
1. Service portal client side API's:
i) spAriaUtil - Show messages on a screen reader.
ii) spContextManager - Make data from a Service Portal widget available to other applications and services in a Service Portal page. For example, pass widget data to Agent Chat when it opens in a Service Portal page.
iii) spUtil - Utility methods to perform common functions in a Service Portal widget client script.
iv) spModal - Show alerts, prompts, and confirmation dialogs in Service Portal widgets. The SPModal class is available in Service Portal client scripts.
2. Service Portal server-side APIs
i) GlideSPScriptable - Interact with data and perform record operations in Service Portal widgets. We can access GlideSPScriptable methods by using the global $sp object.
ii) GlideSPSearchAnalytics - Generates search analytics from custom ServiceNow search widgets.
iii) spScriptedFacet - Define facet items, filters, or mapped queries for a facets object.
iv) spScriptedFacetService - Generate a multi choice or single choice facets object for an advanced search source.
Here is list of Service Portal API's that we can utilise, they are divided into two types Client Side and Server Side:
1. Service portal client side API's:
i) spAriaUtil - Show messages on a screen reader.
ii) spContextManager - Make data from a Service Portal widget available to other applications and services in a Service Portal page. For example, pass widget data to Agent Chat when it opens in a Service Portal page.
iii) spUtil - Utility methods to perform common functions in a Service Portal widget client script.
iv) spModal - Show alerts, prompts, and confirmation dialogs in Service Portal widgets. The SPModal class is available in Service Portal client scripts.
2. Service Portal server-side APIs
i) GlideSPScriptable - Interact with data and perform record operations in Service Portal widgets. We can access GlideSPScriptable methods by using the global $sp object.
ii) GlideSPSearchAnalytics - Generates search analytics from custom ServiceNow search widgets.
iii) spScriptedFacet - Define facet items, filters, or mapped queries for a facets object.
iv) spScriptedFacetService - Generate a multi choice or single choice facets object for an advanced search source.
How to refresh widget data in Service Portal if a user creates/updates/deletes a record using the standard ServiceNow UI in backend?
Record Watch is a tool that allows a widget developer to respond to table updates in real-time. For instance, by using Record Watch, the Simple List widget can listen for changes to its data table and if new records are added, removed, or updated, the widget can update itself in real-time.
e.g.
function(spUtil, $scope) {
/* widget controller */
var c = this;
spUtil.recordWatch($scope, "incident", "active=true", function(name, data) {
console.log(name); //Returns information about the event that has occurred
console.log(data); //Returns the data inserted or updated on the table
});
}
Record Watch is a tool that allows a widget developer to respond to table updates in real-time. For instance, by using Record Watch, the Simple List widget can listen for changes to its data table and if new records are added, removed, or updated, the widget can update itself in real-time.
e.g.
function(spUtil, $scope) {
/* widget controller */
var c = this;
spUtil.recordWatch($scope, "incident", "active=true", function(name, data) {
console.log(name); //Returns information about the event that has occurred
console.log(data); //Returns the data inserted or updated on the table
});
}
Most candidates who fail weren't underskilled.
They were underprepared.
These free questions cover the basics. But interviews go deeper. Discovery, ITOM, SecOps, Flow Designer, Now Assist, AI Agents. The Job Switch Kit gives you the full 15-day roadmap, 500+ structured Q&A across every module, a LinkedIn profile optimisation guide so recruiters find you before you even apply, and an interview bot that practices with you until you're ready. Most candidates walk in under-prepared. Don't be one of them.
Battle-tested questions with structured answers across every high-frequency topic — ITOM, SecOps Vulnerability Response, Discovery, Flow Designer, AI Agents, Generative AI, and Now Assist. Plus a dedicated Behavioral round covering HR questions, STAR method answers, salary negotiation, and career direction — because technical prep alone is not enough to get the offer
Day-by-day curriculum in the right order — scripting fundamentals, ITSM & CMDB, integrations, AI modules, and behavioral prep — so you peak exactly on interview day
Two modes: system-guided sessions with curated ServiceNow questions, and self-practice where you bring your own questions. Every session is recorded — download your Q&A transcript, review your answers, and pinpoint exactly where you need to improve
Proven strategies for counter-offers, CTC decoding & in-hand salary strategy
Notice period tactics, BGV prep, resignation playbook & offer comparison
Track completion per topic, rate your confidence per question, add private notes at question level and page level. Only you see them. Always know exactly what to tackle next
Step-by-step guide to rank in recruiter searches before you apply. Module-specific keyword lists, role-based headline and About section templates, experience bullet formulas, and certification display guidance built specifically for ServiceNow professionals
🔒 Secure payment via Razorpay · Instant access after payment
Your story could be the reason someone else lands their next ServiceNow role
If this content made a real difference in your prep, sharing that experience with your network helps other professionals discover it — and we'd love to say thank you with 10 days of premium access, completely on us.
Real Interview Questions & Answers
Questions shared by ServiceNow professionals and reviewed for clarity, relevance, and interview usefulness.
Share real interview questions and help the ServiceNow community prepare better. All submissions are reviewed before publishing.
🚀 Power Up Your ServiceNow Career
Join a growing community of smart ServiceNow professionals to stay ahead in interviews, sharpen your development skills, and accelerate your career.
No comments yet — be the first to share your thoughts!
Login to leave a comment or feedback. Your voice helps improve the content for everyone.