OBLYTECH Logo
OBLYTECH Logo

Service Portal Widget Instances

A Service Portal widget in ServiceNow becomes a widget instance when you add it to a page. Configure that instance to control its supported settings without changing the shared widget definition. Use Service Portal Designer to place the widget, open its instance options, save the values, and check the resulting page.

Separate the widget definition from its page instances

A widget supplies the reusable component. An instance records a particular placement and its configuration. Adding a widget to a page creates a record in Widget Instances [sp_instance]. That record references the widget and the page column containing it, and holds configuration through predefined fields and additional options in JSON format.

You can place several instances of the same widget on a page and configure them differently. Treat the placement as the unit of work: identify the page, column, and intended result before changing settings. This helps when two visually similar components need different values.

Instance options vary by widget. A field available on one component is not evidence that another component supports the same behavior. Start with the options exposed by the selected widget. For a closer look at individual settings, see Service Portal widget instance options.

Create and configure an instance in Designer

Creating or editing a page in Service Portal Designer requires sp_admin or admin. Configuring widget instances also requires sp_admin or admin. The following workflow uses Brazil behavior; check the available widgets and controls on your instance and release.

  1. Navigate to All > Service Portal > Service Portal Configuration and select Designer.
  2. Select the portal name in the header to switch to the intended portal. Open the page you want to configure.
  3. If the page needs a layout, drag Container from Layouts onto the page, then drag a layout into that container. The layout provides columns for widgets.
  4. Use the widget filter to find the component, then drag it into the layout. This creates its instance.
  5. Move to the widget instance and select the Edit icon. Fill in the fields in the instance options window.
  6. Select Save. Use Preview in the header to inspect the page, including the mobile and tablet views.

Some widgets contain no information by default and need instance options configured before they appear on the portal page. If a newly placed component seems absent, inspect its options before replacing it or editing its scripts.

Record the expected result alongside the settings you choose. For example, describe which content the placement should show and how the reader should use it. Then compare the preview with that expectation. A saved configuration proves that values were accepted; checking the page establishes whether they produce the intended experience.

Use a concrete widget to check option behavior

The Business Service Status widget shows why field names need careful interpretation. It draws service information from cmdb_ci_service. Its Number of Services option controls how many services appear, with a default of 250.

Its Title field names the widget in the instance options header; it does not change the title visible to portal users. Glyph is also not user-facing. Changing the service list title requires cloning the widget and editing its HTML. Changing the data source requires adjusting the server script in a cloned widget.

For this component, make the acceptance check specific. If the request concerns the number of services displayed, inspect Number of Services. If it concerns the heading readers see, recognize that the instance Title field does not satisfy that request. This distinction prevents repeated configuration changes that cannot produce the requested result.

Prefer an existing supported option when it answers the requirement. When the requirement reaches the widget definition, plan the code change separately and review which placements will use the changed component. The custom widget development guide covers that next stage.

Expose options when a custom widget needs them

A custom widget’s option schema defines its configurable parameters. Editing that schema requires admin or sp_admin, a cloned or newly created widget, and permission to edit the selected widget.

  1. Open All > Service Portal > Service Portal Configuration > Widget Editor and select the widget.
  2. Open the menu icon and select Edit option schema. The option appears for users who can edit that widget.
  3. Select + to add an option. Define its label, name, type, hint, and form section, then select Save.
  4. Add the widget to a page in Service Portal Designer and open the instance’s edit icon to test the resulting fields.
  5. Configure the values, then inspect the instance record to check the stored configuration.

The schema is stored in Option schema on sp_widget. The individual instance values are stored in Additional options, JSON format on sp_instance. Keep those two records distinct during troubleshooting: one defines the available inputs, while the other holds values for a placement.

Widget scripts access values through the options variable using the option’s name. An unset option can be undefined, so define appropriate defaults in the server script. As a development check, test both an explicitly configured instance and one where the option has not been supplied.

Before introducing a new field, write a short description of what changes when its value changes. If the team cannot describe a visible or functional outcome, the proposed option may add maintenance work without helping page administrators.

For help planning this work, see ServiceNow implementation.

Recognize widget-specific placement workflows

Not every widget is introduced through the same configuration surface. My Purchasing To-Dos can be dragged from Widgets onto the Service Portal home page in Designer. Adding that Shopping Hub widget requires sn_shop.shopping_hub_admin and sp_admin. Shoppers can then view assigned purchasing to-dos before continuing their work in Shopping Hub.

Teams Chat on the standard ticket page uses a different route. Adding it requires sp_admin. Navigate to All > Standard Ticket > Standard Ticket Configuration, create the ticket configuration, and save it. In Tab Configurations, select New, set Type to Custom, enter Teams chat in Tab name, and select Teams Chat in Widget. Select Submit, then Update on the ticket configuration.

That tab configuration exposes Widget parameters as a comma-separated list when Type is Custom. Treat these as parameters for that configuration route rather than assuming they are the same form as a Designer instance’s options.

Identify the host page before choosing the procedure. A request to add chat to a ticket record and a request to place a component on a portal home page describe different work. For broader page changes, use the Service Portal customization guide.

Validate settings and investigate slow instances

Check one placement at a time. Reopen its options, verify the saved values, and compare the rendered content with the acceptance criteria. Where several instances share a widget, include a second placement in your review so you can distinguish local configuration from a shared implementation change.

Keep a small change record containing the page, widget, instance identifier, altered fields, previous values, and expected outcome. This is a recommended working method: it gives the next administrator enough context to understand why the placement differs from another instance.

For a custom widget with slow data loading, hotspot instrumentation can capture and log load time. Adding hotspots requires sp_admin. Open All > Service Portal > Widget, select the custom widget, and add the timing instrumentation in Server script. The instrumentation uses a start time and the widget instance identifier, then submits the hotspot through sn_cd.cd_Utils().postInstanceHotspot. Select Update and inspect Performance details.

Measure before changing options simply to make the page look faster. A blank component and a slow component need different investigations. Use Service Portal troubleshooting when the configured result still does not match the page behavior.

Questions about instance configuration decisions

Which field types can an option schema use?

The supported types include String, Boolean, Integer, Reference, Choice, Field_list, Field_name, and Glide_list. Field_list and Field_name depend on a table. Choose a type that fits the value administrators need to supply.

When should options use an extension table?

Consider an extension table when options need unsupported field types, complex configuration, or searchable values. It adds maintenance and can add server calls, so assess those needs before moving beyond the existing schema.

Does cloning a base system page create new widget instances?

Yes. Clone Page creates a new widget instance for each widget on a base system page. Include those new placements in your configuration review rather than assuming the page copy needs no further inspection.

Can a draft page be reviewed by ordinary portal users?

A page marked Draft is visible to users with admin. Other users see a 404 page. Account for that access behavior when arranging review, so a visibility restriction is not mistaken for an instance configuration failure.