Triggers for cloud policies
Summarize
Summary of Triggers for cloud policies
Triggers in ServiceNow cloud policies are events that initiate the policy engine to evaluate conditions and execute actions. These triggers are tied to user requests and lifecycle operations such as start, stop, provision, or deprovision on cloud blueprints, catalog items, resources, or stacks. Understanding and configuring triggers enables you to automate control, approval, and customization of cloud resource management efficiently.
Show less
Note that blueprints are deprecated; triggers described here apply to cloud template–based catalogs as well. To maintain optimal system performance, it is recommended to limit policies using broad triggers without specific targets, as these always execute.
Key Triggers and Their Practical Uses
- on Blueprint provision: Fires after catalog item request start policies; allows running scripts, overriding user-requested attributes (e.g., modifying stack names), or aborting provisioning. Useful for enforcing attribute values before final provisioning.
- Approval triggers:
- on Stack operation (approval): Runs approval workflows when operations occur on a stack.
- on Stack resource operation (approval): Runs approvals for operations on individual stack resources.
- on Task remediation: Triggers when a user resubmits a failed request.
These triggers enable specifying approvers in sequence, including managers, specific users/groups, or roles, to ensure mandatory approval workflows complement base system approvals.
- on Catalog item launch: Fires when a catalog item order form opens; allows scripts or overriding text attributes to customize the initial form display seen by users.
- on Catalog item request start/end: Fires after a user opens or submits a catalog item request form; supports running scripts or workflows for custom processes such as pre- or post-provisioning activities.
- on Lease end: Fires independently of any operation; can send notifications or initiate lifecycle operations like Start, Stop, or Deprovision when lease terms end.
- Resource operation triggers (launch, request start/end, operation): Manage lifecycle events on resources including Start, Stop, and Deprovision. These triggers allow running scripts, overriding user attributes, executing workflows, calling cloud APIs, or managing IP addresses during orchestration stages.
Practical Impact for ServiceNow Customers
By leveraging these triggers, you can automate and customize cloud resource provisioning, operation, and decommissioning processes. This automation improves governance by enforcing attribute controls, executing mandatory approvals, and integrating workflows seamlessly into cloud operations. Optimizing trigger use also helps maintain system performance by avoiding overly broad policies that fire unnecessarily.
Implementing these triggers effectively enables enhanced control over cloud resource lifecycle, improves compliance with organizational policies, and streamlines user interactions within the ServiceNow Cloud User Portal.
Triggers are events that set the policy engine in motion. For example, the on Catalog item request end trigger fires after a user submits a request form. When the trigger for a policy fires, the policy engine tests the conditions specified in the policy rule and performs the actions specified in the rule, if the conditions are met.
About triggers
- You typically refer to a policy by the name of the trigger for the policy. For example, you might refer to a policy that is triggered by the on Lease end trigger as a "Lease end policy."
- Triggers are often based on user requests and the operations (start, stop, provision, or de-provision) that can run on a blueprint, a catalog item, a resource, or a stack. Some trigger types do not specify a cloud operation. For example, the on Lease End trigger fires independently of any operation.
- To optimize performance, limit the number of policies with general triggers like the on Catalog item triggers.
- A trigger that does not specify a target (a blueprint, catalog item, stack, or resource) is always executed. To optimize performance, therefore, minimize the use of such policies.
Policy triggers
| Trigger name and actions | Description |
|---|---|
on Blueprint provision Actions:
|
The on Blueprint
provision trigger fires after execution of on Catalog item
request start policies. A policy that is triggered by the on
Blueprint provision trigger can run a script, override a user-requested
attribute value, or abort and send a message about the provision
operation.
Use this trigger to override a value that the user enters. For example, when a user chooses a value for an attribute like the stack name, a policy with this trigger can change the stack name. In addition, another action can change the name again when the user finally provisions the resource. The user does not see the final value on the catalog item form because the change is made at provision time. Create an action for an 'on Blueprint provision' policy |
Approval triggers
Actions:
|
A cloud
approval policy specifies the users who must approve a specified cloud activity
before the activity can proceed.
Approvers can include the manager of the user making a request, a specified user or
group, or users with a specified role. You can specify multiple approvers. Approvals
occur in the order that you specify.
A
policy that is triggered by one of the approval triggers can start approval
workflows.
The targeted approval policies complement the base-system approval operations. Note:
The approval process is performed after properties are set
because property values that were overridden could change
costs. on Blueprint provision (approval) is applied before the blueprint is provisioned. Because the provisioning process can alter request data (and possibly change costs), approval processes run after the blueprint is provisioned. Use on Stack operation (approval) to run an approval workflow when an operation is performed on a stack. By default, a change request is generated when an operation is performed on a stack, but it does not require an approval. This trigger can launch a mandatory approval. Use on Stack resource operation (approval) to run an approval workflow when an operation is performed on a single resource that is part of a stack. By default, a change request is generated when an operation is performed on a stack, but it does not require an approval. This trigger can launch a mandatory approval. A policy that is triggered by the on Task Remediation trigger can start approval workflows. Create an action for an 'approval' policy |
on Catalog item launch Actions:
|
The on Catalog item
launch trigger fires when an order form (stack request form) is launched
for a catalog item. A policy that is triggered by the on Catalog item
launch trigger can run a script or override a user-requested value (text
values only).
Use this trigger to control what the user sees in the form when it first opens in the Cloud User Portal. For example, you can override a default value that first appears to the user. The user can see this value on the catalog item form. When both a policy rule and a form rule overwrite a value, the value in the form rule is used. Create an action for an 'on Catalog item launch' policy |
on Catalog item request start Actions:
|
The on Catalog item request
start trigger fires after the user opens a request form.
A policy that is triggered by the on Catalog item request start or on Catalog item request end trigger can run a script or execute a workflow. You can use this trigger to run a custom script or workflow to fulfill enterprise processes like custom approval before the catalog item request is processed. Create an action for an 'on Catalog item request start/end' policy |
on Catalog item request end Actions:
|
The on Catalog item request end
trigger fires after a user submits a request form.
A policy that is triggered by the on Catalog item request start or on Catalog item request end trigger can run a script or execute a workflow. Use this trigger to launch a workflow after a catalog item request is processed. Consider this trigger a post-provisioning step. For example, you could launch a workflow to install MySQL on the provisioned resource. Create an action for an 'on Catalog item request start/end' policy |
on Lease end Actions:
|
A policy that is triggered by the on
Lease end trigger can send a notification or perform a
Start, Stop, or Deprovision
life cycle operation.
Create an action for an 'on Lease end' policy |
on Resource operation launch Actions:
|
The on Resource operation
launch trigger fires before the catalog for a resource operation is loaded
from the Cloud User Portal. A policy that
is triggered by the on Resource operation launch trigger can run a
script or can override a user-requested value (text values only).
When both a policy rule and a form rule overwrite a value, the value in the form rule is used. Create an action for an 'on Resource operation launch' policy |
on Resource operation request start Actions:
|
The on Resource operation request start trigger fires
after a user submits a resource operation request (Start,
Stop, Deprovision).
A policy that is triggered by the on Resource operation request start or on Resource operation request end trigger can run a script or override a user-requested attribute value. Create an action for an 'on Resource operation request start/end' policy |
on Resource operation request end Actions:
|
The on Resource operation request end trigger fires before completion
of a life cycle operation on a resource (Start,
Stop, Deprovision).
A policy that is triggered by the on Resource operation request start or on Resource operation request end trigger can run a script or override a user-requested attribute value. Create an action for an 'on Resource operation request start/end' policy |
on Resource operation Actions:
|
The on Resource operation
trigger fires during the Orchestration process when a user
performs a Start, Stop, or
Deprovision life cycle operation on a specific resource. A policy
that is triggered by the on Resource operation trigger can override a
user-requested attribute value, run a script, call a Cloud API, or perform an IP address
management operation.
Create an action for an 'on Resource operation' policy |