0%

Book Description

Unleash the full potential of ServiceNow from foundations to advanced functions, with this hands-on expert guide fully revised for the Helsinki version

About This Book

  • Give your ServiceNow Helsinki implementation a powerful kick-start by understanding the deep capabilities of the platform,
  • Learn by doing with an extended, comprehensive example, creating a feature-rich, secure and automated application from the ground up
  • Interact with your whole organization by integrating with REST web services and build a custom Service Portal interface

Who This Book Is For

This book is aimed at advanced ServiceNow System Administrators and developers who would like to gain greater control of ServiceNow and its architecture. The book expects you to be new to ServiceNow, but have a good grounding in internet and computing technologies, like HTML, JSON, REST and database systems. Readers should be especially familiar with JavaScript, and be keen to extend and alter the platform. With this book, they will be able to develop a new application for their company.

What You Will Learn

  • Build custom scoped applications that access the full ServiceNow API
  • Build a modern, responsive self-service interface with Service Portal
  • Design feature-rich, responsive, automated workflow systems
  • Design powerful data-driven applications
  • Control information flow and apply business logic with Business Rules
  • Write efficient and effective client-side JavaScript
  • Learn how to authenticate and secure Web Services
  • Integrate and exchange data with people and systems
  • Create and secure your systems with proper access control

In Detail

ServiceNow is a SaaS application that provides workflow form-based applications. It is an ideal platform for creating enterprise-level applications giving requesters and fulfillers improved visibility and access to a process. ServiceNow-based applications often replace email by providing a better way to get work done.

The book steps through the main aspects of the ServiceNow platform, from the ground up. It starts by exploring the core architecture of ServiceNow, including building the right data structure. To add business logic and control data, and interactivity to user interaction, you will be shown how to code on both server and the client. You will then learn more about the power of tasks, events and notifications. The book will then focus on using web services and other mechanisms to integrate ServiceNow with other systems. Furthermore, you will learn how to secure applications and data, and understand how ServiceNow performs logging and error reporting. You will then be shown how to package your applications and changes, so they can be installed elsewhere and ways to maintain them easily. If you wish to create an alternative simple interface, then explore ways to make ServiceNow beautiful using Service Portal.

By the end of the book, you will know the fundamentals of the ServiceNow platform, helping you be a better ServiceNow System Administrator or developer.

Style and approach

Explore how to implement business logic and automated workflows and write effective code by flexible choices for client-side scripting

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

