<h2>Flow Designer trigger types</h2><br/><div style="overflow-x:auto"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta content="text/html; charset=UTF-8" /><meta name="copyright" content="(C) Copyright 2025" /><meta name="DC.rights.owner" content="(C) Copyright 2025" /><meta name="generator" content="DITA-OT" /><meta name="DC.type" content="reference" /><meta name="DC.title" content="Flow Designer trigger types" /><meta name="abstract" content="Each trigger type defines when a flow starts and the starting data available to it. There are triggers for record operations, dates, and application operations." /><meta name="description" content="Each trigger type defines when a flow starts and the starting data available to it. There are triggers for record operations, dates, and application operations." /><meta name="DC.relation" scheme="URI" content="../../../administer/flow-designer/reference/flow-designer-reference.html" /><meta name="DC.relation" scheme="URI" content="../../../administer/build-workflows/concept/build-workflows.html" /><meta name="DC.relation" scheme="URI" content="../../../administer/flow-designer/concept/flow-designer.html" /><meta name="DC.creator" content="ServiceNow" /><meta name="DC.date.created" content="2023-08-03" /><meta name="DC.date.modified" content="2024-05-21" /><meta name="page-type" content="automation-engine" /><meta name="page-type" content="platform" /><meta name="mini-toc" content="yes" /><meta name="DC.format" content="XHTML" /><meta name="DC.identifier" content="flow-triggers" /><link rel="stylesheet" type="text/css" href="../../../CSS/commonltr.css" /><title>Flow Designer trigger types</title></head><body id="flow-triggers"> <div class="breadcrumb"><a class="link" href="../../../administer/build-workflows/concept/build-workflows.html" title="Transform manual tasks and mundane work into digital workflows. Modernize legacy processes with hyperautomation. Enable citizen automation from one platform.">Build workflows</a> > <a class="link" href="../../../administer/flow-designer/concept/flow-designer.html" title="Flow Designer is a Now Platform feature that enables process owners to automate work. Build multi-step flows from reusable components without having to code.">Flow Designer</a> > </div> <h1 class="title topictitle1" id="ariaid-title1"><span class="ph">Flow Designer</span> trigger types</h1> <div class="body refbody"><p class="shortdesc"><span class="ph">Each trigger type defines when a flow starts and the starting data available to it. There are triggers for record operations, dates, and application operations.</span></p> <div class="section" id="flow-triggers__section_g4f_h1q_jdb"><h2 class="title sectiontitle">Record triggers</h2> <p class="p"><span class="ph">Use record triggers to start a flow when a record is created or updated.</span></p> <div class="p"> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="flow-triggers__table_rvf_njy_mbb" class="table" frame="border" border="1" rules="all"><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry nocellnorowborder" style="vertical-align:top;" id="d82005e69">Trigger</th><th class="entry cell-norowborder" style="vertical-align:top;" id="d82005e72">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry nocellnorowborder" style="vertical-align:top;" headers="d82005e69 ">Created</td><td class="entry cell-norowborder" style="vertical-align:top;" headers="d82005e72 ">Starts a flow when a record is created in a specific table.</td></tr><tr class="row"><td class="entry nocellnorowborder" style="vertical-align:top;" headers="d82005e69 ">Updated</td><td class="entry cell-norowborder" style="vertical-align:top;" headers="d82005e72 ">Starts a flow when a record is updated in a specific table. Requires selecting when to run the flow.<div class="p"><ul class="ul" id="flow-triggers__ul_ys1_ggn_yfb"><li class="li"> <span class="ph uicontrol">For each unique change</span>: Triggers the flow for every unique update to a non-<a class="xref" href="../build/applications/reference/r_GlobalDefaultFields.dita/r_GlobalDefaultFields.html" target="_blank" rel="noopener noreferrer">system field</a> even if the flow is currently running.<div class="p"> <div class="note"><span class="notetitle">Note:</span> The system stores a history of every change to a record and determines whether the change is unique. For example, if an incident record's <span class="ph uicontrol">State</span> field changes from In Progress to On Hold, the flow can run. However, if the <span class="ph uicontrol">State</span> field then changes back to In Progress, the flow can't run.</div> </div> <div class="p"> <div class="note"><span class="notetitle">Note:</span> Flows that have a record trigger that runs <span class="ph uicontrol">For each unique change</span> can produce recursions when run in a non-interactive session. When this type of flow makes a change to the trigger record, the change meets the flow trigger conditions and causes a recursion.</div> </div> </li><li class="li"> <span class="ph uicontrol">Once</span>: Triggers the flow once for the life of the record.</li><li class="li"><span class="ph uicontrol">Only if not currently running</span>: Triggers the flow for every unique record change if the flow is not currently running on this record. This behavior is the same as the <span class="ph uicontrol">Always</span> option in previous releases.</li><li class="li"><span class="ph uicontrol">For every update</span>: Triggers the flow every time that the record is updated, regardless of whether there has already been or currently are any running contexts for the flow.</li></ul> </div> </td></tr><tr class="row"><td class="entry row-nocellborder" style="vertical-align:top;" headers="d82005e69 ">Created or Updated</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e72 ">Starts a flow when a record is either created or updated in a specific table. Requires selecting when to run the flow.<div class="p"><ul class="ul" id="flow-triggers__ul_hpm_ggn_yfb"><li class="li"> <span class="ph uicontrol">For each unique change</span>: Triggers the flow for every unique update to a non-<a class="xref" href="../build/applications/reference/r_GlobalDefaultFields.dita/r_GlobalDefaultFields.html" target="_blank" rel="noopener noreferrer">system field</a> even if the flow is currently running.<div class="p"> <div class="note"><span class="notetitle">Note:</span> The system stores a history of every change to a record and determines whether the change is unique. For example, if an incident record's <span class="ph uicontrol">State</span> field changes from In Progress to On Hold, the flow can run. However, if the <span class="ph uicontrol">State</span> field then changes back to In Progress, the flow can't run.</div> </div> <div class="p"> <div class="note"><span class="notetitle">Note:</span> Flows that have a record trigger that runs <span class="ph uicontrol">For each unique change</span> can produce recursions when run in a non-interactive session. When this type of flow makes a change to the trigger record, the change meets the flow trigger conditions and causes a recursion.</div> </div> </li><li class="li"> <span class="ph uicontrol">Once</span>: Triggers the flow once for the life of the record.</li><li class="li"><span class="ph uicontrol">Only if not currently running</span>: Triggers the flow for every unique record change if the flow is not currently running on this record. This behavior is the same as the <span class="ph uicontrol">Always</span> option in previous releases.</li><li class="li"><span class="ph uicontrol">For every update</span>: Triggers the flow every time that the record is updated, regardless of whether there has already been or currently are any running contexts for the flow.</li></ul> </div> </td></tr></tbody></table> </div> <div class="note"><span class="notetitle">Note:</span> Flows including approval actions should only run the trigger once.</div> </div> </div> <div class="section" id="flow-triggers__section_nkv_vmz_jnb"><h2 class="title sectiontitle">REST triggers</h2> <p class="p">Use REST triggers to start a flow after a specific REST API request.</p> <div class="p"><div class="note"><span class="notetitle">Note:</span> This feature requires an <span class="ph">Integration Hub</span> Enterprise subscription. For more information, see <a class="xref" href="../administer/flow-designer/concept/request-ih-overview.dita/request-ih-overview.html" target="_blank" rel="noopener noreferrer">Request Integration Hub</a>.</div> </div> <div class="p"> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="flow-triggers__table_eyn_bnz_jnb" class="table" frame="border" border="1" rules="all"><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry nocellnorowborder" style="vertical-align:top;" id="d82005e251">Trigger</th><th class="entry cell-norowborder" style="vertical-align:top;" id="d82005e254">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry row-nocellborder" style="vertical-align:top;" headers="d82005e251 ">REST API - Asynchronous</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e254 "><span class="ph">Start a flow from an inbound API call or webhook from an external system. Configure the trigger start conditions without having to write or maintain custom code.</span> For more information, see <a class="xref" href="../administer/integrationhub/concept/rest-trigger.dita/rest-trigger.html" target="_blank" rel="noopener noreferrer">REST API trigger</a>.</td></tr></tbody></table> </div> </div> </div> <div class="section" id="flow-triggers__section_fzl_h1q_jdb"><h2 class="title sectiontitle">Scheduled triggers</h2> <div class="p"><span class="ph">Use scheduled triggers to start a flow after a specific date and time or repeatedly at scheduled intervals. Scheduled triggers use the instance timezone to determine when to start a flow.</span> <div class="note"><span class="notetitle">Note:</span> Because flows are processed asynchronously, a flow with a scheduled trigger may not run at the exact scheduled time its trigger conditions were met. For example, if a scheduled flow is triggered during core business hours, the system may have to process other events in the queue before it can run the scheduled flow.</div> </div> <div class="p"> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="flow-triggers__table_tkk_5jy_mbb" class="table" frame="border" border="1" rules="all"><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry nocellnorowborder" style="vertical-align:top;" id="d82005e305">Trigger</th><th class="entry cell-norowborder" style="vertical-align:top;" id="d82005e308">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry nocellnorowborder" style="vertical-align:top;" headers="d82005e305 ">Daily</td><td class="entry cell-norowborder" style="vertical-align:top;" headers="d82005e308 ">Starts a flow at a specific time every day.</td></tr><tr class="row"><td class="entry nocellnorowborder" style="vertical-align:top;" headers="d82005e305 ">Weekly</td><td class="entry cell-norowborder" style="vertical-align:top;" headers="d82005e308 ">Starts a flow at a specific time every week.</td></tr><tr class="row"><td class="entry nocellnorowborder" style="vertical-align:top;" headers="d82005e305 ">Monthly</td><td class="entry cell-norowborder" style="vertical-align:top;" headers="d82005e308 ">Starts a flow at a specific time every month.</td></tr><tr class="row"><td class="entry nocellnorowborder" style="vertical-align:top;" headers="d82005e305 ">Run Once</td><td class="entry cell-norowborder" style="vertical-align:top;" headers="d82005e308 ">Starts a flow once at a specific time but does not repeat. If you select a past date or time, the system schedules the flow to run as soon as possible.</td></tr><tr class="row"><td class="entry row-nocellborder" style="vertical-align:top;" headers="d82005e305 ">Repeat</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e308 ">Starts a flow at regular intervals you define.</td></tr></tbody></table> </div> </div> </div> <div class="section" id="flow-triggers__section_hqr_h1q_jdb"><h2 class="title sectiontitle">Application triggers</h2> <p class="p"><span class="ph">Use application triggers to start a flow when application-specific conditions are met.</span></p> <div class="p"> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="flow-triggers__table_gfx_xvl_ycb" class="table" frame="border" border="1" rules="all"><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry nocellnorowborder" style="vertical-align:top;" id="d82005e386">Trigger</th><th class="entry cell-norowborder" style="vertical-align:top;" id="d82005e389">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry nocellnorowborder" style="vertical-align:top;" headers="d82005e386 "><span class="ph">MetricBase</span></td><td class="entry cell-norowborder" style="vertical-align:top;" headers="d82005e389 ">Starts a flow when a <span class="ph">MetricBase</span> trigger is met. Requires the <span class="ph">MetricBase</span> application. For more information, see <a class="xref" href="../task/create-mb-flow.html" title="Start a flow when a MetricBase trigger is met. MetricBase triggers track time series data and can monitor when a threshold is reached, when a trend is detected, or when a system stops reporting data.">Create a flow with a MetricBase trigger</a>.</td></tr><tr class="row"><td class="entry nocellnorowborder" style="vertical-align:top;" headers="d82005e386 "><span class="ph">Service Catalog</span></td><td class="entry cell-norowborder" style="vertical-align:top;" headers="d82005e389 ">Starts a flow from a <span class="ph">Service Catalog</span> item request. For more information, see <a class="xref" href="../task/create-sc-flow.html" title="Start a flow when a Service Catalog item is requested to automate the fulfillment process.">Create a flow with a Service Catalog trigger</a>.<div class="note"><span class="notetitle">Note:</span> <span class="ph"> <span class="ph">Service Catalog</span> triggers do not support catalog variables as part of the trigger condition. Instead, get or create catalog variables in the main body of the flow.</span></div> </td></tr><tr class="row"><td class="entry nocellnorowborder" style="vertical-align:top;" headers="d82005e386 ">SLA Task</td><td class="entry cell-norowborder" style="vertical-align:top;" headers="d82005e389 ">Starts a flow from an SLA Definition record. For more information, see <a class="xref" href="../task/create-sla-task-flow.html" title="Configure your Service Level Agreement (SLA) definition to run a flow as the action plan.">Create a flow with an SLA Task trigger</a>.</td></tr><tr class="row"><td class="entry row-nocellborder" style="vertical-align:top;" headers="d82005e386 ">Kafka Message</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e389 ">Starts a flow when there's a message in a topic in your Kafka environment. For more information, see <a class="xref" href="../task/create-flow-kafka.html" title="Build a flow that processes events from a Kafka stream. Start the flow when an event is available in the specified topic.">Create a flow with a Kafka Message trigger</a>.</td></tr></tbody></table> </div> </div> </div> <div class="section" id="flow-triggers__section_u4l_hfm_fhb"><h2 class="title sectiontitle">Inbound email triggers</h2> <p class="p"><span class="ph">Start a flow when your instance receives an email.</span></p> <p class="p"><span class="ph">Inbound email flows take priority over inbound email actions. If you create flows with inbound email triggers, emails are first processed by the inbound email triggers before they are processed by inbound email actions.</span></p> <p class="p">With inbound email actions, you don't have full control over email attachment handling or assigning the target record of an email. When you create a flow with an inbound email trigger, you can perform these actions with the <a class="xref" href="move-email-attachments-action.html" title="Move attachments from an email to a record so that the files are available to your users when they view the record.">Move Email Attachments to Record action</a> and the <a class="xref" href="associate-to-email-action.html" title="Associate a record with an Email [sys_email] record so that you can track which record is affected by the email.">Associate Record to Email action</a>. For greater control over email attachments, you can also use the <a class="xref" href="lookup-email-attachment.html" title="Look up files that are attached to an email so that you can perform an action on the files.">Look up email attachments action</a> to access a specific attachment as a data pill.</p> <p class="p">Although you can process an inbound email with multiple inbound email actions, you can't process an inbound email with multiple flows by default. Additional configuration is required. For information on how to stop processing in inbound email actions, see <a class="xref" href="../administer/notification/reference/r_OrderedEmailProcessingPlugin.dita/r_OrderedEmailProcessingPlugin.html" target="_blank" rel="noopener noreferrer">Specifying the inbound email processing order</a>.</p> <p class="p">For more information on running multiple flows on an inbound email, see <a class="xref" href="../../notification/task/deactivate-stop-processing.html" title="Configure Flow Designer to allow an inbound email to be processed by multiple inbound email triggers in a specific order.">Allow multiple triggers to process an inbound email</a>.</p> <p class="p">The following diagram shows how inbound emails are processed by inbound email triggers. After the email has been classified as a reply, forward, or new email, the system tries to match the email to an active inbound email trigger. If the email meets the conditions of an inbound email trigger, the flow runs. If the flow issues stop processing, the email is finished being processed. If the flow does not issue stop processing, the system evaluates the conditions of more inbound email triggers. If there are no more inbound email triggers to evaluate, the system tries to match the email with an active inbound email action instead.</p> <div class="p"><div class="fig fignone" id="flow-triggers__fig_smj_rqb_xhb"><span class="figcap"><span class="fig--title-label">Figure 1. </span>Processing emails with inbound email triggers</span> <img class="image" id="flow-triggers__image_ust_sqb_xhb" src="../../notification/image/inbound-flow-processing.png" alt="Processing emails in the Inbound Email trigger" /> </div> </div> <div class="p"><div class="note important"><span class="importanttitle">Important:</span> <span class="ph">Inbound email flows use the email sender as the user who initiates the session. If the system doesn't recognize the sender, the inbound email flow runs as the Guest user. Setting the inbound email flow to run as the user who initiates the session ensures that the flow actions are limited by user access controls. If the initiating user needs elevated privileges for some reason, have the inbound email flow call a subflow that runs with the required roles.</span> <span class="ph">To test access controls for an inbound email flow, impersonate a typical inbound email user and manually trigger the flow.</span></div> </div> </div> <div class="section" id="flow-triggers__section_g3j_q3b_sxb"><h2 class="title sectiontitle">Spoke triggers</h2> <div class="p">Spokes can have conditional and event-driven external triggers or webhooks that start from third-party applications. The webhooks act as the triggers that provide the data to a flow. For example, when you create a P1-level issue in a third-party issue-tracking application, it updates the incident database record in the <span class="ph">ServiceNow</span> instance. To implement this flow, follow these steps: <ol class="ol" id="flow-triggers__ol_t1y_rj3_5xb"><li class="li"><a class="xref" href="../administer/integrationhub/tasks/set-up-flow-ihub.dita/set-up-flow-ihub.html" target="_blank" rel="noopener noreferrer">Set up a flow</a></li><li class="li"><a class="xref" href="../administer/integrationhub/tasks/set-up-external-webhook-endpoints.dita/set-up-external-webhook-endpoints.html" target="_blank" rel="noopener noreferrer">Set up external trigger endpoints</a>.</li></ol> </div> </div> <div class="section" id="flow-triggers__section_ztn_nlc_mfb"><h2 class="title sectiontitle">Advanced options</h2> <div class="p">Specify the user session requirements needed to start a flow with <span class="ph uicontrol">Advanced Options</span>.<dl class="dl"> <dt class="dt dlterm">When to run the flow</dt> <dd class="dd"><p class="p">Determine the type of session that can trigger the flow, whether to run the flow when triggered by certain users, and which tables can trigger the flow.</p> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="flow-triggers__table_crj_cmc_mfb" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 1. </span>Interactive session options</span></caption><colgroup><col style="width:50%" /><col style="width:50%" /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d82005e644">Option</th><th class="entry cellrowborder" style="vertical-align:top;" id="d82005e647">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e644 ">Only Run for Non-Interactive Session</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e647 ">Flow that is only triggered in non-interactive sessions. See <a class="xref" href="../administer/users-and-groups/concept/c_NonInteractiveSessions.dita/c_NonInteractiveSessions.html" target="_blank" rel="noopener noreferrer">Non-interactive sessions</a>.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e644 ">Only Run for User Interactive Session</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e647 ">Flow that is only triggered in interactive sessions.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e644 ">Run for Both Interactive and Non-Interactive Sessions</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e647 ">Flow that is triggered in all sessions.</td></tr></tbody></table> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="flow-triggers__table_zxz_mmc_mfb" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 2. </span>User options</span></caption><colgroup><col style="width:50%" /><col style="width:50%" /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d82005e703">Option</th><th class="entry cellrowborder" style="vertical-align:top;" id="d82005e706">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e703 ">Do not run if triggered by the following users</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e706 ">Flow that does not trigger for a selected list of users. Click the Add User icon (<img class="image" id="flow-triggers__image_j3k_3nc_mfb" src="../images/icon-select-users.png" alt="Add User Icon" />) to add users to the list.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e703 ">Only run if triggered by the following users</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e706 ">Flow that triggers only for a selected list of users. Click the Add User icon (<img class="image" id="flow-triggers__image_q4k_jnc_mfb" src="../images/icon-select-users.png" alt="Add User Icon" />) to add users to the list.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e703 ">Run for any user</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e706 ">Flow that runs for any user.</td></tr></tbody></table> </div> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="flow-triggers__table_afh_xyk_qkb" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 3. </span>Table options</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d82005e770">Option</th><th class="entry cellrowborder" style="vertical-align:top;" id="d82005e773">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e770 ">Run only on current table</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e773 ">Flow that is only triggered for the selected table.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e770 ">Run on current and extended tables</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e773 ">Flow that is triggered for the selected table and any extended tables.</td></tr></tbody></table> </div> </dd> <dt class="dt dlterm">Where to run the flow</dt> <dd class="dd"><p class="p">Determine whether to run the flow in the background or in the current session.</p> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="flow-triggers__table_qhf_fh1_phb" class="table" frame="border" border="1" rules="all"><colgroup><col style="width:36.63003663003663%" /><col style="width:63.369963369963365%" /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d82005e823">Option</th><th class="entry cellrowborder" style="vertical-align:top;" id="d82005e826">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e823 ">Run flow in background (default)</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e826 ">Flow that runs asynchronously in the background. Use this option for flows that do not require immediate updates and to allow other system processes to run at the same time.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e823 ">Run flow in foreground</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e826 ">Flow that runs synchronously in the current session. Use this option to provide immediate updates to an end user. For example, if a flow opens a task after the previous task closes, use this option to open the next task immediately after a user closes one.<div class="note"><span class="notetitle">Note:</span> Running a flow in foreground may block the current session thread and prevent user input until the flow finishes. Avoid running flows in the foreground when they contain actions that cannot be interrupted, such as actions that run script. Actions or flow logic that pause a flow will not block a session.</div> </td></tr></tbody></table> </div> </dd> </dl> </div> </div> <div class="section" id="flow-triggers__section_plc_wqb_2jb"><h2 class="title sectiontitle">Data pills available by trigger type</h2> <p class="p">Flow designers have access to data pills from the trigger.</p> <div class="p"> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="flow-triggers__table_n55_2rb_2jb" class="table" frame="border" border="1" rules="all"><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d82005e880">Trigger Type</th><th class="entry cellrowborder" style="vertical-align:top;" id="d82005e883">Data pills available</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e880 ">Record</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e883 "><dl class="dl"> <dt class="dt dlterm">[Table Label] Record</dt> <dd class="dd">An object containing the triggering record.</dd> <dt class="dt dlterm">Changed Fields</dt> <dd class="dd">An array of objects containing the field values that changed. This data pill is only available for the <span class="ph uicontrol">Updated</span> or <span class="ph uicontrol">Created or Updated</span> trigger types.<div class="note"><span class="notetitle">Note:</span> To process the <span class="ph uicontrol">Changed Fields</span> array data pill, you will need to use <a class="xref" href="../concept/flow-logic-for-each.html" title="Apply one or more actions to each record in a list of records.">For Each flow logic</a>. For more information on working with array data pills, see <a class="xref" href="../concept/complex-data.html" title="Use a graphical interface to work with collections of complex structured data. Help design users understand the organization of structured data, and add, remove, or configure its individual elements.">Complex data</a>.</div> </dd> <dt class="dt dlterm">[Table Label] Table</dt> <dd class="dd">The Sys ID of the table containing the trigger record.</dd> <dt class="dt dlterm">Run Start Date/Time</dt> <dd class="dd">Date/Time object that stores when the flow started in the system's local timezone. Use this data pill to pass a Date/Time value to other actions and steps such as the Create record action or the Update record action.</dd> <dt class="dt dlterm">Run Start Time UTC</dt> <dd class="dd">Date/Time string that stores when the flow started in Coordinated Universal Time (UTC). Use this data pill to pass data to legacy flows that expect UTC date-time strings.</dd> </dl> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e880 ">REST API - Asynchronous</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e883 "><dl class="dl"> <dt class="dt dlterm">Path Parameters</dt> <dd class="dd">An object containing path parameters in the inbound request.</dd> <dt class="dt dlterm">Query Parameters</dt> <dd class="dd">An object containing query parameters in the inbound request.</dd> <dt class="dt dlterm">Request Headers</dt> <dd class="dd">An object containing headers in the inbound request.</dd> <dt class="dt dlterm">Request Body</dt> <dd class="dd">Complex data object that defines the body structure of the inbound request. For more information on complex objects, see <a class="xref" href="../concept/complex-data.html" title="Use a graphical interface to work with collections of complex structured data. Help design users understand the organization of structured data, and add, remove, or configure its individual elements.">Complex data</a>.</dd> </dl> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e880 ">Date</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e883 "><dl class="dl"> <dt class="dt dlterm">Run Start Date/Time</dt> <dd class="dd">Date/Time object that stores when the flow started in the system's local timezone. Use this data pill to pass a Date/Time value to other actions and steps such as the Create record action or the Update record action.</dd> <dt class="dt dlterm">Run Start Time UTC</dt> <dd class="dd">Date/Time string that stores when the flow started in Coordinated Universal Time (UTC). Use this data pill to pass data to legacy flows that expect UTC date-time strings.</dd> </dl> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e880 ">SLA Task</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e883 "><dl class="dl"> <dt class="dt dlterm">Task SLA Record</dt> <dd class="dd">An object containing the triggering Task SLA record.</dd> <dt class="dt dlterm">sla_flow_inputs</dt> <dd class="dd">An Object containing Task SLA Definition values.</dd> </dl> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e880 ">Inbound Email</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e883 "><dl class="dl"> <dt class="dt dlterm">Email Record</dt> <dd class="dd">An object containing the triggering Email record.</dd> <dt class="dt dlterm">[Table Label] Table</dt> <dd class="dd">The Sys ID of the table associated with the target email.</dd> <dt class="dt dlterm">Body Text</dt> <dd class="dd">A String containing the body of the email message.</dd> <dt class="dt dlterm">Subject</dt> <dd class="dd">A String containing the subject of the email message.</dd> <dt class="dt dlterm">User Record</dt> <dd class="dd">An object containing the user who sent the triggering email. If the sender does not have an associated User record, the data pill lists the object for the Guest user.</dd> <dt class="dt dlterm">From address</dt> <dd class="dd">A String containing the sender email address.</dd> </dl> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e880 ">Metric Base</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e883 "><dl class="dl"> <dt class="dt dlterm">MetricBase Trigger Definition Record</dt> <dd class="dd">An object containing the triggering MetricBase Trigger Definition Record.</dd> <dt class="dt dlterm">Level</dt> <dd class="dd">The Integer value of the MetricBase trigger level.</dd> <dt class="dt dlterm">Time of Metric Event</dt> <dd class="dd">The Date/Time value of when the metric event occurred.</dd> <dt class="dt dlterm">Record</dt> <dd class="dd">An object containing the record for which metric events have been collected.</dd> </dl> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e880 ">Service Catalog</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e883 "><dl class="dl"> <dt class="dt dlterm">Requested Item Record</dt> <dd class="dd">An object containing the triggering Requested Item record.</dd> <dt class="dt dlterm">Run Start Date/Time</dt> <dd class="dd">Date/Time object that stores when the flow started in the system's local timezone. Use this data pill to pass a Date/Time value to other actions and steps such as the Create record action or the Update record action.</dd> <dt class="dt dlterm">Run Start Time UTC</dt> <dd class="dd">Date/Time string that stores when the flow started in Coordinated Universal Time (UTC). Use this data pill to pass data to legacy flows that expect UTC date-time strings.</dd> <dt class="dt dlterm">Table Name</dt> <dd class="dd">The table name containing the requested catalog item.</dd> </dl> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e880 ">Kafka Message</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d82005e883 "><dl class="dl"> <dt class="dt dlterm">Messages</dt> <dd class="dd">An array of objects containing the messages received from the Kafka topic. Each message has the following data pills.<ul class="ul" id="flow-triggers__ul_rzm_tqd_gvb"><li class="li">Headers: An array of headers, with each header containing a Key and a Value. The Key-Value pair provides additional information about the message. Both the Key and the Value are strings.</li><li class="li">Payload: A string containing the text of the message.</li><li class="li">Key: A sting identifying the insertion order for the message. Messages with the same key are processed in order.</li></ul> </dd> </dl> </td></tr></tbody></table> </div> </div> </div> <div class="section" id="flow-triggers__id_ic5_rrb_ptb"><h2 class="title sectiontitle">General guidelines</h2> <p class="p">Follow these general guidelines when creating record triggers.</p> <dl class="dl" id="flow-triggers__ul_rnz_svm_xsb"> <dt class="dt dlterm">Determine whether your flow needs a trigger or variable input</dt> <dd class="dd">Flows always run when their trigger conditions are met. Triggers always provide the same data as input for flows. If you need variable input to initiate a flow instead, create a <a class="xref" href="flow-triggers.html#flow-triggers__subflows-design-considerations">subflow</a>.</dd> <dt class="dt dlterm">Add conditions to specify what record values start your flow</dt> <dd class="dd">Starting a flow only when needed consumes fewer system resources than starting a flow, pausing it, and waiting to resume the flow until a specific record condition applies. Instead of creating a flow that starts with a Wait for condition action, redesign the flow to include the wait condition as part of the record trigger.</dd> <dt class="dt dlterm">Create unique conditions for record triggers on the same table</dt> <dd class="dd">To prevent flows from overwriting each other, create unique conditions for each flow running on the same table. If multiple flows on the same table have the same filter conditions, there is no way to know the order in which the flows run. Using conditions also helps to optimize flow performance by returning a more precise, smaller set of records.</dd> <dt class="dt dlterm">Ignore records added or updated by import and update sets</dt> <dd class="dd">Record triggers ignore records added or updated by applying an update set or importing an XML file. These operations apply to the entire application or table rather than an individual record.</dd> <dt class="dt dlterm">Replace record triggers on Service Catalog tables with Service Catalog application triggers</dt> <dd class="dd">Flow Designer no longer displays Service Catalog tables as options for record triggers. Instead, create flows that use the Service Catalog application trigger type.</dd> <dt class="dt dlterm">Verify that the users who trigger a flow have access to trigger condition data</dt> <dd class="dd">Since flows typically run as the user who triggers them, verify that users have access to all of the data specified in the trigger conditions. Avoid creating trigger conditions to related tables that typical users don't have access to. If your flow trigger conditions require access to role-restricted data, run your flows with the role needed to access that data.</dd> </dl> </div> </div> <div class="related-links"> <div class="familylinks"> <div class="parentlink"><strong>Parent Topic:</strong> <a class="link" href="../../../administer/flow-designer/reference/flow-designer-reference.html" title="Get details about Flow Designer components like actions, flow logic, and properties.">Flow Designer reference</a></div> </div> </div></body></html></div>