--- title: Add a state to the state model description: Add a state to the state model for different change types to meet the requirements of your organization.Any modification to the state model may impact the default workflows for change requests. locale: en-US canonical_url: https://www.servicenow.com/docs/r/it-service-management/change-management/t\_AddANewState.html release: brazil product: Change Management classification: change-management topic_type: task last_updated: "2026-09-10" reading_time_minutes: 5 breadcrumb: [State model and transitions, Configure, Change Management, IT Service Management] --- # Add a state to the state model Add a state to the state model for different change types to meet the requirements of your organization. ## Before you begin Role required: script\_include\_admin, ui\_policy\_admin, ui\_action\_admin, or admin ## About this task The [State model](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/it-service-management/change-management/t_ActivateStateModel.md) plugin is activated by default. For more information about base system states for change requests, see [State model and transitions](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/it-service-management/change-management/c_ChangeStateModel.md). ## Procedure 1. Navigate to **All** > **Change** > **Create New** and add a state choice to the **State** field. 1. Select and hold \(or right-click\) the **State** field label, and select **Configure dictionary**. 2. In the **Choices** related list, run a filter for \[**Table**\] \[**is**\] \[**change\_request**\]. 3. Select **New** and add the new state with the following information. - **Table**: Change Request \[change\_request\] - **Label**: name of your new state - **Value**: numerical value that is not already assigned to an existing state choice - **Sequence**: number corresponding to the location for it to appear in the list of states. If you assign it the same sequence number as another choice, it appears below the other choice. 4. Select **Submit**. 2. Navigate to **All** > **System Definition** > **Script Includes**. Script include records that contain **SNC** in the name are read-only. As you complete the following steps, make sure that you select the correct script include to modify. For example, modify **ChangeRequestStateHandler** not **ChangeRequestStateHandlerSNC**. **Note:** Extended script includes \(without **SNC**\) include all of the functionality of their SNC counterparts. If you modify a base script include \(appended with **SNC**\), it is no longer updated during system upgrades. 3. Open the **ChangeRequestStateHandler** script to perform the following edits. - Update the **statehandler constants** section at the start of this script include to include values for the newly added state. For example: ``` ChangeRequestStateHandler.MY_NEW_STATE = "mynewstate"; ``` - Update the **STATE\_NAMES** map at the end of the initialize function to include the numeric value for the newly added state. For example: ``` this.STATE_NAMES["-6"] = ChangeRequestStateHandler.MY_NEW_STATE; ``` **Note:** The **STATE\_NAMES** map provides a mapping between the numeric values that are stored in the **State** field on a change request under a memorable name. This mapping enables the memorable name to be used in the state model script includes. 4. Edit the appropriate script include to incorporate the new states into the model for the relevant change request types. Each type of change request has a corresponding script include named **ChangeRequestStateModel\_<type>** where **<type>** is the value of the change request type. For example, **ChangeRequestStateModel\_normal** defines the state model for change requests with a type of normal. Each state model script include defines objects that specify the following information. - Which states are available. - The next state or states for each available state. - Functions for each state transition to decide whether that transition is available `(canMove)` along with a function to be executed as part of moving to that state `(moving)`. The following example is from the **ChangeRequestStateModel\_normal** script include. \[Omitted image "state-script-normal.png"\] Alt text: changing the change request state script 5. Create a UI action to provide a button to progress the change request to the new state. 1. Use **Insert and Stay** to make a copy of one of the default UI actions, such as **implement**. 2. Update the following fields on the form.
| Field name | Update |
|---|---|
| Name | Update to match the name of the new state. |
| Action name | Replace the state at the end of the name with the new state. |
| Hint | Update the text to refer to the new state. |
| Onclick | Rename the function to match the new state. |
| Condition | Update the call to the `isNext` function with the new state. |
| Script | - Update the function name to match the one specified in the **Onclick** field. - Update the line that starts with `ga.addParam(“sysparm_state_name”,…` to enter the name of the new state as the second parameter of the `addParam` function. - Update the line that starts with `gsftSubmit` and modify the third parameter of this function call to match the value entered in the **Action name** field. |