Create or Update Record action

  • Release version: Yokohama
  • Updated January 30, 2025
  • 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 or Update Record action

    The Create or Update Record action in ServiceNow allows you to either update an existing record or create a new record within a specified table using a single operation. This action is essential for workflows that require conditional record management based on unique identifiers, streamlining automation processes within your ServiceNow environment.

    Show full answer Show less

    Key Features

    • Identification of Existing Records: You specify one or more fields as unique identifiers (for example, short description and priority in the incident table). The action updates a matching record if found, or creates a new record if no match exists.
    • Unique Identifier Requirement: If no unique identifier fields are selected, the action defaults to creating a new record. If multiple records match the unique identifiers, no update occurs, and an error is logged.
    • Inputs:
      • Table: Select the target table for the create or update operation.
      • Fields: Define the field values to set or update. Note that multiple journal fields (such as comments or work notes) cannot be updated by this action.
      • Determines Uniqueness: Choose fields to act as unique identifiers to guide whether to update or create records.
    • Outputs: The action provides outputs including the reference to the record created or updated, the table name, status of the operation (Created, Updated, or Error), and an error message if applicable. These outputs can be used downstream in your flow logic.
    • Role and Availability: Available as a core Workflow Studio action for users with flowdesigner or admin roles to incorporate into flows.

    Practical Impact

    This action enables ServiceNow customers to efficiently automate data management by ensuring that records are accurately created or updated without duplicates. It simplifies flow design by combining create and update logic into one step, reduces manual intervention, and supports dynamic field value assignment. However, be mindful that server-side validation rules may be triggered, but UI policies will not activate during this action.

    Create or update a record in a ServiceNow table using a single operation. Update a record that exists, or create a record using the values provided.

    Identification of existing records

    The Create or Update Record action identifies existing records by searching for matching values in the fields that you select as unique identifiers. For example, you can specify that the short description and priority fields uniquely identify an incident. When the action finds an incident with a matching short description and priority, it updates the matching record rather than creating a new record.

    Note:
    • If no field is selected as a unique identifier, the action creates a record with the field values provided.
    • If more than one record matches the value of the unique identifiers, the action doesn't update any records and displays an error message in the flow execution details.

    Roles and availability

    Available as a Workflow Studio ServiceNow core action. Users with the flow_designer or admin role can add an action to a flow and define configuration details.

    Inputs

    Provide a value for each input that your flow needs. To add dynamic values, you can also drag and drop pills from the Data panel or select them from the pill picker.

    Table
    Data type: Table Name

    Table in which to create or update a record.

    Fields
    Data type: Template Values

    Field values to set or update for the record. For example, to set the short description to a certain value, select Short description and set the desired value.

    Important:
    The system does not support updating multiple journal fields such as the additional comments or work notes of a task record.

    If adding the action to a subflow, you can Create a template value input. Dynamically set field values can trigger server-side validation rules but cannot trigger UI policies.

    Determines uniqueness
    Data type: True/False

    Option for selecting the field as a unique identifier, which determines when to update or create a record. A record is updated when the incoming field value matches an existing record field value. A record is created when the incoming field value does not match an existing record field value. This option appears when the required table name and fields are selected.

    Outputs

    These outputs appear in the Data panel. You can use them as inputs elsewhere in your flow.

    Record
    Data type: Record

    Reference to record created or updated.

    Table
    Data type: Table Name

    Table where record was created or updated.

    Status
    Data type: Choice

    Completion status of the action. The flow execution details page displays one of these values.

    • Created [created]: The action created a record.
    • Updated [updated]: The action updated a record.
    • Error [error]: The action produced an error.
    Error Message
    Data type: String

    Error message produced when the record operation fails.

    Update problem record from inbound email

    Figure 1. Inputs used for create or update problem record
    Inputs used for create or update problem record.