Wednesday, February 7, 2018

Service Now - JIRA Integration


Steps to Integrate JIRA with ServiceNow:
     1. Install the JIRA integration POC update set in the instance by going to Retrieved Update Set and then importing XML.

 2. Under JIRA Application, click on Settings. Enable the Jira Integration, enter JIRA URL, Credentials and Project Key.


s
        3. Create a field in JIRA called: “ServiceNow ID” under Issues.

        4. Get the ID of that custom field through this link

               5. Check the integration from ServiceNow to JIRA by creating an incident with Category as “Jira”
               6. For inbound integration select “Pull Data” and add intervals & identifier as required:


7. Test the Inbound integration too.







Tuesday, February 6, 2018

ServiceNow Asset Management


When the CMDB focuses on configuration information interactions between CIs, asset management will rather focus on organizational and financial aspects of equipment. The focus of this document is the CMDB and not asset management, but we cannot speak about one without mentioning the other. An asset manager wants to know the following
·       What is the price of a server and how much it costs
·       When the guarantee expires
·       How much workstations will need to be replaced next year etc.

Before a device (a CI) is installed, up and running delivering some kind of service, it has to be “created” in the real world as well as in the CMDB. This is also an aspect taken care of the asset management process.

The IT Challenge –   IT services run on IT assets; an asset estate that poses significant challenges and opportunities from a management, cost, and risk perspective. To mitigate risk and optimize cost, organizations need to know the hardware assets they have, where they are, who uses them, how they are used, how they are configured, what they cost, and the value they deliver. With wasted resources, limited visibility and inaccurate inventory, lack of accountability, and fulfillment or service delays are everyday impediments and risks for enterprises without an effective IT asset management (ITAM) capability.

The ServiceNow Solution- ServiceNow Asset Management automates your IT asset lifecycle. It tracks the financial, contractual and inventory details of hardware and devices –as well as non-IT assets – throughout their lifecycle. Asset requests are handled using workflows to obtain approvals, issue chargebacks, and provision services. Once an asset is deployed, Asset Management records all maintenance activity and enables IT to perform regular assessments, right up until asset retirement.

ServiceNow Asset Management provides an ITAM data repository to track inventory details, with data stored separately from the configuration management database (CMDB) for maximum flexibility. The ITAM repository tracks financial information, while the CMDB track configuration item(CI) details and relationships. By having both ServiceNow Asset Management and Service Now Configuration Management on the same platform, the traditional challenges around data integration, normalization, and data reconciliation are eliminated. As new assets get added, the business rule engine takes action and creates configuration item (CI) records in the CMDB when necessary. Any application on the ServiceNow Service Automation Platform, including customer-built custom apps, can also leverage this repository. Service Now Asset Management also works hand-in-hand with Service Now’s IT service management (ITSM) applications to provide better control of inventory and valuable insights that improve the quality of services.


Features of Asset Management-
A-Seamless Asset Provisioning
When new asset requests are received, fulfillment personnel can quickly review available inventory. Thus, an organization can provide quicker service for commonly requested goods and can also repurpose assets that have been returned. For requested items that are not in stock, Asset Management makes it easy to create a purchase order with a single click. Ordered assets are tracked and, once received, are automatically created in the system. So, asset records are created cleanly from the outset, with complete data related to the asset model, user request, order, and cost. And assets can be provisioned without administrative delay.

B-Easy Service Catalog Population
Asset managers can place asset offerings straight into the service catalog. This is done without the need to build complex web pages or ask a more technical Group to do it and ServiceNow Asset Management can bring in data directly from vendors. As service catalog items are published, asset managers can also decide on standard offerings and which groups of users are authorized to request the asset. Internal and recurring pricing supports different chargeback models.

C-Automated Inventory Management
ServiceNow Asset Management allows customers to control stockroom assets including hardware, consumables, and any other types of assets. IT can define a hierarchy of stockrooms, both physical and logical. And, for each model of asset to be maintained in stock, simple threshold levels can be defined to manage
Inventory and take action when levels run low. Automated rules either pull stock from a parent stockroom or process instructions to buy more from a vendor.
The organization can thus quickly provision employees with the assets they need to stay productive without over-spending on excessive inventory

D-Full Contract Management Capabilities
ServiceNow Asset Management includes contract management capabilities, with the ability to define any number of contract types and to create contracts against them. IT managers can assign contracts to team members and leverage the ServiceNow workflow engine to automate the contract approval and renewal process. ServiceNow Asset Management tracks the key terms and conditions of contracts, makes them easily searchable, and includes document management for version control and storage of electronic documents. Contract payment information is also tracked including the ability to generate expense lines on a schedule.
Contract management also includes reports, dashboards, and notifications to ensure that interested parties are fully aware of pending expirations, costs distributions, and other important contact information.

E-Track Total Cost of Ownership
ServiceNow Asset Management serves as a repository for all the costs associated with assets throughout their lifecycle. This can include the initial acquisition cost, lease charges, warranty fees, support and maintenance contract payments, and labor charges. By capturing all these costs, asset managers can determine the actual lifecycle costs for assets to identify areas of excessive cost and to find ways to optimize future spending.

Benefits of Asset Management

A)     Provide Better Visibility into the Asset Estate- Optimize the IT asset lifecycle and deliver better IT services. Make better decisions about asset utilization and new investments.

