---
sourceDocument: Xanadu ServiceNow AI Platform Capabilities
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/servicenow-platform

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu ServiceNow AI Platform Capabilities

ft:clusterId :

    - platcap

bundleId :

    - platcap

workflow :

    - Platform


---

# Triggering flows using MetricBase data

# Triggering flows using MetricBase data {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

Time-series data that is stored in the MetricBase database can trigger Workflow Studio flows. These
triggers can log incidents, send emails, and create other alerts.

A trigger definition is a set of conditions that automatically executes a Workflow Studio flow. When you create a trigger definition in MetricBase and associate it with a flow, the trigger definition transfers
from your instance to the MetricBase server. After you activate the
trigger and flow, MetricBase monitors time-series data in the MetricBase database. When time-series data matches the initial triggering
condition, and then transitions from one condition to the next, a transition trigger is
generated and added to the queue. The instance polls the queue, processes the transition
trigger, and then executes the Workflow Studio flow.  
Figure 1. Trigger workflow

For more information about time-series policies, see [Create a time-series definition in MetricBase](https://servicenow-prod.fluidtopics.net/BDwUdEn6NvW9PSYx4sh2Pg "Specify the metric that you want to store, how often to collect it, and how long to store it in MetricBase.").

## High-level overview of implementing triggers {#metricbase-triggers__section_yxs_bdq_23b}

1. Define one or more triggers on an instance.

   Band trigger
   :   Triggers when a metric value falls within a range of values.

   Linear predictor trigger
   :   Triggers when a series of values trend toward and are expected to reach a specified value.

   Gap trigger
   :   Triggers when values are not received for a specified period.

   Model trigger
   :   Triggers when a trained model detects anomalous behavior.
2. Create a trigger condition to add additional requirements for a trigger to execute a flow.For example, data often fluctuates over time. Small fluctuations can cause unwanted, duplicate triggering
   events. A Condition Script can prevent that erroneous duplication.

3. Associate the trigger with the flow it executes using Workflow Studio.
4. Test the trigger and workflow.
5. Activate the trigger.
{#metricbase-triggers__ol_frt_ypv_ngb}

## Deleting triggers {#metricbase-triggers__section_zhp_mpw_zhb}

If a trigger is associated with a flow, you can't delete it in MetricBase. To delete a trigger, you must first delete the flow in
Workflow Studio and then you can delete the trigger in MetricBase.

## Legacy triggers {#metricbase-triggers__section_ijj_tnm_ddb}

Legacy triggers are deprecated. You can't create legacy triggers; you can only carry
forward legacy triggers that exist.

