---
sourceDocument: Brazil Sales Customer Relationship Management
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/order-management

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Sales Customer Relationship Management

ft:clusterId :

    - omgmt

bundleId :

    - omgmt

workflow :

    - Customer and Industry


---

# Open state management

# Open state management {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 5 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) 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 Open state management

The open state model is a programmatic framework within the Configuration State Model API designed to control how product options appear and behave in the legacy product configurator of Sales Customer Relationship Management (Sales CRM).
It allows ServiceNow customers to dynamically manage the visibility, editability, quantity, selection, and value states of configurator nodes based on user interactions or predefined rules.
This framework enhances configurator flexibility by enabling tailored product option displays and behaviors according to customer, product, or contextual needs.
Show full answer Show less  

## Key Features

* **Node State Management:** Nodes represent product relationship groups, child products, and characteristic options. States include:
  * **Visible:** Show or hide nodes.
  * **Editable:** Make nodes selectable or read-only.
  * **Quantity:** Control visibility and editability of quantity fields with validation and messaging.
  * **Checked:** Show or hide selections.
  * **Value:** Set characteristic values with corresponding rules and messages.
* **Event-Driven State Changes:** States are managed programmatically through On Load (initial visibility/editability) and On Change (node value changes) events within the Configuration State Model API framework.
* **Helper API Methods:** Provides getter and setter methods to read and modify node states, reducing the need for complex JSON scripting. Examples include methods to:
  * Retrieve all nodes or specific nodes and their states.
  * Set visibility, editability, quantity, selection state, and characteristic values with optional contextual messages.
  * Access context variables related to header and line items within the configurator UI.

## Use Cases

* Hide or show options based on customer attributes (e.g., hide options for customers in certain states due to regulations).
* Set default options for specific customer segments (e.g., show only premium upgrade plans to existing premium customers).
* Restrict selectable options based on other attribute selections (e.g., limit laptop sizes when touchscreen is required).
* Control product quantity settings with minimum and maximum bounds, allowing agent adjustments within defined limits.
* Enforce specific characteristic selections when certain products are chosen (e.g., selecting a 5G speed with an Ultimate Internet Plan).

## Practical Benefits for ServiceNow Customers