B)    Reduce CostsMinimize wasted resources by identifying and removing underutilized assets. Automate asset lifecycle processes to eliminate repetitive human tasks and the associated costs.

C)   Mitigate Risk- Enforce asset policies and regulatory requirements. Strengthen change management.

Thursday, November 9, 2017

Service Now Business Rules Assignments



BUSINESS RULES:-

1) Create a after update business rule on incident table such that, when ever the incident goes into "Closed" state, we will trigger a email saying to caller of the incident -

Hi <caller first name>,

We are happy to Help you.
Please contact us for any more details.

Thanks.


2) Create a before query on business rule on incident table, such that users who are having itil role, should see only ACTIVE incidents.

3) Create a before insert business rule on incident table, such that one user should not be able to raise more than 4 incidents in a day.

4) Create a ASYNC insert business rule on user table, such that whenever user's last_login time changes, user should be notified with an email saying "Your account has been logged in at : <updated last_login time>".

5) Create a before update business rule on problem table, such that only user's having role - (problem_manager) should be able to update it.

Monday, November 6, 2017

How to work with Events in Service Now ?



·        One use for system events in the ServiceNow platform is to control email notification for system activity, such as when incident records are updated, or change requests are assigned.

·        There are  number of useful OOB events that provides you with a broad view of application activity
·        If existing events do not meet your needs, you can create your own events to watch for specific changes to ServiceNow records.

·        Administrators can create a custom event to send an email notification if an existing business rule does not provide the necessary event. For example, you might want to notify people who initiate a service catalog request whenever a comment is added to that request.

·        For checking if an event can be used or not, first it needs to be registered under: “Event Registry”
·        Events can be called from various Server Side operations like: Business Rules, Script Includes or Workflows

·        A Sample script is as below:
if (current.operation() != 'insert' && current.comments.changes()) {
gs.eventQueue("incident.commented", current, gs.getUserID(), gs.getUserName());
}

·        An event when triggered from any of these scripts, can either trigger a notification or execute an event script


The gs.eventQueue function takes the following parameters:


Thursday, September 21, 2017

How Client Scripts works in Service Now ?

What is Client Script ?


Client scripts are shipped to the client (the browser) and run there instead of on the server. Users who know JavaScript can define scripts to run in the client browser. Several types of scripts are supported:

1. Scripts can run on the server, client and browser.
2. As Servers have direct access to database; server scripts are used to generate events.
3. Clients have direct access to forms; client scripts are used to make customization on forms.
4. Types of client scripts:
5. On load - This loads in the background when the form is clicked.
6. On Change: This runs when the user changes the value on the form.
7. On submit: this runs when the user submits the form. Used to validate the values that user added.
8. On celledit scripts: They are like on change. But except they run when the user changes values from the list view drop down.
9. Client scripts control the changes to the form by an API called Glideform.
10. The script calls the glide form API using g_form object.

G_user object is used to provide information about the current user.
G_user methods and properties :
- Makes calls to the database using the server without using the sql. This api uses the gr object.

- GlideAjax APi passes work to the server using scriptinclude.



Best practices of client scripts: 
1. We get a load of client scripts already in the system. So always keep a copy of the original before making any changes to it.
2. Client scripts take a bit time to load the data from server. So, use as less number of get.reference() functions to reduce the load on the server.
3. Write lengthy scripts on server side.
4. Call them using the script include.



Wednesday, September 20, 2017

What is Glide Form ? How it works ?


Glide form is normally use to customize the global applications and template applications which we have in the service now instance .With the use of Glide records we can control the applications form more like delete ,edit ,create ,change etc..

 The validations are done using Client Scripts. g_form is a global object in the Glide Form class. Client Scripts is the best place to excite the G_form objects. With the onload type of client script we can execute the form whenever we load the form. By the on submit type we can submit the form and post the values into the tables .With the on change type we can create a script that we can inter link one field with other field for auto changes .


The methods which we are discussing in the below can make custom changes to the form view of records.

·         G_form.setVisible = this method is use to hide and show the particular field in the form.
·         G_form .setDisplay= There is a little difference in between setVisible and setDisplay .We can maintain the hidden field space with using the setVisible method but with setDisplay we won’t have the space in between the hidden field .
·         G_form.addDecoration = with these we can highlight the particular field with start mark or with popup massage.
·         G_form. Flash = we can highlight the field with color and blinks or flash with particular no of times.
·         G_form.setLablelof =this method is required that user have to be” itill “role, so we can update the project name or whatever the text.
·         G_form.setValue = this method is use to check project status with check marks.
·         G_form.setReadonly =With this method we can make a particular field that will become as read only field, we can’t edit that field .
·         G_form.isnewRecord = to check the record which we are using that new record or old record.

How to display variables on Task Form from Request Item

This is very common and most useful requirement when working with Service Catalog Items.

Out of box, whenever any catalog item is submitted, all the variables will be presented / shown on request item. It will be very difficult for the fulfiller who are working on respective task associated to given request item to see all the variable. fulfiller has to go back to request item and has to come back to task form again.

Requirement : Copy all the variables presented on Request Item form to Task form corresponding to the Request Item.

Implementation :


- Open the catalog item.

- Open the Work flow corresponding to catalog item.

- Open the task where you want to see all the variables.

- Select the variables that you want to see on task form, shuffle to right hand side as shown below.