---
sourceDocument: Brazil Field Service Management
sourceDocumentLink: https://www.servicenow.com/docs/r/field-service-management

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Field Service Management

ft:clusterId :

    - fsm

bundleId :

    - fsm

workflow :

    - Customer and Industry


---

# Customize state flows

# Customizing state flows {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 4 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 Customizing state flows

State flows in Field Service Management (FSM) control how task and request records transition between states, replacing the standard process with customizable sequences.
They use automatically created business rules, client scripts, and UI actions to manage state transitions and field behaviors.
These elements persist only while the associated state flow records exist, and are removed when state flows are deleted.
Show full answer Show less  
Customizing state flows requires scripting skills and is managed by users with the **wmadmin** role, enabling creation, modification, and deletion of state flows for work orders and tasks.

## Key Features

* **Manual and Automatic Transitions:** Manual transitions trigger UI actions based on conditions or scripts, while automatic transitions use business rules triggered by data changes.
* **State Choice List Limitation:** The State field's available options can be limited to valid next states based on the current state, improving accuracy and user guidance.
* **Field Controls:** Visibility and behavior of fields can be controlled dynamically during state transitions or when reaching specific end states.
* **Events:** State transitions can trigger system events to enable notifications or additional scripted actions.
* **Start and End States:** State flows define processing during transitions between specified start and end states, with flexibility for flows having only start states or applying broadly to multiple transitions.
* **Cleanup Mechanism:** When state flow records are deleted, associated programming elements are cleaned up to maintain system integrity.

## Configuration Steps

* **Configure State Flows:** Define the sequence of states for work orders and tasks to match your tracking needs.
* **Optional Dictionary Overrides:** Set default starting states for new records.
* **Optional Work Notes:** Automatically add customized notes when tasks enter specific states (e.g., "Task rejected by agent").
* **Optional Field Controls:** Manage field visibility and behavior dynamically based on state transitions.
* **Optional Event Triggers:** Configure state flows to fire registered system events during specific transitions for notifications or script actions.
* **Optional Rebuild and Cleanup:** Rebuild flows to resolve sysid mismatches and clean up unused programming elements when flows are removed.

## Practical Benefits for ServiceNow Customers

Customizing state flows allows FSM customers to precisely control task and request lifecycles, enforce valid state transitions, automate notifications and field behaviors, and maintain clean system configurations. This leads to improved process consistency, accuracy in tracking work progress, and enhanced automation tailored to business requirements.  
State flows control the sequence in which records transition between states in the Field Service Management applications.

## How Field Service Management task state flows work {#work-order-state-custom__section_gk5_3wd_dbc}

State flows replace the standard process that controls how requests and their associated tasks move between states. The ServiceNow system creates business rules, client scripts, and UI actions that perform the transitions and field controls you specify. These programming elements remain in use while the state flow records that use
them are present. When state flows on the Field Service Management table are deleted, the system attempts to delete any unnecessary programming elements that were created on that table. You can limit the selections for the State field to valid states for the
transition, based on the starting state.  
Important:  
Creating custom state flows requires scripting knowledge.  
State flows provide the following controls:

