How to Practice ServiceNow
Please submit a request through Contact Us
Service Now Introduction
ServiceNow is a software platform that supports IT service management and automates common business processes. This software as a service (SaaS) platform contains a number of modular applications that can vary by instance and user. Articles in this category help new users learn what services ServiceNow offers.
For More Info : Wiki ServiceNow Introduction
Service Now Introduction Part 1
Service Now Introduction Part 2
ServiceNow Form Design
Tables and Columns
How to Create Tables and Columns
ServiceNow Applications
Applications represent packaged solutions for delivering services and managing business processes. The ServiceNow platform offers several standard applications, such as Incident, Problem, and Change. Administrators can also develop and manage custom applications to meet business needs. When building applications on the ServiceNow platform, application developers can take advantage of existing platform features such as security access controls, workflow, reporting, and notifications as well as existing public data such as user and task records.
For More Info : Wiki Service Now Applications
Introduction to Snow Application / Module Creation
Snow Create Incident
Snow Orchestration & Cloud Provisioning
Business Rule
A business rule is a server-side script that runs when a record is displayed, inserted, updated, or deleted, or when a table is queried. Use business rules to accomplish tasks like automatically changing values in form fields when certain conditions are met, or to create events for email notifications and script actions.
For More Info : Wiki Service Now Business Rule
ServiceNow Express Core Application Configuration | Business Rules
ServiceNow Business Rule Introduction
ServiceNow Sample Business Rule
ServiceNow Business Rules Best Practices Part 1
ServiceNow Business Rules Best Practices Part 2
Service Catalog
The Service Catalog application is a way for customers to order pre-defined, bundled goods and services from your IT organization or other departments. It offers a consistent and intuitive online ordering experience with as much flexibility as you need. The catalog is a structured commodity with its own description, fields, price, and execution schedule.
For More Info : Wiki Service Catalog
How to setup Service Catalog
Service Catalog
Jelly Scripting
Apache Jelly is a Java and XML based scripting and processing engine for turning XML into executable code.[1] Jelly is a component of Apache Commons.
Fir More Info : Apache Jelly
ServiceNow Jelly Scripting Part 1
ServiceNow Jelly Scripting Part 2
ServiceNow Jelly Scripting Part 3
ServiceNow Server-Side Scripting Fundamentals
ServiceNow Client-Side Scripting Fundamentals
Script Includes
Create script includes to store JavaScript functions and classes for use by server scripts. Each script include defines either an object class or a function. Script includes run only when called by a server script.
For More Info : Wiki Service Now Script Includes
ServiceNow Script Includes Introduction
ServiceNow Script Includes
UI Actions
UI actions add buttons, links, and context menu items on forms and lists, making the UI more interactive, customizable, and specific to user activities. UI actions can contain scripts that define custom functionality.
For More Info : WIKI ServiceNow UI Actions
ServiceNow UI Actions
UI Policies
UI policies are client-side logic that governs field behavior and visibility on forms.
ServiceNow automatically generates client-side Javascript that the browser executes to enforce policies on the form being displayed. Each policy has a condition that must resolve as true to be executed. Policies determine the following field attributes and behaviors:
Make the field mandatory
Show or hide the field
Make the field read-only
Most basic UI policies are declarative and do not require scripting. You may also write your own scripts to handle more complex scenarios.
ServiceNow Express Core Application Configuration | UI Policies
SLA
A Service Level Agreement, or SLA, is a record which defines a set amount of time for a task to reach a certain condition. If the task does not reach the condition by a set amount of time, it is marked Breached.
SLAs are used to ensure that a task reaches end conditions within a certain amount of time, such as ensuring that an incident is closed or resolved within a few business days. The success rate can be reported on, and actions can be triggered at different times during the SLA's life-cycle (for example, notifying the manager when the SLA reaches 75% of its allotted time.)
For More Info : WIKI ServiceNow SLA
SLA
Service Now CMDB
Service Now CMDB
Overview of Application Scopes
Each application has an application scope that determines which of its resources are available to other parts of the system. Application scoping ensures that one application does not impact another application. You can specify what parts of the application other applications can access by setting application access settings.
Using REST API, You can perform
Retrieve Records from Table (GET)
Create a Record(POST)
Retrieve a record(GET)
Modify a Record(PUT)
Delete a record(DELETE)
Update a record(PATCH)
For More Info : WIKI ServiceNow Application Scope
ServiceNow Application Scopes
Overview of REST API Explorer in Service Now
REST (REpresentational State Transfer) is a simple stateless architecture that generally runs over HTTPS/TLS. The REST style emphasizes that interactions between clients and services are enhanced by having a limited number of operations. Flexibility is provided by assigning resources their own unique universal resource indicators (URIs). Because each operation (GET, POST, PUT, and DELETE) has a specific meaning, REST avoids ambiguity.
For More Info :
Wiki ServiceNow REST API Explorer
ServiceNow RestAPI Explorer
ServiceNow User Interface Design
ServiceNow Import Data
ServiceNow Conditional Workflows
ServiceNow Creating Custom UI Applications
Web Services
HTTP-based web services allow diverse applications to talk to each other. ServiceNow supports both inbound (provider) and outbound (consumer) web services. Glide Record - Special Java class,this can be used in Java script.
For More Info : Wiki ServiceNow Web Services
Snow Webservice Introduction
Snow Webservice Testing using SOAP
Mid Server
The Management, Instrumentation, and Discovery (MID) Server is a Java application that runs as a Windows service or UNIX daemon. The MID Server facilitates communication and movement of data between the ServiceNow platform and external applications, data sources, and services.
For More Info :
WIKI - MID Server
Webniar - How to setup Mid Server
How to setup Second Mid Server in Service Now
How to troubleshoot Mid Server
- It is always best practice to have two mid servers configured in PROD environment and create a cluster using those two mid servers for load balancing/fail over capabilities.
- It is always best practice to create a separate user a/c and associate to "mid_server" role and use this user a/c to connect to service now instance in Mid Server configuration.
- Use a user account with full read and write access on agent folder whenever Mid server installed on Windows machine
- If more than one mid server installed on your windows machine, always give different names to each mid server , you can override wrapper_override. conf file and give distinct names.
- Always refer to log files in windows machine in agent folder to troubleshoot any issues.
- Make sure to check synatx errors if you manually make any changes to config.xml in agent folder, this may cause not to start Mid server.
- Use any of the below three network tools to troubleshoot network related issues with the Mid server
-> Ping
-> Traceroute
-> telnet
Customer Service Management (CSM)
Getting Started with ServiceNow Customer Service Management
ServiceNow Customer Service Management - Setting up company profile and departments
CSM Feature Set
Account & Contract Management.
Product & Asset Management
Warranty & Contract Management.
Case Management
-
Case creation through various channels
-
Case assignment and Routing
-
Case Escalation and SLA
-
Entitlement Verification
-
Case Resolution
Knwoledge Base Management
Discovery
The ServiceNow Discovery application finds computers and other devices connected to an enterprise's network. When Discovery finds a computer or device, it explores the device's configuration,
provisioning, and current status and updates the CMDB accordingly. On computer systems, Discovery also identifies the software that is running and any TCP connections between computer systems.
Discovery creates all the relationships between computer systems (such as an application on one server that uses a database on another server).
-
Discovery Phase - Identify whether any devices are active and alive - Shazzam Probe
-
Classification Phase - Classification Probe
- Failures may occur if there is any network connectivity or incorrect login credentials
- Identification Phase
- Failure may occur if there are multiple items found for the same device
- Explortion Phase
- Possible failures - No space on device, no sudo permissions
- Port 22 used for SSH
- Port 161 used for SNMP
- Make sure you give correct IP range, otherwise there might be failure occur during scanning phase.
- Active = 0 and Alive = 0 means, nothing discovered.
- Active =0 and Alive =1 means, there is a device but not accessible for discovery.
Port probes are used in Discovery by the Shazzam probe to detect protocol activity on open ports on devices it encounters
Probes are launched by the MID Server to collect information about a device
For More Info : WIKI Discovery
Discovery Introduction
Phases in Discovery Phase
Discovery Troubleshooting in Scanning Phase
Troubleshooting Discovery in Classification Phase
Troubleshooting Discovery in Identification Phase
Troubleshooting Discovery in Exploration Phase
Discover your world - Credentials, CMDB and MID servers
Discovery, MID Server, CMDB, Automation, SCCM
www.youtube.com/watch?v=T8jLoQd_iTk
How to Resolve Probes and Sensors conflicts
dscy_credentials_affinity.list - This will give you all the credentials affinities
Right click on any CI header -> show XML - display all the relevant information about the selected CI
Right click on any CI Header -> History - this gives you history of the CI when it got created and what are all the changes made to this CI
Select CI -> Discovery Events - Gives you history of the all the events happen on the CI
- Make sure 'Cache results' check box is always selected for all the custom probes in order to minimize the performance, For eg : If there is no change in CPU from last run to current run, no need to execute the probe .
- Discovery Process flow outlined in below diagram
Best Practices for CMDB and Discovery Implementation
- Keep Production and Non Production MID Servers separated
- Use easily distinguishable folder names for separate MID Servers on the same host.
- Evaluate MID Server resources to determine whether to deploy multiple MID Servers on the same host or not
- Avoid copying and pasting a config.xml file from the folder of a previously installed MID Server
- Modify each config.xml with respect to each Mid server manually as per the target Service Now Instance
- Leave always mid_sys_id value blank in config.xml
- Configure Service Now Instance URL, User Name, Password , Mid Server Name, Mid Server Display name manually by editing config.xml, Make sure to always set ‘encrypt’ value to ‘true’
- The Wrapper name and display name of each Mid server service must be unique ( Agent -> Conf -> wrapper-override.conf)
- Enable Clustering Multiple Mid servers in PROD environment for load balancing and failover protection (Mid Server -> Capabilities -> Shuffle the Mid Server to right hand side) - Do same for another MID Server which need to be clustered.
Dependent on the need, clusters are best used to help support large discovery tasks that need to be completed in a shorter amount of time.
- Make sure there are no firewalls are blocking communication b/w server and instance.
- Select the Mid Server -> Configuration Parameters -> New -> Make sure ‘mid.use_powershell’ value should be true
- Avoid running more than one Discovery schedule same time
- Discovery Configuration Console allows you to configure Ignore device list that you don't want to discover.. Best way to avoid discovering unwanted CI's
- Use ' Discovery Behavior' for more advanced and effective scanning CI's in Discovery schedule, Not only you can choose more than one Mid server, but also you can customize what port probes that you want to scan as well. For eg : If you run quick discovery, by default it will scan for all port probes such as http,slp, wins, dns, ssh, wmi, snmp, etc..With Behavior feature, you can customize and specify port probes only which you want to scan, For eg : If you are not interested to scan Network devices, then you can remove SNMP port probes in your schedule.
- How to check whether WMI Access is enabled on target Windows server or not ?
Answer : Issue below command in the windows machine where MID Server is running
wmic /node:"10.0.0.1" /user:"domain\user" /password:"password" path win32_operatingsystem
The Benefits of good "Behavior" while Performing Discovery Scans
A Schedule can utilize a behavior
Behaviors contain functionalities
Functionalities contain functionality definitions
Functionality definitions are containers of port probes
Port Probes are derived from IP Services
- It is an absolute best practice not to mix MIDServers in either a Load Balance or Fail Over cluster that do not have the same capabilities. Only have clusters of the same type of MIDServer (Windows/Unix).
- It is very strongly suggested that any changes or updates you want to make to “factory” queries that you duplicate said probe/sensor copying the configuration to a custom name then making your updates. This way you ensure that any changes to the default ServiceNow Discovery probes will be updated for later review of capabilities that can be added to your customizations. It is also valuable to utilize update sets so that development work can transferred easily across instances.
- A good practice is to identify the type of information coming back and if it is going to be used across all Operating systems for the type(s) of devices before you make any changes to out of box probes/sensors
- If you customize any probe/sensor, make sure Major and Minor version of probe exactly match with the corresponding Sensor Major and Minor versions
Asset Management
alm_item.list
alm_hardware.list
Microsoft SCCM Integration
Microsoft SCCM Integration 3.0
ServiceNow: SCCM Integration Training
Microsoft SMS/SCCM integration 2.0
There are multiple ways we can discover Windows Servers, One is Service Now Discovery will discover all windows servers based on configured schedule, Second way is, If any organiazation already have SCCM in place to monitor all the windows servers, then Service Now can activate SCCM Plugin and talks to SCCM and loads the CI's into CMDB table, Discovery no need to talk to each Windows server again in the network. This will avoid scanning of same windows server again.
What is SCCM ?
System Center Configuration Manager (SCCM)
System Management Server(SMS)
SCCM manage large groups of windows computer systems ( remote control/patch management, s/w distribution, os deployment, hardware/s/w inventory)
Microsoft SCCM Integration 3.0
Why we need SCCM ?
- Query each SCCM table directly from SNOW and place data into CMDB
- By default, this plugin not active, you have to manually activate this plugin
- SCCM Populates a flat transition table in SQL server on periodical basis, Service Now Imports from the SQL Server transition table into CMDB
- If Discovery of same CI doesn't create duplicate CI's in CMDB
- Removal of s/w packages i SCCM servers imported relationships of that s/w in CMDB
Service Catalogs in ServiceNow
The Service Catalog application is a way for customers to order pre-defined, bundled goods and services from your IT organization or other departments. It offers a consistent and intuitive online ordering experience with as much flexibility as you need. The catalog is a structured commodity with its own description, fields, price, and execution schedule.
Types of Service Catalog : Record Producer, Order Guide, Normal Catalog Item.
Execution Plan
An execution plan describes how a catalog item is procured, configured, and installed. Each execution plan contains one or more tasks.
For example, an organization might create an execution plan for delivering a corporate standard PC that contains these tasks:
Procure the PC from a supplier.
Configure the PC according to the requester's specifications.
Deliver the PC to the requester.
An execution plan is not specific to any one catalog item. There could be many different models of PC that a user can order, all using the same execution plan. It is usually not necessary to create a new execution plan for each individual catalog item in a mature service catalog.
Note Note: Execution plans are not as powerful or flexible as workflows, and cannot be designed using a graphical editor. Execution plans are useful in some circumstances (for example, if you need to build your processes programmatically or through imports), but ServiceNow typically recommends using workflows for request fulfillment processes.
For More Info : WIKI ServiceNow Service Catalog
Webinar - Introduction to Service Now Service Catalog & Workflow
WIKI Service Now - Execution Plan
Webinar - Service Now Catalog Item & Execution Plan
Webinar - Service Now - Conditional Workflow
Service Catalog Order Guide
Order guides allow customers to make a single service catalog request that generates several items.
For example, a New Employee Hire order guide could contain several items that new employees commonly need, such as business cards, computer, and cell phone. After selecting this order guide, the customer can then provide information about the new employee, including location and job title. The order guide then submits an order for catalog items like business cards, based on the details provided.
Order guides determine which catalog items to order by evaluating order guide rule conditions. Information the customer enters within the order guide can be passed as cascading variables to the ordered items, allowing common information to be reused across multiple items.
Administrators and catalog administrators can create order guides for the service catalog.
Order guides can be run automatically, generating a set of ordered items without needing to manually submit a service catalog request. For example, an onboarding workflow for a new employee can automatically run an order guide to order items for that employee. This feature is available starting with the Eureka release
For More Info : WIKI Service Now Order Guide
Webinar - Service Catalog Order Guide
Transformation Map
A transform map is a set of field maps that determine the relationships between fields in an import set and fields in an existing ServiceNow table, such as Incidents [incident] or Users [sys_user]. After creating a transform map, you can reuse it to map data from another import set to the same ServiceNow table.
The Transform Maps module enables an administrator to define destinations for imported data on any ServiceNow tables. Transform mapping can be as simple as a drag and drop operation to specify linking between source fields on an import set table and destination fields on any ServiceNow table. Use transform mapping to map source and destination fields dynamically.
Creating New Transform Maps
Import Sets
Import Sets is a powerful tool used to import data from various data sources, and then map that data into ServiceNow tables. The Import Sets table acts as a staging area for records imported from a data source.
For More Info : WIKI ServiceNow Import Sets
Integration Best Practices - Import Sets
How to Use Background Script in SNOW?
Background Scripts
How to get CSV/WSDL/XML from any Table in Service Now ?
Answer : Service Now Instance URL / <Table Name>.do?CSV - For CSV file
Service Now Instance URL / <Table Name>.do?XML - For XML file
Service Now Instance URL / <Table Name>.do?WSDL - For WSDLfile
Example : https://demo005.service-now.com/incident.do?CSV
How to open Java Script Executor
Answer : Ctr + Shift + Alt + J - Press this key on any form
How do you Impersonate User in Service Now ?
Answer : Click on 'Administrator Icon' , Enter the User Name and click on 'Ok
- How to Edit Application and Modules
Answer : Search for the application which you want to Edit, Right click on the application, choose ' Edit Application Menu, This will display all the modules in the applications, you can verify the table name, roles associated at application level and module level.
- How to find the sys_id of a specific object in service now ? For eg : I want to know the sys_id of 'Create New' Module in 'Change' Application
Answer : Search for 'Change' Application, Edit , Right click on the Module which you want to find the sys_id,, choose 'Copy sys_id' field, this will display you the corresponding sys_id of selected module/application/workflow/table/etc..
- Shortcut to see contents of the table
Answer : Type <table_Name>.list : For eg : 'change_request.list' in Search Menu
- How to find out a table for a specific form ?
Answer : Launch the form, Right click on top header section, choose Personalize -> Table, This will list out the table name and all the existing columns in a table.
- How to see and modify the Work flow?
Answer :
Search for 'Workflow Editor' -> Choose 'Open' Menu -> Search for the work flow that you want to open, and select it -> If it is already published, then choose 'Check out' from the 'Gear' Menu -> Modify the work flow, and publish finally.
- How to see the existing Events logs?
Answer :
Search for 'Events' -> Select 'Events' Module under 'System Logs'
- How to see existing events defined in service now?
Answer : Search for 'Events' -> System Policy -> Registry
- How to See Approvers tab when a catalog item is requested ?
Answer : Once the catalog item order is submitted, You should see a message 'Thank you , your request has been Submitted' , click on the 'Description Link' -> Right click on Request Item page -> View -> Default -> You will see approver tab, if you belongs to approver group.
- How to see the WSDL for any table ?
Answer : <host name>/tablename.do?wsdl
Example : https://dev15439.service-now.com/incident.do?wsdl
- How to trigger an event using script?
Answer : gs.eventQueue('change.release.window.rejected', current, gs.getUserID(), current.number);
- How to see all the existing work flows ? and belongs to which table ? etc . ?
Answer : Search for 'Workflow Versions', You can filter by work flow name, table name etc..
- How to add log messages and view them in Service Now ?
Answer : Below are all the possible ways how we can log specific message
- current.field_name.setError("Hello World"); Will put "Hello World" below the specified field
- gs.addInfoMessage("Hello World"); Will put "Hello World" on the top of the screen
- gs.print("Hello World"); Will write to the text log on the file system but not to the sys_log table in the database
- gs.log("Hello World"); Will write to the database and the log file. Too much of this can adversely affect performance
To view - System Log -> All , It will show all the log messages
How to Delete all the records in a specific table and associated all referenced tables?
If you have a requirement to delete all the records from a specific table and associated reference tables
- Goto Tables and Columns
- Select the table name you want to delete all the records
- Bottom side, you will see all the referenced tables associated to the selected table
- Click on 'Delete All Records' button. this will delete all the data.
How to increase Duration of UI Transaction in Service Now ?
Answer : https://<<Company>>.service-now.com/nav_to.do?uri=%2Fsysrule_quota.do, Modify the value of Maximum Duration (seconds) value , By default this value is 290 seconds.
Or
- Look for below table data sysrule_quota.list, and filter 'Name' by 'UI Transaction' and edit the record
How to see the Pach and version related info in SNOW?
Type 'Stats' in application navigator How to appear for certification
How to see the history of Transform Maps?
Answer : Search for 'Transform History' , Identify the 'Transform Map' in results and you will see corresponding Import Set and etc..
How to compare whether any String Contains other String ?
Answer : Use 'indexOf("Search") > -1
Eg : if(this.rec.u_service.indexOf("SAM") > -1 && this.rec.u_subtype == ""){
allowed = true;
}
- How to Perform 'Null' or 'blank' check on a specific field
var secondQuery = new GlideRecord('cmdb_ci_computer');
// Query CMDB Computer table with the store ID and find out computers whose Store ID is blank
secondQuery.addQuery('name','CONTAINS',splitName);
// Check if 'u_store' field value is null or blank
secondQuery.addNullQuery('u_store');
secondQuery.query();
How to Query Users based on specific Role ?
var firstQuery = new GlideRecord('sys_user');
var encodedString = 'roles=store_user';
encodedString = encodedString + '^user_nameLIKEst';
firstQuery.addEncodedQuery(encodedString);
// This quey returns all user accounts whose name contains 'ST' , that means get all Store user accounts
firstQuery.query();
How to include Date comparisions in Glide Query in Service Now ?
var ci=new GlideRecord('cmdb_ci_netgear');
ci.addEncodedQuery('sys_created_onNOTON2016-09-14@javascript:gs.dateGenerate(\'2016-09-14\',\'start\')@javascript:gs.dateGenerate(\'2016-09-14\',\'end\')^sys_class_name=cmdb_ci_netgear^u_nameLIKEravi);
ci.query();
while(ci.next()){
gs.print(ci.u_name);
}
// How to set a field required in using script
// Below is the code snippet wrote in UI Action (Client Side) to make a specific field 'Comments' required.
g_form.setMandatory('comments', true);
// How to display an error message at field level ? Wrote below code snippet in UI Action to display 'comments' field mandatory information in red color just below the 'comments' field. "sys_properties.list' stores all the key,value pair of messages.
g_form.showFieldMsg('comments', getMessage('Please enter a comment when reopening an Incident'), 'error');
// Display Alert message in client script, Retrieves from 'sys_properties.list' based on key provided below.
alert( getMessage('Please enter a comment and click on Reopen Incident button'));
// How to include a field value changes in Work Notes section on Incident Form, For eg : I wanted to display Old & New values of 'Hold Reason' field on Incident form whenever updated
-> Go to Incident Form, click on 'Filter' button right to 'Activity' as shown below
-> Click on 'Configure available fields' link
-> Select the field that you want to monitor old and new values, shuffle it into right hand side.
-> After every time you modify the specified field on Incident, you should able to see old value and new value as shown above.
Service Now Certification Program
Service Now Certification Registration
https://www.webassessor.com/wa.do?page=publicHome&branding=SERVICE_NOW
Service Now Forum
https://community.servicenow.com/community/knowledge-user-conference/