Table of Contents

  1. Mastering ServiceNow Second Edition
    1. Mastering ServiceNow Second Edition
    2. Credits
    3. Notice
    4. About the Author
    5. About the Reviewer
    6. www.PacktPub.com
      1. Why subscribe?
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Downloading the color images of this book
        3. Errata
        4. Piracy
        5. Questions
    8. 1. ServiceNow Foundations
      1. Diving into the infrastructure
        1. Keeping up with the examples
        2. Being in charge
        3. Changing your instance
        4. Knowing the platform
        5. Choosing functionalities with plugins
        6. Running the latest version
        7. Digging into the hosting
        8. Knowing the nodes
      2. Exploring the database
        1. Introducing the Gardiner Hotel data structure
        2. Creating tables
          1. Adding fields
          2. Knowing what's happening
        3. Introducing the dictionary
        4. The globally unique identifier
      3. Storing data
        1. Storing files as attachments
        2. Setting properties
      4. Reference fields
        1. Creating a reference field
          1. Building out the data structure
          2. Linking the data together
          3. Looking from different perspectives
        2. Using reference qualifiers
        3. Dot-walking through data
          1. Using derived fields
      5. Building the interface
        1. Lists
          1. Choosing the fields to show
          2. Having reference fields on lists
          3. The varied capabilities of lists
        2. Forms
          1. Creating useful forms
          2. Adding related and embedded lists
          3. Defining your own related lists
        3. Enjoying views
          1. Controlling views
        4. Menus and modules
          1. Setting a filter
          2. Building the right modules
      6. Making the most of the UI
        1. Finding your way around the interface
          1. Adding a favorite
          2. Seeing back in time
          3. Defining a tag
        2. Connecting with people
          1. Chatting over records
          2. Live record updates
      7. Summary
    9. 2. Developing Custom Applications
      1. Developing applications in Studio
        1. Recording files
      2. Scoping out limits
        1. Separating by name
          1. Seeing the scope
          2. Moving between applications
      3. Enforcing the separation
        1. Taking control of your application
          1. Delegating to developers
        2. Allowing other applications access
          1. Controlling application access
            1. Restricting your choices during development
      4. Building hierarchical tables
        1. Benefiting from an object-oriented design
        2. Extending the User table
        3. Interacting with hierarchical tables
        4. Viewing hierarchical tables
        5. Overriding field properties
        6. Understanding the background behavior
          1. Making it visual with the Schema Map
          2. Changing class
          3. Repointing the reference field
      5. Many-to-many relationships
        1. Building a many-to-many table
          1. Adding fields to a many-to-many table
            1. Comparing reference fields and many-to-many tables
          2. Deleting a many-to-many table
        2. Choosing lists
      6. Cascading with reference fields
        1. Dynamic creation
        2. Deleting records
      7. Summary
    10. 3. Server-Side Control
      1. Deciding to write code
        1. Using the developer community
      2. Running background scripts
      3. Using GlideRecord (and its friends)
        1. Understanding iterators
        2. Accessing data from GlideRecord
        3. Walking through reference fields
        4. Converting data types
          1. The surprising results of GlideElement
          2. Getting the value another way
        5. Dealing with dates
      4. Counting records with GlideAggregate
      5. Scripting in scoped apps
        1. Being in scope
          1. Improving scripting with ECMAScript 5
          2. Activating ECMAScript 5
        2. Protecting data from scripts
          1. Running scripts in global
          2. Building the restrictions
      6. Business rules
        1. Setting the table
        2. Being advanced
        3. Knowing the predefined variables
          1. Displaying the right table
        4. Conditioning your scripts
          1. Having good conditions
        5. Controlling the database
          1. Controlling database queries with Business Rules
        6. Choosing when to execute - before, after, and really after
          1. Defaulting data
          2. Validating information
          3. Working with dates
          4. Updating information
          5. Running things later with system scheduling
        7. Display business rules
        8. Global business rules
      7. Script Includes
        1. Creating classes
          1. Coding a class
        2. Accessing across scope
        3. Using classes to store and validate data
          1. Having an API for scoped apps
        4. Extending classes
        5. Taking advantage of utility classes
          1. Providing utility classes
        6. Storing functions
          1. Having functions in Script Includes
        7. Client Callable Script Includes
      8. Enforcing data
        1. Forcing a comment using a data policy
        2. Specifying dynamic filters
          1. Displaying guests that are Me
      9. Scripting reference qualifiers
        1. Showing only guests with reservations
          1. Filtering using the current record
      10. Rhino - the JavaScript engine powering ServiceNow
        1. Accessing Java
      11. Summary
    11. 4. Client-Side Interaction
      1. Building a modern interface
        1. The power and pitfalls of Ajax
        2. Being in control
        3. Using client-side code effectively
      2. Choosing a UI Action
        1. Finding the current table
        2. Displaying UI Actions in the right place, at the right time
          1. Using the Condition field
        3. Running client- or server-side code
          1. Saving and redirecting
        4. Converting a record from Reservation to Check-in
      3. Managing fields with UI Policy
        1. Manipulating the form
          1. Client-side conditioning
        2. Forcing a comment on reservations
        3. Controlling UI Policies
      4. Running client-side scripts
        1. Scope on the client
        2. Remembering client-side GlideRecord
        3. Understanding callbacks
          1. The defined function
          2. The anonymous function
      5. Manipulating forms with GlideForm
        1. Using GlideForm
        2. Choosing a UI Policy
      6. Client-side scripting
        1. Sending alerts for VIP guests
        2. The disappearance of current
        3. Changing, submitting, loading, and more
        4. Validating the contents of fields
        5. Storing code in UI Scripts
      7. Efficiently transferring data to the client
        1. Writing a script include for GlideAjax
        2. Using GlideAjax
        3. Passing data when the form loads
          1. Using scratchpad on the client
        4. Storing data in the session
      8. Controlling lists with Context Menus
        1. Finding out about the list
        2. Opening a new tab
      9. Customizing and extending the platform
        1. Firing on more events
        2. Using built-in libraries
        3. What could go wrong
      10. Taking control of the browser
        1. Data Policies save the day
      11. Summary
    12. 5. Getting Things Done with Tasks
      1. Introducing tasks
        1. Looking at the Task table
          1. The important fields
          2. Populating fields automatically
        2. Recording room maintenance tasks
        3. Working with tasks
          1. Working without a queue
          2. Working socially
            1. Chatting with Connect
            2. Communicating some more
      2. Organizing groups and users
        1. Creating a room-maintenance team
          1. Creating a property
      3. Using departments and companies
      4. Using additional comments and work notes
      5. Understanding the State field
        1. Configuring different states
        2. Representing progress
        3. Navigating between states
        4. Creating room maintenance states
          1. Enforcing on the server
          2. Adding a reference qualifier
          3. Removing states with client scripts
        5. Automating an assignment based on state
          1. Using Data Lookup
            1. Setting the Assignment group with Assignment Rules
      6. Drag-and-drop automation with Graphical Workflows
        1. Running a workflow
          1. Exploring under the hood
        2. Exploring the activities
        3. Orchestrating your datacentre
        4. Using data-driven workflows
      7. Approving tasks
        1. Making the decision
        2. Understanding what you are approving
        3. Asking for approval for the repair team
          1. Performing the approval
          2. Starting up the workflow
          3. Monitoring progress
      8. Using the Service Catalog
        1. The different types of Catalog Items
          1. Using Service Creator
        2. Creating a record producer
          1. Adding more information
          2. Routing the submitted request with templates
          3. Testing the record producer
        3. Understanding the data behind Service Catalog
          1. Configuring the Service Catalog
      9. Understanding Request Fulfilment
        1. Checking out
        2. Using the request tables
          1. Scripting variables
      10. Service Level Management
        1. Exploring the SLA data structure
        2. Timing an SLA
        3. Travelling through time
          1. Enjoying relativity
            1. Scheduling and time zones
        4. Customizing condition rules
        5. Avoiding a breach
          1. Working SLAs
        6. Ensuring maintenance is quick
      11. Summary
    13. 6. Events, Notifications, and Reporting
      1. Dealing with events
        1. Registering events
        2. Firing an event
          1. Sending an e-mail for new reservations
      2. Scheduling jobs
        1. Adding your own jobs
          1. Creating events every day
        2. Running scripts on events
          1. Creating tasks automatically
      3. Sending e-mail notifications
        1. Setting e-mail properties
        2. Assigning work
          1. Sending an e-mail notification on assignment
            1. When to send
            2. Who will receive
            3. Send to event creator
        3. Sending informational updates
          1. Sending a custom e-mail
            1. Enabling the e-mail client
          2. Sending e-mails with additional comments and work notes
            1. Sending out work notes
        4. Approving via e-mail
          1. Using the Approval table
          2. Testing the default approval e-mail
        5. Specifying notification preferences
          1. Subscribing to e-mail notifications
          2. Creating a new device
          3. Sending text messages
      4. Delivering an e-mail
        1. Knowing who the e-mail is from
      5. Receiving e-mails
        1. Determining what an inbound e-mail is
        2. Creating inbound email actions
          1. Approving e-mails using Inbound Email Actions
            1. Understanding the code in Update Approval Request
          2. Updating the work notes of a Maintenance task
        3. Having multiple incoming e-mail addresses
          1. Using the Email Accounts plugin
          2. Redirecting e-mails
          3. Processing multiple e-mail addresses
        4. Seeing progress being made
      6. Recording metrics
        1. The difference between metrics and SLAs
        2. Running metrics
          1. Scripting a metric definition
          2. Monitoring the duration of maintenance tasks
      7. Flattening data with Database Views
        1. Creating a Metric Instance Database View
      8. Reporting
        1. The functionality of a list
        2. Using reports elsewhere
          1. Sending a shift handover report
        3. Analytics with ServiceNow
          1. Basic trending with line charts
          2. Performance Analytics
        4. Making sense of reports
          1. Ensuring consistency
          2. Using outside tools
      9. Building homepages
        1. Creating a Maintenance homepage
        2. Making global homepages
          1. Editing homepages
        3. Counting on a homepage
        4. Optimizing homepages
      10. Summary
    14. 7. Exchanging Data – Import Sets, Web Services, and other Integrations
      1. Beginning the web service journey
        1. Pulling data out of ServiceNow
        2. Downloading file-based data
          1. Automatically download data using cURL
        3. Being more specific with URL parameters
          1. Choosing the fields
          2. Specifying  records
            1. Getting my stuff
        4. Pulling data designed for the Web
          1. Cleaning up with SOAP
            1. Using direct web services
            2. Filtering the response
            3. Returning display values
          2. Having a REST
            1. Using the REST Explorer
            2. GETting it your way
            3. Using the right method
            4. Selecting the right content
            5. Updating and inserting data
            6. Exploring other APIs
      2. Bringing it in using Import Sets
        1. Specifying the data source
          1. Cleaning up Import Set tables
        2. Getting data
          1. Dealing with XML files
        3. Transforming the data
          1. Creating a field map
            1. Enabling scripting in transform maps
            2. Creating new values
            3. Dealing with times
            4. Importing into reference fields
        4. Moving in the rooms
        5. Scripting in Transform Maps
          1. Knowing when scripting will run
        6. Keeping import sets running
      3. Importing users and groups with LDAP
        1. Importing users from an LDAP server
          1. Reviewing the configuration
        2. Altering the Transform Maps
        3. Importing in a scoped application
      4. Building web service Import Sets
        1. Using a web service Import Sets
      5. Connecting to web services
        1. Using SOAP to send tasks
          1. Testing the web service
          2. Sending the message
        2. Building REST messages
          1. Sending REST messages to CHS
      6. Building custom interfaces
        1. Creating scripted services
          1. Doing multiplication with a scripted REST API
      7. Working inside the data center - introducing the MID server
        1. Integrating with the ECC queue
        2. Picking up jobs
        3. Installing the MID server
          1. Setting up the server
        4. Using the MID server
          1. Running a custom command
        5. Running JavaScript on the MID server
          1. Interacting with the ECC queue
            1. Creating a MID server Script Include
          2. Using Java on the MID server
            1. Adding additional libraries
        6. Exporting data via the MID server
          1. Improving exporting
      8. Authenticating and securing web services
        1. Inbound authentication
        2. Outbound authentication
      9. Designing integrations
        1. Transferring bulk data
        2. Real-time communication
        3. Communicating through the firewall
      10. Summary
    15. 8. Securing Applications and Data
      1. Understanding roles
        1. Defining a role
        2. Assigning roles to users
          1. Finding a user's role
        3. Differentiating between requesters and fulfillers
          1. Roles and Delegated Development
          2. Activating Subscription Management
        4. Using impersonation
        5. High-security settings
          1. Elevating your role
        6. Controlling access to applications and modules
          1. Controlling access to modules with groups
      2. Protecting data with contextual security rules
        1. Understanding contextual security
        2. Specifying rows and fields to secure
          1. Securing rows
        3. Controlling fields
        4. The order of execution
          1. Executing the row and then the field
          2. Rules are searched until one is found
          3. Defaults are possible
          4. The table hierarchy is understood
          5. Multiple rules with the same name are both considered
          6. Field rules check the table hierarchy twice
        5. Summarizing the execution
        6. Scripting and access controls
        7. Securing other operations
      3. Building security rules
        1. Conditioning contextual security
          1. Editing the automatic security rules
          2. Testing using impersonation
          3. Setting security rules quickly
          4. Scripting a security rule
        2. Using security rules effectively
      4. Using Scoped Administration
        1. Controlling the Hotel application
      5. Encrypting data
        1. Disadvantages of field encryption
        2. Evaluating encryption gateways
          1. Evaluating encryption gateways
      6. Introducing Domain Separation
        1. Defining a domain
          1. Applying Domain Separation
        2. Organizing domains
          1. Introducing global
          2. Understanding domain inheritance
          3. Turning on Domain Separation
        3. Looking at Domain Separation
        4. Exploring domain visibility
        5. Understanding Delegated Administration
        6. Overriding configuration
          1. Displaying different messages for different domains
        7. Creating more domain relationships
        8. Using Domain Separation appropriately
      7. Authenticating users
        1. Using internal authentication
        2. Controlling authentication
        3. Using an LDAP server for authentication
        4. Enabling Single Sign-on through SAML
          1. Automatically creating users
          2. Logging out
          3. Using Multiple Provider Single Sign-on
          4. Configuring Single Sign-On
          5. Consuming metadata from SSOCircle
        5. Navigating to the side door
        6. Preventing access to the instance
      8. Securing web services
        1. Using WS-Security
          1. Improving security with signatures
        2. Mutual authentication
          1. Setting up outbound mutual authentication
        3. Using OAuth
      9. Summary
    16. 9. Diagnosing ServiceNow – Knowing What Is Going On
      1. Building a methodology
        1. Identifying the issue
      2. Looking at the system log
        1. Writing to the system log
        2. Using the file log
        3. Logging appropriately
      3. Using the debugging tools
        1. Debugging Business Rules
        2. Debugging contextual security rules
      4. Enabling the JavaScript client side log
        1. Seeing client-side messages
          1. Logging to the JavaScript log
      5. Tracking each page request
        1. Recording the time taken
          1. Monitoring the instance's performance
          2. Recording the browser's perspective
            1. Breaking down the browser's time
            2. Visualising the data
      6. Going through other logs
      7. Finding slow database transactions
        1. Classifying slow queries
        2. Examining the Slow Query log
          1. Understanding behaviour
        3. Seeing the plan
      8. Dealing with other performance issues
        1. Managing large tables
          1. Archiving data
        2. Rotating and extending through sharding
          1. Choosing table extension
          2. Selecting table rotation
      9. Auditing and versioning
        1. Turning on auditing
        2. Viewing audit
        3. Using auditing responsibly
        4. Versioning configuration
          1. Reviewing the changes
      10. Optimizing hardware resources
        1. Controlling resources with semaphores
      11. Accessing the system internals
        1. Understanding the ServiceNow Performance homepage
        2. Flushing the system cache
        3. Reviewing the system stats
      12. Summary
    17. 10. Packaging with Applications, Update Sets, and Upgrades
      1. Using your instances
      2. Serializing records to XML
        1. Exporting and importing serialized XML
        2. Transporting data via XML
      3. Recording configuration in Update Sets
        1. Capturing configuration
          1. Transferring an Update Set
        2. Applying an Update Set
          1. Understanding multiple Update Sets
          2. Relying upon other updates
        3. Managing Update Sets
          1. Using the wrong Update Set
        4. Working with workflows
          1. Having the wrong IDs
        5. Backing out Update Sets
        6. Using Update Sets effectively
      4. Cloning instances
        1. Preserving and excluding data
        2. Using clones effectively
      5. Packaging with applications
        1. Application use cases
        2. The philosophy of scoped applications
        3. Identifying configuration
        4. Moving applications
          1. Publishing applications
          2. Exporting applications
          3. Using a Git repository
            1. Using source control effectively
        5. Including data in applications
      6. Sharing with Share
      7. Selling on ServiceNow Store
      8. Adding more with plugins
        1. Activating plugins
        2. Choosing the right plugin
      9. Configuration and customization
        1. Knowing areas of risk
        2. Protecting your scripts
      10. Upgrading ServiceNow
        1. Understanding upgrades
          1. Applying upgrades
          2. Reverting customizations and restoring out of the box
      11. Managing instances
      12. Summary
    18. 11. Making ServiceNow Beautiful with Service Portal and Custom Interfaces
      1. Making it self – service
        1. Providing self-service access
        2. Layering on a better look and feel
      2. Starting with Service Portal
        1. Getting the assets
        2. Branding the existing portal
        3. Reviewing Service Portal fundamentals
        4. Service Portal and the Service Catalog
        5. Selecting the widgets
        6. Creating the reservation
        7. Creating the portal
          1. Building a home
          2. Creating a theme
          3. Creating some style
          4. Adding a menu
          5. Adding a client-side widget
          6. Exploring dynamic widgets
          7. Building the dynamic widget
          8. Locking down the data
            1. Filtering maintenance tasks
            2. Finding the reservations
            3. Altering access controls
          9. Testing the site
      3. Digging into Jelly
        1. Creating a UI Page
        2. Adding interactivity to UI pages
        3. Including UI macros
        4. Looping with Jelly
        5. Extending Jelly
      4. Using Angular and Jelly
        1. Using Angular to say hello
        2. Interacting with the database
        3. Updating records
      5. Including Jelly in the standard interface
        1. Adding formatters
        2. Decorating and contributing to fields
        3. Launching a dialog box
          1. Launching UI pages with GlideDialogWindow
          2. Fitting in a form
          3. Displaying any page with GlideBox
      6. Summary
3.92.1.156