Create custom components using ServiceNow CLI

  • Release version: Australia
  • Updated March 12, 2026
  • 2 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Create Custom Components Using ServiceNow CLI

    ServiceNow CLI allows users to develop custom components using the Next Experience UI Framework and the ui-component extension. These components serve as reusable building blocks for creating tailored user interfaces, enhancing functionality, and providing access to vital data.

    Show full answer Show less

    Key Features

    • Customizability: You can personalize the UI to meet specific needs of agents, customers, and company requirements.
    • Enhanced Efficiency: Quickly access important information, reducing the need for context switching.
    • API Integration: Accommodate unique omni-channel environments by consolidating data through APIs.
    • Development Flexibility: Create components that display specific data, such as cases associated with SLAs or active chat tracking.
    • Next Experience UI Framework: A JavaScript framework enabling the creation of reusable web components with encapsulated scope.
    • ui-component Extension: Facilitates component development, local testing, and deployment to ServiceNow instances.

    Key Outcomes

    By leveraging the capabilities of the ServiceNow CLI, you can efficiently build and deploy components that enhance user interfaces in applications. Components can be scoped to ensure proper namespace management, following specific guidelines. Additionally, you can create tailored components for the Virtual Agent and Agent Workspace, streamlining operations and improving user experience.

    Prerequisites

    • Familiarity with web component concepts, development, and design.
    • JavaScript knowledge for component behavior definition.
    • Understanding of Node Package Manager (npm) and installation of the latest Node.js version.
    • ServiceNow CLI must be installed on your machine.

    Next Steps

    Begin by ensuring you meet the prerequisites before designing and building your components. Reference the ServiceNow® Developer Site for more detailed guidance and resources on custom component development.

    Develop custom components using the Next Experience UI Framework and the ui-component extension.

    Components are reusable building blocks that you use to create a custom user interface. The Next Experience Design System comes with a set of customizable components that you can drag into your custom UI. Develop your own components if you can't find what you need in the Next Experience Design System library.

    To see the Next Experience Design System library, visit the ServiceNow® Developer Site.

    Benefits of creating custom components

    Developing custom components lets you:

    • Personalize a UI according to your agent, customer, and company needs.
    • Make your employees more effective and reduce context switching with quick access to important data and information.
    • Accommodate your company's unique omni-channel environment using APIs to consolidate your data.

    For example, you might want to create a component that displays the cases associated with an SLA, or that tracks the active chats in a particular queue. You can use the Next Experience UI Framework and the ui-component extension to develop the component you need, and access data from your platform using the Http Effect API. You can also query platform data using GraphQL by creating a custom schema. For more information, see Scripted GraphQL.

    What to know before you begin

    Before you start designing and building your component, make sure you have:

    • Some general knowledge of web component concepts, development, and design.
    • JavaScript knowledge to define the component behavior.
    • Knowledge of Node Package Manager (npm).
    • The most recent version of Node.js installed on your local machine. For more information, see, Node.js.
    • The ServiceNow CLI installed on your machine.

    Next Experience UI Framework

    The Next Experience UI Framework is a JavaScript framework that lets you extend your apps and build web components that are reusable throughout your applications. Using the Next Experience UI Framework lets you:

    • Create a single component to use in multiple places across your applications.
    • Encapsulate the component's scope to prevent conflicts with other code.
    • Add properties, slots, and actions to your component, allowing users to customize the component every time they use it in a Workspace.

    For more information, see the ServiceNow® Developer Site.

    ui-component extension and development flow

    The ui-component extension is an extension to the ServiceNow CLI that lets you develop custom components using the Next Experience UI Framework. With the ui-component extension, you can:

    • Create the set of files required to develop a component, or project scaffolding.
    • Start a local development server to test your component.
    • Build a component project and deploy it to a ServiceNow instance.

    For more information, see the ServiceNow® Developer Site.

    Application scope

    When you deploy a Next Experience UI Framework component, it deploys into a scoped application on the instance. You can provide an application scope for the component to use as a namespace identifier. Use the namespace identifier guidelines for application development on the instance. For more information, see Application scope.

    When reserving an application scope, follow these requirements:

    • Maximum: 18 characters.

    • Case: snake case.

    • Format: x_customerprefix_componentname, where:
      • customerprefix is the value in the glide.appcreator.company.code system property on your instance.
      • componentname is the value provided in the component's name parameter when you created the project.

    If you do not provide an application scope when creating your component project, the Now CLI creates one for you.

    Alternatively, you can add a value to the scopeName parameter in the now-ui.json file.

    Reference guide

    To see the Now CLI reference guide, visit the Developer Site.