Building actions

  • Release version: Washingtondc
  • Updated February 1, 2024
  • 3 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 Building Actions

    Building actions within ServiceNow's Flow Designer enables users to automate repeatable tasks or operations. Actions can take inputs, run a series of steps, and produce outputs that can be utilized by other actions in a flow. This functionality streamlines the process of creating and managing workflows.

    Show full answer Show less

    Key Features

    • Application-Specific Actions: Easily create actions with pre-set configurations to simplify flow integration.
    • Scripted Actions: Add code-less scripted actions to your flows for enhanced functionality.
    • Reusable Actions: Create actions that maintain consistent configurations across different flows, reducing manual setup.
    • Inputs and Outputs: Define data variables for inputs (e.g., references to incident tables) and outputs (results from actions) to facilitate data handling.
    • Action Designer Environment: A designated interface for creating, testing, and publishing actions, ensuring they function as intended.
    • Testing Capabilities: Users can test actions in safe environments to verify their functionality before deploying them in production.

    Key Outcomes

    By utilizing actions in Flow Designer, ServiceNow customers can efficiently automate processes, enhance workflow management, and ensure consistency in task execution. The ability to test actions and manage configurations contributes to a more reliable and streamlined operational environment. This ultimately leads to improved productivity and reduced errors in workflows.

    Actions automate a repeatable task or operation within a flow. Flows run actions by passing them data as inputs. Actions run a sequence of steps to complete the task, and pass data to the flow as outputs.

    Using Action Designer, you can:
    • Create application-specific actions with pre-set configuration details, enabling process analysts to easily add actions to a flow with little configuration.
    • Create scripted actions that appear code-less when added to a flow.
    • Build integrations using Integration Hub.

    Core actions

    ServiceNow Core actions that come with your instance cannot be viewed or edited from the Action Designer interface. Some applications include spokes which include application-specific actions. Spoke actions are typically read-only but can be copied and customized.

    Custom actions

    Unlike core actions where flow designers must manually configure flow logic, custom actions always use the same configuration when added to a flow. If your flow designers often use an action with the same configuration, you might create a reusable action.

    A reusable action includes these components.

    Inputs

    Inputs are data variables used in your action. For example, if an action step creates a record in the incident table, your input might be a reference to the incident table. Once added as an input, the table and its fields are available to steps and outputs in the flow.

    Each input you define for an action becomes a configuration option in the Flow Designer interface. To use the action in a flow, flow designers must define a value for each mandatory input. The more inputs an action has, the more data flow designers must define and the more familiar they must be with the underlying data model to use the action effectively.

    Inputs provide advanced options based on their data type. All inputs have advanced options to add a hint or provide a default value. Use advanced options to guide flow designers through adding and configuring an action to a flow. For example, create a choice input to provide flow designers with a pre-defined list of configuration options to choose from. For more information about the configuration options available to particular data types, see field types.

    Outputs
    Outputs are data variables that represent the results of the action. These results are available to other actions in a flow.
    Steps

    A step is a single reusable operation within an action. For example, the Create Record step allows action designers to specify the table and field values to use during record creation. Step configuration requires subject matter expertise with application tables, fields, and business logic. Application developers or IT generalists add steps to actions from the Action Designer design environment. Flow Designer provides a set of ServiceNow core steps to automate ServiceNow AI Platform processes. You can add application-specific steps by activating the associated spoke.

    Action Designer design environment

    Action Designer interface

    Create and edit actions by defining inputs and adding action steps. Test actions to verify if they complete successfully and review the runtime values they generate. Copy actions to use existing actions as templates. Publish actions to activate them, which makes them available to activated flows and to preserve their current action steps, variables, and sequence as a snapshot separate from further configuration changes.

    More Actions

    Click the More actions icon (More actions icon) to access additional options for the action.

    Copy action
    Create a copy of the open action in an application you specify.
    Configurations
    Enable or disable the Show inline script toggle option.
    Code Snippet
    Generate a code snippet for the action.
    Manage security
    Enable or disable the Callable by Client API option.
    Manage natural language title
    Create or edit an action title with styled or dynamic text. For more information, see Manage natural language titles.

    Testing actions

    After adding inputs and action steps, users with the action_designer or admin role can test an action. To test an action, provide the required inputs. Action designers should always test actions on non-production instances containing relevant demonstration data because testing an action can make significant changes to records on your instance.

    Roles

    To create custom actions, you must have the action_designer or admin role.

    Action status

    Every action has an Action Status data pill in the Data pane. This object data pill contains the current runtime details about the action. The Action Status object consists of a code and message.

    Action Status > Code
    Integer data pill containing the code returned by the first matching error condition or the last step run. You can return your own code when you create a custom error condition. See Action error evaluation.
    Action Status > Message
    String data pill containing the message produced by a matching error condition or the last step run. You can return your own message when you create a custom error condition. See Action error evaluation.