Create A Page In ServiceNow: A Step-by-Step Guide
ServiceNow is an incredibly powerful platform, and one of its key strengths is the ability to create custom pages to tailor the user experience. Whether you need a dashboard for IT support, a portal for HR services, or a dedicated workspace for a specific project, knowing how to create a page in ServiceNow is an invaluable skill. In this guide, we'll walk you through the process step-by-step, ensuring you can build effective and user-friendly pages within your ServiceNow instance.
Understanding ServiceNow Pages
Before diving into the how-to, let's quickly cover what we mean by a "page" in ServiceNow. Essentially, a page is a container for various UI elements like forms, lists, reports, and interactive components. These pages are often part of a larger portal or application, providing users with a specific interface to interact with the platform. Creating well-designed pages is crucial for enhancing user adoption and streamlining workflows.
Pages in ServiceNow are constructed using different frameworks, the most common being: UI Pages, Service Portal Pages, and Now Experience UI Builder Pages. Each has its strengths and is suited for different use cases.
- UI Pages: These are the classic way to create custom interfaces in ServiceNow. They use Jelly syntax (an XML-based templating language) mixed with HTML, CSS, and JavaScript. While powerful, they require more technical expertise and are often used for complex customizations or when integrating with legacy systems.
- Service Portal Pages: These are designed for creating modern, user-friendly portals. They utilize AngularJS (though newer versions use other frameworks) and are ideal for building self-service portals for employees or customers. Service Portal pages are responsive and mobile-friendly out of the box.
- Now Experience UI Builder Pages: This is the newest and most intuitive way to create pages in ServiceNow. It provides a drag-and-drop interface, allowing you to build pages visually without writing code. UI Builder is perfect for quickly creating dashboards, workspaces, and other custom interfaces.
Step-by-Step Guide to Creating a Page in ServiceNow
Now, let's get into the practical steps of creating a page in ServiceNow. We'll cover the basics of creating a page using each of the three methods mentioned above.
Method 1: Creating a UI Page
UI Pages offer a flexible, albeit code-intensive, approach to designing custom interfaces in ServiceNow. While they might seem daunting at first, especially if you're new to ServiceNow development, understanding the basic structure can open up a world of possibilities for tailoring the platform to your exact needs.
-
Navigate to UI Pages: First, you'll need to access the UI Pages module within ServiceNow. In the application navigator (the filter navigator on the left-hand side), type "UI Pages" and select the "UI Pages" module under "System UI". This will bring you to a list of existing UI Pages.
-
Create a New UI Page: Click the "New" button to create a new UI Page. This will open a form where you'll define the properties and content of your page.
-
Fill in the Form: This form is where you'll define the characteristics of your UI Page. Here's a breakdown of the important fields:
- Name: Give your UI Page a descriptive name. This name will be used internally within ServiceNow to identify the page.
- Title: This is the title that will appear in the browser tab or window when the page is opened. Make it clear and concise.
- URL: ServiceNow automatically generates a URL based on the name you provide. You can modify it, but keep it simple and relevant.
- Direct: Check this box if you want the page to be directly accessible via its URL. If unchecked, you'll need to use other methods to display the page.
- HTML: This is where you'll write the HTML code for your page. You can use standard HTML tags along with Jelly syntax to dynamically generate content.
- Client script: used to add dynamic behavior in UI Pages. It is important to add scripts to the pages.
- Processing script: used to add server side behavior and it is excecuted when the page loads or when data is processed.
-
Write Your HTML and Jelly Code: This is where the magic happens. You'll use a combination of HTML and Jelly syntax to define the structure and content of your page. Here's a simple example:
<?xml version="1.0" encoding="utf-8" ?> <j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null"> <h1>Hello, World!</h1> <p>This is a simple UI Page.</p> </j:jelly>This code will display a heading and a paragraph on your page. You can add more complex HTML and Jelly code to create more sophisticated interfaces.
-
Save Your UI Page: Once you've written your code, click the "Submit" button to save your UI Page. ServiceNow will then make the page available at the specified URL.
-
Test Your UI Page: Open a new browser tab and enter the URL of your UI Page. You should see the page you created. If there are any errors, go back to the UI Page form and make the necessary corrections.
Method 2: Creating a Service Portal Page
Service Portal pages are the go-to choice for building modern, user-friendly portals in ServiceNow. Designed with a focus on self-service and user experience, these pages offer a responsive design that adapts seamlessly to different devices, making them accessible on desktops, tablets, and smartphones.
- Navigate to Service Portal Designer: To begin, you'll need to access the Service Portal Designer. In the application navigator, type "Service Portal" and select "Service Portal Designer." This will open the designer interface.
- Create a New Page: Within the Service Portal Designer, click the "Add a page" button (usually located in the top-right corner). This will open a dialog box where you can specify the properties of your new page.
- Configure the Page: In the dialog box, provide the following information:
- Page ID: A unique identifier for your page. This ID will be used in the URL of the page.
- Title: The title of the page, which will be displayed in the browser tab or window.
- Portal: The portal to which the page belongs. If you have multiple portals, select the appropriate one.
- Theme: The theme to use for the page. Themes define the overall look and feel of the portal.
- Design the Page: Once you've created the page, you'll be taken to the design canvas. This is where you'll add and arrange widgets to create the layout and functionality of your page. Widgets are pre-built components that provide various features, such as displaying data, providing navigation, or allowing users to interact with forms.
- Add Widgets: To add a widget, simply drag it from the widget list on the left-hand side of the screen onto the design canvas. You can then configure the widget's properties to customize its behavior.
- Arrange Widgets: You can arrange widgets by dragging them around the canvas. You can also resize widgets to fit your desired layout.
- Configure Widgets: Each widget has its own set of configuration options. You can access these options by clicking on the widget and then clicking the "Edit" button.
- Test Your Page: Once you've finished designing your page, click the "Preview" button to see how it will look to users. You can then make any necessary adjustments to the layout or widget configurations.
Method 3: Creating a Now Experience UI Builder Page
The Now Experience UI Builder represents the latest and most intuitive approach to creating pages within ServiceNow. With its drag-and-drop interface and visual development environment, UI Builder empowers both developers and citizen developers to quickly assemble engaging and functional pages without the need for extensive coding. This method is particularly well-suited for building dashboards, workspaces, and other custom interfaces that require a high degree of visual appeal and user interaction.
- Navigate to UI Builder: To get started, you'll need to access the UI Builder. In the application navigator, type "UI Builder" and select "UI Builder." This will open the UI Builder interface.
- Create a New Experience: In UI Builder, you'll work within the context of an "Experience." An Experience is a collection of pages, themes, and other configurations that define the overall look and feel of your application. To create a new Experience, click the "Create an experience" button.
- Configure the Experience: In the dialog box, provide the following information:
- Name: A descriptive name for your Experience.
- Description: A brief description of the Experience.
- Template: You can choose from several pre-built templates to get a head start on your design. Alternatively, you can start with a blank template.
- Create a New Page: Once you've created the Experience, you'll be taken to the Experience editor. To create a new page, click the "Add page" button.
- Design the Page: The UI Builder page editor provides a visual canvas where you can drag and drop components to create the layout and functionality of your page. Components are reusable UI elements that provide various features, such as displaying data, providing navigation, or allowing users to interact with forms.
- Add Components: To add a component, simply drag it from the component palette on the left-hand side of the screen onto the design canvas. You can then configure the component's properties to customize its behavior.
- Arrange Components: You can arrange components by dragging them around the canvas. You can also resize components to fit your desired layout.
- Configure Components: Each component has its own set of configuration options. You can access these options by clicking on the component and then using the properties panel on the right-hand side of the screen.
- Test Your Page: Once you've finished designing your page, click the "Preview" button to see how it will look to users. You can then make any necessary adjustments to the layout or component configurations.
Conclusion
Creating pages in ServiceNow is a fundamental skill for anyone looking to customize the platform and tailor it to their specific needs. Whether you choose to use UI Pages, Service Portal pages, or Now Experience UI Builder, understanding the basics of page creation will empower you to build effective and user-friendly interfaces. So, go ahead and start experimenting! The possibilities are endless.