---
sourceDocument: Yokohama IT Operations Management
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/yokohama/it-operations-management

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama IT Operations Management

ft:clusterId :

    - itom

bundleId :

    - itom

workflow :

    - Technology


---

# Create a custom subflow for alerts

# Create a custom subflow for alerts {#ariaid-title1}

* Release version: Yokohama
* 
* Updated January 30, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read

You can create a subflow according to your requirements. For example, you can resolve alerts, notify teams, or run remediation actions.

## Before you begin

Role required: evt_mgmt_admin, flow_designer

## About this task

Copy an existing subflow, and then customize it. Publish the custom subflow so that it is available to be used to resolve any alert. For more information, see [Create a subflow](https://www.servicenow.com/docs/access?context=create-subflow&version=yokohama&pubname=yokohama-build-workflows&ft:locale=en-US).  
Note:  
If your ServiceNow instance uses domain separation, you must ensure that the new custom subflow that you created operates only on the data of the designated domain.

## Procedure

1. Navigate to AllProcess AutomationFlow Designer.
2. In the Flow Designer window, click Subflows.
3. Click Create Incident.  
   The Create Incident subflow opens in Flow Designer in read-only format. The inputs in the Create Incident subflow are described in the following table.  
   {#create-custom-create-incident-subflow__table_i32_ssg_lgb__entry__2}

   | Value | Description |
   |-|-|
   | alertRuleName | The name of the alert management rule that specifies this subflow, for example <kbd class="ph userinput">IDD</kbd>. |
   | alertRuleId | The sys_id of the alert management rule, for example, <kbd class="ph userinput">1ae122e84f5f1300b28392918110c71e</kbd>. |
   | alertGR | The alert record that matches the filter that is defined in the alert management rule, for example, <kbd class="ph userinput">Alert0027931</kbd> |
   | executionId | The ID of the execution to be retrieved, for example, <kbd class="ph userinput">000182ebdb66630091187f1daf9619d4</kbd> |
   | userName | The current user's name, for example, <kbd class="ph userinput">admin</kbd>. |
   | userDisplayName | The name that the current user specified to be displayed, for example, <kbd class="ph userinput">System Administrator</kbd>. |
   [Table 1. Create Incident input parameters]

   {#create-custom-create-incident-subflow__table_i32_ssg_lgb}
   For example, in an alert management rule that has processed alerts, in the Alert Executions area, click the Link to execution of the required alert.

   The Flow Designer opens. Click Subflow Inputs and Outputs. The input variable names of the subflow are displayed with their respective values.

4. In the subflow header, click more actions ![More actions]() and select Copy subflow.
5. In the New Subflow Name field, enter the name of the new subflow.
6. To limit the application scope of the subflow, in the Application field, select the required application, otherwise select <kbd class="ph userinput">Global</kbd>.
7. Click Copy.  
   The new subflow is created and is opened as a tab in the subflow designer editor. The inputs provided by the template appear.

   Inputs are fixed and cannot be added to.

   In the editor, you can delete subflow inputs or outputs, as required.
8. To delete an input, click ![Delete input icon]().  
   Inputs are fixed and cannot be added to.
9. Create subflow outputs by defining the names and data types.
   1. Click ![Add new input icon]() to add output.
   2. Define the name and the data type.
   {#create-custom-create-incident-subflow__substeps_xfs_mm1_cgb}
10. To save the subflow in draft status, click Save.
11. To save and publish the subflow so that it can be used in the alert management rule designer, click Publish.
{#create-custom-create-incident-subflow__steps_srf_qjz_dgb}

## Result

Include the modified subflow in an alert management rule to resolve alerts according to your customized requirements.
**Related topics**   

* [Subflows](https://www.servicenow.com/docs/access?context=subflows&version=yokohama&pubname=yokohama-build-workflows&ft:locale=en-US)

*[\>]: and then


