Triggering a flow with a script
You can trigger a flow, subflow or action via script. This is handy in situations where you can not create conditions on the flow that would properly trigger the flow OR when you need to restart a flow (such as a closed or cancelled catalog item).
API | Purpose |
---|---|
sn_flow_trigger.FlowTriggerAPI.fireCatalogTrigger('internal_flow_name', record); | Triggers a catalog flow (useful when reopening a catalog item) |
Additional known flow APIs can be found here: ServiceNow Docs - FlowAPI