By leveraging the open state management framework, customers can create highly dynamic and context-sensitive product configurators that improve the accuracy of product configurations and streamline the sales process. The ability to programmatically control UI elements reduces manual intervention and errors, while contextual messaging enhances agent understanding during configuration. This leads to better customer experiences and optimized sales workflows.  
The open state model is a programmatic framework in the Configuration State Model API, which lets you program variations in product options that appear in the legacy product configurator in Sales Customer Relationship Management. The API framework provides certain states and helper API methods for controlling how nodes in the legacy product configurator user interface are displayed.  
As developers, you can use [extension points for open state management](https://servicenow-prod.fluidtopics.net/sRIp0jcqsEB3VroRM291vQ "Control the options displayed in the product configurator by using extension points in Open state management.") to set the view-only or editable states on any configurator node, based on events that occur at loading or when product selections change. You can also optionally script information messages along with changing the state of the node. These messages display contextually in the product configurator user interface. Various helper API methods are available for reading and setting states on any node, eliminating the need for extensive JSON scripting.  
Note:  
Check your entitlements to determine if you have access to these features.

## Use cases for configuration state management {#som-open-state-management-model__section_h1s_ljy_cbc}

The following table shows different ways that you can control the product options displayed in the legacy product configurator.{#som-open-state-management-model__table_wgs_34y_cbc__entry__2}

| Product configurator use case | Example |
|-|-|
| Hide certain options for a customer | A product attribute selection isn't displayed for customers in California due to state safety regulations​. |
| Set certain default options for a customer | For upgrades, only the Ultimate plan is displayed for existing customers who have a premium plan. |
| Allow only certain options to be selected based on other attribute options | For certain products such as laptops, display all sizes 13", 15", and 17", but display only 15" and 17" laptops if only the touchscreen feature is required. |
| Allow quantity to be set for products | Some products might have different default quantity values. Allow agents to configure the quantity as long as the value is within the bounds of a minimum quantity and maximum quantity allowed for that product. |
| Allow only certain characteristic selections to be made | Certain product selections require a particular characteristic value to be chosen. For example, upon selection of the Ultimate Internet Plan, the connectivity speed that can be chosen is 5G. |
[Table 1. Configuration state model use case examples]

{#som-open-state-management-model__table_wgs_34y_cbc}

You can manage the display of options in the legacy product configurator by using the Configuration State Model API Framework.

## Node states {#som-open-state-management-model__section_sfl_ng2_hbc}

Nodes in the legacy product configurator display product relationship groups, child products, and characteristic options. Nodes can have the following states:

Visible - Yes (make node visible) or No (make node invisible)
:   Configurations that are visible or not visible to the agent in the legacy product configurator. Options might not be visible if they're incompatible with other selections made by the agent. For example, for a particular car
    wheel size, incompatible tire options are not visible.

Editable - Yes (show node and make it selectable) or No (show node but make it unselectable)
:   Configurations that are editable or not editable by the agent in the legacy product configurator. Agents can personalize certain aspects of the product while maintaining constraints that are necessary for the product. For
    example, for a specific car model, only compatible exterior colors are editable.

Quantity - Visible (Yes/No), Editable (Yes/No)
:   Configurations that set quantity on a product, enforce rules related to quantity, and show informational and error messages related to quantity at the appropriate node.

Checked - Yes (show node selections) or No (make node selections invisible)
:   Configurations that show the configuration options for selection based on the context.

Value - Visible (Yes/No), Editable (Yes/No)
: Configurations that set a value for a characteristic, enforce rules related to the characteristic, and show informational or error messages related at the appropriate node.  
Note:  
Agents can choose to set messages at a node level to provide justification for a state change.

## Events {#som-open-state-management-model__section_j3h_2fk_2cc}

Manage node states using the Configuration State Model API Framework. Activate these states by using the following two events in the Events Framework of the Configuration State Model:

* On Load - The state (visibility, editability) of each node is initially set to Yes (true). The open state is invoked on loading.
* On Change - This function is called whenever there's a change in a node's value in the legacy product configurator user interface. However, this state isn't invoked when quantity changes occur in the legacy product configurator. These states can be set programmatically in one of the following ways: on-load, during selections, or just before the instance is synchronized back to the transaction
{#som-open-state-management-model__ul_lqy_ffk_2cc}

## Helper API methods {#som-open-state-management-model__section_bp2_1pd_hbc}

You can use the following helper API methods to read and set states on any node.

Apply states
:   Set the visible and editable states for product relationship groups, product characteristics, and product characteristic options using Getter and Setter methods to read and change the state of the configuration model.

Getter methods
:   Obtain node paths along with the states on any configuration node:

    * getAllNodes(): Returns JSON with node path (reference to code) and its respective relative path with all the states.
    * getNode(nodePath): Returns javascript object of the node for the specified node path if it exists.
    * getNodeDetails(nodePath: Return all the states for the specified node path if it exists.
    {#som-open-state-management-model__ul_edy_31c_2bc}

Setter methods
:
    * Set the visible and editable states for product relationship groups, product characteristics, and product characteristic options.
      * setVisible: True/False at all levels
      * setVisible(True/False)
      * setEditable: True/False at all levels
      * setEditable(True)
      * Implementation example:

            var newHandler = configInstance.getNode(nodePath);
            newHandler.setVisible(true, "This is a sample message for setVisible");
            newHandler.setEditable(false, "This is a sample message for setEditable");

      {#som-open-state-management-model__ul_uqz_ttc_2cc}
    * Set the quantity for offers and specifications. The nodePath determines the product, and the value is the quantity to be set.
      * setQuantity(value);
      * Implementation example:

            var newHandler = configInstance.getNode(nodePath);
            newHandler.setQuantity(value, "This is a sample message for setQuantity");

      {#som-open-state-management-model__ul_drv_15c_2cc}
    * Set the configuration options to see what is being selected.
      * setChecked (value); True/False
      * Implementation example:

            var nodePath = "QUADPLAYHO1/OPTIONALPRODUCTS/CONNECTEDC2/CONNECTEDC1/VIN"
            var newHandler = configInstance.getNode(nodePath);
            var newHandler.setChecked(true, "This is a sample message for setChecked")

      {#som-open-state-management-model__ul_q5b_2jf_2cc}
    * Set the value for a characteristic node where the input type is a single line of text.
      * setValue( value);
      * Implementation example:

            var nodePath =
            "QUADPLAYHO1/OPTIONALPRODUCTS/CONNECTEDC2/CONNECTEDC1/VIN"
            var newHandler = configInstance.getNode(nodePath);
            newHandler.setValue("9TKN332", "This is a sample message for
            setValue");

      {#som-open-state-management-model__ul_p2l_r3k_2cc}
    {#som-open-state-management-model__ul_mk4_4tc_2cc}

Getter context variable methods
:   Retrieve context variables inside the legacy product configurator user interface.

    * getHeaderContextVariables(): Returns a list of all the header context variables.
    * getHeaderContextVariableValue(contextVariable): Returns a value and the display value of a specific context variable in the header.
    * getLineContextVariables(): Returns a list of all the line context variables.
    * getLineContextVariableValue(nodePath, contextVariable): Returns the value of a specific context variable in the line.
    {#som-open-state-management-model__ul_i2p_qbc_2bc}

