One of the most powerful capabilities of the ServiceNow platform is its ability to help an organization structure, standardize, and automate its processes. In this chapter, we provide an overview of the platform’s automation capabilities and share some considerations around how to leverage them in a scalable and maintainable manner.
This chapter is divided into two major sections:
By the end of the chapter, you will be well equipped to spot opportunities where ServiceNow can be used to deliver organizational value and understand what you can do to estimate the complexity of the effort. You will also become familiar with the building blocks with which you can create the value-enabling process automation at your organization.
ServiceNow’s process automation capabilities are underpinned by five major elements – integration APIs, service portal and digital forms, data-driven workflows, tasking and automated actions, and foundational shared data across the platform.
These elements work together to provide automation across processes. The typical flow follows this pattern:
Figure 7.1 – A typical process automation design pattern on ServiceNow
Another common pattern of process automation for the ServiceNow platform involves an automated event or action captured by integrations that trigger the workflow engine to generate tasks or perform additional automation steps in response. This archetype is typical in event management use cases, such as when a monitoring solution detects an anomaly or actionable event and sends that information to the platform via integration. Once received, the platform can process the event, evaluate rules against the event, and then create manual tasks or take additional automated actions to resolve the event.
Figure 7.2 – The event management automation pattern in ServiceNow
The ServiceNow platform provides a number of different technical components to help you automate these two archetypical process automation patterns. Each technical component deals with one or more steps of the archetypical process automation flow. When designing process automation on the platform an important design choice is what technical components are the most fit-for-purpose to fulfill the requirements. Let’s have a look now at the various technical components available to you and which part of the process automation pattern they service.
For both the process automation patterns we have outlined previously, there’s a triggering event or action, either from a user or a system. ServiceNow has a variety of ways of capturing these triggering actions. Let’s look at the major ones.
The Service Portal and the Service Catalog are two major technical components that can be used to capture user input as triggering actions. The Service Portal is a customer-facing web portal that serves as a single stop or hub for a customer to be able to find the digital forms they need to trigger a particular process. The Service Catalog is where all digital forms are located and categorized in the catalog for easy searchability. The portal and the catalog work together as end users visit the portal, which contains the Service Catalog. The portal also provides search functionality to enable users to find catalog items easily without having to browse the individual catalog categories. The Service Catalog is a listing of digital forms, and ServiceNow has more than one technical component that provides these digital forms.
Record producers, order guides, service requests, and HR service are all technical components of the platform that enable the creation of digital forms. Record producers are the least specialized technical capability on the platform to produce digital forms. They allow for the creation of forms that can be presented to the end user and processed in whatever way the developer wishes, prior to the triggering of workflows. The record producer logic can even execute scripted code without the need for any workflows. The other technical components listed are more specialized features, intended to simplify or provide additional functionality for a specific domain or problem. In many cases, they are built on top of and take advantage of the record producer and order guide capabilities, adding additional functionality specific to its domain.
Service requests are built to provide a consumer shopping website experience. Service request forms are built within a framework that provides shopping carts, adjustable quantities, and pricing and price calculations. Service requests are at their best when used for the creation of digital forms that represent the ordering of physical goods, providing an online shopping experience out of the box.
The order guide may be used to create a wizard-like experience for the request process. An order guide is simply a digital form that can then trigger the addition of other digital forms as part of an order. For example, an order guide form for an employee to request a laptop may ask the employee in a single form about their peripheral requirements (for example, do you need a mouse, trackball, or a stylus?) and automatically generate a separate request for the peripherals instead of having the end user fill in each as a separate form.
The HR Service module is specific to the HR Service Management (HRSM) capability of the platform and augments the capability of record producers for HR-specific scenarios. The most important thing to keep in mind when considering the HR Service module in your design is that the digital form component of the module is simply a record producer. The HR Service module adds additional HR and HR-portal-specific configuration around a particular record producer identified as part of the HR service request to provide additional platform capabilities (such as lifecycle events).
You may also have the Customer Service Management (CSM) module, in which case there is also case management which are records designed specifically to capture various case types from external customers. Record producers are used as the forms to capture customer information to populate cases.
The information provided might feel overwhelming. Why does the platform have so many different ways of doing similar things? Some of it comes down to history and backward compatibility, but in other cases (such as the HR Service), it comes down to specialization of functionality. To simplify your choices, first identify broadly whether the process you wish to automate is an HR-specific process, a customer service process, or an IT process for employees, then pick the appropriate technical component (HR Service, case management and record producers, or service requests, respectively). Taking this approach, you will rarely make the wrong choice.
Web services are a platform capability that allows ServiceNow to provide REST or SOAP API endpoints that can be accessed by other systems. ServiceNow offers multiple ways to receive API calls, including the Table APIs, which enable other systems to perform CRUD operations on ServiceNow tables and scripted APIs that allow you to script complex behaviors upon receiving the inbound API calls. The ImportSet Table APIs allow web services to populate an import set table, which then runs corresponding transform maps to write the incoming data to a target table after undergoing a transformation process. Regardless of which web service options you choose, inbound API calls are the foundational platform capability that enables the triggering of workflows and actions from external systems and other platform capabilities. For example, Event Management, the ServiceNow module that is specialized in ingesting events from external monitoring tools and then triggering the creation of tasks via workflows or event rules, leverages web services for any push-based events coming from external systems.
The Management, Instrumentation, and Discovery (MID) Server is a Java application that runs in either a Windows or Unix environment on your local network. The MID Server enables ServiceNow to communicate with and execute commands and actions within your network environment. This platform capability can be used as a triggering action for various process scenarios, the most obvious out-of-the-box triggering actions being those provided by Service Mapping and Discovery. These capabilities utilize the MID Server to detect your infrastructure and services and monitor them for changes. A change in the environment detected by Service Mapping can then act as a trigger point for certain processes to engage, such as the creation of unauthorized change tickets.
Business rules and scheduled jobs can be used to trigger workflows based on changes or events occurring within ServiceNow. For example, a workflow may be triggered when an asset record’s state is manually changed to To Be Retired. Business rules can detect data changes as they occur, while scheduled jobs may be used to scan the system periodically and then trigger actions appropriately.
Any of the preceding platform capabilities can be used to facilitate the capture of a triggering action or event, either from a user or system. As part of that capture, information may be collected; for example, a record producer or service request form may ask the user to provide information, such as what model laptop they want or whether they will be working outside of the office. The additional information collected, along with the triggering action, can then be used for the next step of the process automation pattern – workflows.
Workflows are a series of pre-configured steps that execute automated actions in sequential (and occasionally parallel) order based on programmed rules. For example, a workflow may take a service portal form for a new laptop submitted by an employee, use the form submitted to determine where the closest stockroom to the employee is, and create a task and assign it to the IT service desk team at that stockroom to prepare the laptop for pickup by the employee.
ServiceNow has multiple technical components that provide workflow automation capabilities, the most obvious (but also deprecated) capability is the one aptly named Workflow. This was the primary platform capability to enable process automation until the New York release of ServiceNow, at which point it was superseded by a new framework for designing process automation called Flow Designer. As a platform designer in the Tokyo release or later, you should be aware of the existence of Workflows, but your designs should never specifically attempt to leverage its capabilities except in very specific scenarios. As of the Tokyo release of ServiceNow, there are still some areas of the platform that utilize Workflow instead of Flow Designer; one such area is defining a CI remediation as part of the CMDB Health platform capability.
Figure 7.3 – The legacy Workflow capability of ServiceNow is still used in various areas of the platform
Flow Designer enables much of the same functional capability as Workflow but with a different interface, greater ability to debug and manage flows, and a modular design philosophy that encourages the reuse and composition of simpler components to create complex behaviors. The interface of Flow Designer, as seen in the next screenshot, is substantially different from the Workflow designer and follows a slightly different design philosophy. Still, its ability to launch a sequence of automated actions in response to a triggering event is comparable to workflows.
Figure 7.4 – Flow Designer is the new platform capability for any process automation scenarios
The lifecycle events capability in the HR Service Delivery application can be treated as a separate technical component built specifically for HR scenarios where a particular HR lifecycle event (for example, an employee is hired or transferred, or when health benefit renewals are imminent) may require a series of actions to be performed by employees and service fulfillers as part of the event. Lifecycle events are a powerful way to composite a variety of actions, forms, and steps together but were built specifically for HR use cases and therefore, limits their use except in that specific scenario.
Beyond these capabilities, ServiceNow offers the ability to use Script Includes to generate tasks and perform any action you desire, which can work as a bespoke workflow system, but as it is not purpose-built for this, we would not consider it a workflow capability comparable to the previously mentioned components.
From this point in the chapter, we will use workflow to refer to any of the aforementioned technical components. Workflows enable platform teams to manage and configure process automation in a structured way. They sequence one or more sets of actions performed by the platform in response to the triggering event and can pause before executing the next action in the sequence in response as it waits for user input or for additional triggering events to occur. Workflows provide the logic for when and what actions should be executed. The platform’s task management and automation capabilities allow it to perform those tasks as orchestrated by the workflow components.
ServiceNow completes the process automation loop by providing a tasking, assignment, and script execution engine that allows workflows to create and assign tasks to the appropriate individuals and allows scripts to trigger automated actions to occur.
Tasks underpin many capabilities in the platform where a manually actionable activity is assigned to a human being; this includes customer service cases, IT service requests, and HR service requests. Tasks have multiple things in common with one another, some of the most important ones from a process execution standpoint being the following:
ServiceNow also offers a specialized Approvals capability that, like tasks, is assigned to individuals or groups and has state. Like tasks, approvals can be used to coordinate process steps that are being automated by a workflow, such as when a workflow to send a purchase order to an IT hardware vendor waits for the approval of the finance team before proceeding.
Approvals differ from tasks in that they offer only a limited and specific set of actions against them – approve and reject. Approvals enable the capture of an approval or rejection reason from the approver when the action is taken and may be performed via the mobile application, email, or directly on the platform on a computer.
Tasks and approvals are ways for workflows to instruct humans to provide input to continue the execution of a process and scripts are a way for ServiceNow to trigger automatic actions as the process proceeds. Scripts can do anything on the platform – they can send an API call to an external system; update, create, and delete records; and even create tasks and approvals. Scripts in ServiceNow are packaged into different types of records, and the type of record determines when a script is executed and what information the script has available to it at the time of execution.
Script Includes are the most fundamental records for a script on the platform. A script included in a Script Include record is accessible by any other script in any other record in the system, and can be used to store re-usable code. For the purposes of process automation, one important record that may include scripts is Flows, including Subflows and Actions. These are Flow Designer components that can then be connected to support various process automation scenarios. Scripts inside Actions, Flows, and Subflows can perform automated actions in response to certain triggering events.
Workflows help determine the right actions to be performed at the right time, and tasks and actions enable those actions to be performed. The last step tying all the pieces together is foundational data, which helps workflows to execute at the right times for the right individuals, and tasks to be assigned to the right groups and provide the right contextual information to enable their completion.
Foundational data is the oil that lubricates the machinery of process automation. Many process automation scenarios of value require some type of foundational data to be on the platform, and in the best-case scenarios, great foundational data can improve reuse and reduce the need to build everything net-new in the face of new challenges and environments.
When we refer to foundational data, we specifically mean data that has the following attributes:
From a ServiceNow standpoint, foundational data types are defined within the Common Service Data Model (CSDM). These include Location, User, Company, Contract, Product Model, and others. It is important to understand that the CSDM and the foundational data types that ServiceNow can accommodate out of the box do not satisfy the aforementioned criteria for foundational data. For example, the CSDM clearly indicates that Location is a foundational data type and defines a default set of fields that can be stored within that record, but it does not provide guidance on whether locations should include the organization’s buildings, rooms, desks, or parking lots. It is up to organizational and platform governance to establish the right framework for Location foundational data to be stored and used on the platform.
From a design standpoint, the important aspect to understand about foundational data is that ServiceNow is prescriptive about exactly what types of foundational data it formally supports through the CSDM. Any process automation design requiring data matching of those foundational data types should make sure that the data type is under governance, and if so, consume the foundational data in the appropriate way as prescribed by governance. Should the data required not be under governance (for example, your service request requires the location data of storage closets that are not currently stored in the Locations table on the platform), the designer should engage platform governance to introduce the data as foundational data on the platform. This process may be time-consuming but is necessary to avoid redundant or poorly maintained data on the platform and to encourage long-term platform health.
With well-managed foundational data within the system, many process automation use cases may begin leveraging this data to more efficiently enable capabilities that would never have been possible if data requirements were designed on a requirement-by-requirement basis. Imagine, for example, that foundational room location data for heavily utilized office spaces of an organization is managed on the ServiceNow platform. A service request that manages the booking of rooms could use the foundational room data to enable employees to pick the available rooms they want to book, while a smart office monitoring system could monitor AV equipment in rooms and dispatch IT to conduct repairs on equipment, reporting errors by providing the room information. More powerfully, because the room data is foundational data, repairs in progress could then be reflected in the room booking service request to prevent employees from booking rooms that have faulty AV equipment. This is only possible because the room foundational data is used in both processes and therefore enables each process to be aware of the other through that shared data structure.
Now our review of the platform’s core capabilities to enable process automation is complete, it is time for us to put these capabilities into use, just as we did with foundational data, to create highly effective and reusable configurations.
With all the technical capabilities of the platform and an understanding of how process automation is composed using the major archetypical steps – trigger events based on user or system input, sequence actions and tasks via workflow, and complete tasks and continue workflow, you can now design process automation through these blocks.
The first step to designing process automation that works at scale is to know whether something is a good automation candidate. Thankfully, you should be able to use the archetypical steps outlined earlier in this chapter to identify them – those that follow the well-defined archetypical patterns are likely great candidates for automation via the platform, while those that don’t may still be candidates but with a greater level of configuration complexity.
Let’s look at an example. At a major international bank, a common and labor-intensive manual process involves the capture of emails from business banking customers requiring specialized services. Currently, customers submit their requests for over a dozen distinct service types via an online form that generates an email to a shared business banking service inbox. Once the email has been received, agents peruse the email to determine whether the customer is looking for one of the dozen services (for example, open a new account, obtain the last three years’ transaction history, apply for a business banking credit card) that they are able to support. If the email is for a supported request, the agents will verify via a document stored on SharePoint what information to collect from the customer and which specialized support team’s inbox the email should be forwarded to after all the information has been collected to fulfill the request.
Is the preceding example a good candidate for automation using the platform? We will use our archetypical steps to see whether it fits the pattern, by asking the following:
A final aspect of determining whether a process should be automated at all has nothing to do with the platform’s capabilities; it’s simply whether automating the process can generate value for the organization. As covered heavily in earlier chapters of this book, any configuration of the platform should be considered in terms of the value provided. In the preceding scenario, reducing the need for agents to manually route and obtain customer information may save agents one minute per request. This might not be worth it if the request volumes are small but may provide enormous value if the request volumes are very high. As an aside, product owners should also consider the value of increased service quality as opposed to just cost-cutting. A one-minute saving per request may mean greater service throughput overall and, therefore, greatly reduce service fulfillment times for each customer, resulting in value through better customer satisfaction.
Now, suppose we bumped into a potential process automation candidate that, in the end, failed to pass the preceding checklist. What might that look like, and how might we change the current state in such a way that we have better automation opportunities? The common failure scenarios for each of the preceding checklist items are listed as follows:
Understanding the preceding failure scenarios should enable you to avoid implementation pitfalls ahead of any substantial commitment of resources. Treat the failure conditions as a set of risks for the project to be validated and mitigated up front to improve your chances of implementation success and of providing actual value in the attempt to automate your business process.
Now that we have the tools and checks to identify good automation candidates, let us discuss the considerations that can make the configuration performed by your platform team more maintainable and manageable, beginning first with the idea of creating common patterns.
The reuse of configuration is a tried-and-true technique to reduce the overall complexity and cost of existing code maintenance and new code builds. With code, the use of methods, functions, and objects enables multiple use cases to be achieved by reusing these components. Similarly, with workflows and forms, ServiceNow provides the capability for reusable components to be created, which can then be used in multiple scenarios. There are multiple advantages to this approach. First, smaller building blocks are easier to test. For example, it may be very complicated to test a ticket booking application end to end where a user submits a form, the form is sent to an agent to be validated, and then an API call is made to a vendor system to pay and then eventually receive a ticket number and unique digital ticket. The build and testing of this application would be vastly simplified if it were divided into a series of independent configuration components. One component may be a form that collects user data, one component deals with the validation of the form information and routing the form to the appropriate agent, another component manages the collection of payment information and the sending of payment information to the vendor system, and finally, a component processes the vendor system response and reacts appropriately.
ServiceNow not only enables this separation of configuration into multiple parts via individual scripts and functions, but it also enables this composition pattern in its workflow designer. The most important platform capability to know in the case of creating repeatable workflows is Flow Designer. Flow Designer offers Subflows and Actions, both of which are meant to enable platform developers to create repeatable components that can then be leveraged by multiple flows, achieving an ideal build and test once, reuse many times situation. The biggest difference between a Subflow and a Flow is the lack of a trigger condition. Subflows are triggered by Flows (or other Subflows) instead of being triggered due to a change to a record. Once a Subflow or Action has been created, new Flows can leverage these components, pass data into the Subflow or Action, and then collect the outputs of that Subflow or Action once they are complete.
For digital forms, ServiceNow’s Service Request capability has two major components that can help with reuse. First, variable sets can be created, which package up a number of elements that can appear on a form and enable the behavior to be defined once and then reused on multiple forms. The most common example is a variable set created for any physical goods-based orders, which asks a user to input their preferred pickup location and preferred pickup time. The preferred location and preferred pickup time fields, along with help text and any form behavior, may be grouped into a variable set, which can then be added to any new form that involves the order and delivery of a physical product to save development time.
Order guides in ServiceNow provide a different way of reusing configuration: they provide a form that collects user input and then helps select and automatically fill in other forms, such as service requests.
Leveraging these capabilities, designers can identify appropriate functional components that can then be made reusable. Luckily, there are many such patterns that are universal across organizations and processes:
While repeatable components are a good start for scalable and maintainable design, there is a limitation – some repeatable components may differ in small ways that prevent repeatability. For example, while many processes may require a two-level approval, the individual who must do the approving is not the same for every request of the same type. An extreme example of not using data to drive this workflow would be to create a workflow for every unique approver. To avoid this issue, an additional design element must be leveraged for true reusability: that of data-driven components.
The concept behind data-driven repeatable components is to create repeatable patterns that act on specific input data. In the case of approvals, for example, instead of creating an approval Subflow for every person who may be able to approve a task, create an approval flow that sends the approval to a user or group that is designated as the approver or approval group for the user making the request. In this way, the variable input data of the user’s approval group is provided separately from the repeatable behavior, enabling the creation of a repeatable approval Subflow that can send approvals to any user if the required approval data is provided as the Subflow input.
When creating your Flows, Subflows, scripts, or other components, consider what data elements being used in the design can be decoupled from the behavioral configuration and passed in after the fact to maximize the decoupling of your behavioral components from the underlying data sources.
Now that we have looked over some of the fundamental design principles of creating scalable and reusable designs let us summarize with a checklist of good software design principles that can be used to assess any design for its reusability and scalability:
Armed with the preceding principles, your team will be on its way to creating more reusable and scalable process components that can enable more rapid automation over time. Never forget that automation and creating better building blocks to enable faster automation is a continuous improvement process – regular code reviews, cleanup and refactoring of cold designs, and targeted re-engineering are needed over time as the team draws from previously learned lessons and as the patterns of business requirements and needs shift with the times.
Reusability, testability, and scalability are major software engineering disciplines about which thousands of books and articles have been created and written, most of them applicable to more than just ServiceNow. We strongly encourage your team to dive further into the topic as your capabilities mature and as you move to increasingly higher levels of automation.
In this chapter, we discussed how ServiceNow provides process automation capabilities to the organization through multiple technical platform components. These components are either specialized for specific purposes, such as HR Service Delivery, or are generalized and used as building blocks for process automation across use cases, such as Flow Designer.
Not all processes are great candidates for automation immediately, and before a team begins the process of automating a process using the platform, they should do preparatory work to identify and prepare foundational data and remove ambiguity in decision-making in the existing process so that it can be easily automated.
Finally, we discussed how thoughtful design and the use of technical platform components can improve reusability, allowing teams to quickly deliver new automation, leveraging existing pre-configured capability. The creation of reusable components decreases the risk and complexity of new configurations by reducing the number of tests required and by improving the ability of the team to test, which is critical to scaling up the automation capabilities of the organization.
The ability of your platform team to automate processes is only one of several crucial factors in achieving value from the platform. In the next chapter, we will look at how the governing and guiding processes of your organization can have a significant impact on value realization, and how to structure them for the best results.
3.145.52.86