* Manual transitions: A UI action, created automatically by the system when you provide a condition or a script, initiates a transition.
* Automatic transitions: A business rule, created automatically by the system when you provide a condition and a script, initiates a transition when changes are made to a request or task.
{#work-order-state-custom__ul_vhz_kwd_dbc}

Users with the wm_admin role can perform the following tasks:

* Create, read, add, update, or delete work order flows and work task flows.
* Trigger events on particular state transitions.
* Transition to another state automatically when data in a request or its task changes, or change states manually when the user selects a button.
* Limit the choice list for the State field to those end states that are valid transitions from the given start state.
* Control the visibility and behavior of selected fields on a target table when records in that table change states.
* Create custom state flows. Turn off the State flows are enabled option on the configuration screen.
{#work-order-state-custom__ul_inb_fwd_dbc}

## Features available with state flows {#work-order-state-custom__section_ory_lwd_dbc}

* Custom transitions: Customize the order in which states can change for requests and task records.
* Field controls: Control the behavior and visibility of specific fields when a task changes states or reaches a specified end state.
* State choice list: Limit the values offered in a task record State field to valid states for that transition. This is the same client script that the system creates to manage field controls for state transitions.
* Events: Trigger events when a state transition occurs or when a record reaches a specific end state.
{#work-order-state-custom__ul_o1b_nwd_dbc}

## Start and end states {#work-order-state-custom__section_bcg_4wd_dbc}

Users with the wm_admin role can create a custom state flow for processing that occurs when a task record makes a specific transition from one state to another. These records require a starting state and an ending state, and
processing occurs during the transition between states. To perform some processing when a task record reaches a particular end state, you must define the end state. In some cases a state flow can have a starting state only, like when
you perform some type of cleanup after a task is canceled. A state flow might have no starting or ending state if the processing in the record applies to more than one state transition. The solution is to store the business rule or
client script in a state flow record and create a condition to trigger processing for any state change that requires it.

An example of this in Field Service Management is the Roll Up Changes business rule on the Work Order Task \[wm_task\] table. This business rule rolls up state changes that occur in tasks to the parent work order.

## Configuration overview {#work-order-state-custom__section_dz4_w53_jcc}

The steps for setting up state flow customizations are:

1. [Configure state flows for work orders and work order tasks](https://www.servicenow.com/docs/EMVdxnlIOVrgpBhLr48opQ "State flows control the sequence in which work orders and work order tasks transition from one state to another. You can customize state flows to control the sequence in which records transition between states in Service Management applications.")

   Configure the states that work orders, and work order tasks move between. This can be helpful if you have a specific sequence of states that help track work.
2. (Optional) [State flow dictionary overrides](https://www.servicenow.com/docs/I7TwaPrGnRrcxfwsYBacFg "A dictionary override in a state flow defines the starting state for all new records in a specific table. You set an override in tables that extend a base table only, so that your customizations are applied only to the extended table.")

   Define the starting state for all new work orders and work order tasks with dictionary overrides.
3. (Optional) [Work notes in state flows](https://www.servicenow.com/docs/PzcchVDzmgRtO5yU~vQ4WQ "Work notes are used to communicate information about state transitions.")

   Add customized work notes to work order tasks when they reach a certain state. For example, you might include the note, "Task rejected by agent" in the Reject state flow.
4. (Optional) [Field controls in state flows](https://www.servicenow.com/docs/W3xSuaPBBw0k4RBhf_qD6w "You can define controls for individual fields that are enforced when a record transitions between states.")

   Determine what happens if the system detects a specified state transition. For example, you might want the Problem field to be visible when an incident moves to the Awaiting Problem
   state.
5. (Optional) [Trigger events on state changes](https://www.servicenow.com/docs/wCJlHVKx1UI6sXj8RBpkWQ "You can configure a state flow to trigger a registered system event when a task transitions from a starting state to a specified end state. For example, you can use events to trigger email notifications and create script actions.")

   Configure a state flow to trigger a registered system event when a task transitions from a starting state to a specified end state. For example, you can use events to trigger email
   notifications and create script actions.
6. (Optional) [Rebuild state flows](https://www.servicenow.com/docs/~K4Ds8~E6nX3LH1fa0Cb2g "Administrators can rebuild state flows when a mismatch between existing and new sys_ids occurs.")

   Rebuild state flows when a mismatch between existing and new sys_ids occurs.
7. (Optional) [State flow cleanup](https://www.servicenow.com/docs/V6_NkENNx~3r0MDm4grvHg "The business rules, client scripts, and UI actions that the system creates automatically to perform custom transitions exist only while the state flow records that use them are present.")

   Cleanup the business rules, client scripts, and UI actions that the system creates to perform custom transitions that only exist while the state flow records that use them are present.
{#work-order-state-custom__ol_tpf_x53_jcc}

