OBLYTECH Logo
OBLYTECH Logo

Create pre-provisioning operations

To create pre-provisioning operations in ServiceNow, open a template-based cloud catalog item, add an operation on the Pre Provisioning Operation tab, choose its step type, set its order, and enable it. Then map its operation attributes. These operations run before provisioning and can automate notifications, workflows, or scripts.

Check the catalog item and design access first

Pre-provisioning operations belong to catalog items based on templates. Start by identifying the item that requesters will actually order and checking its template basis.Configuring a similarly named item can produce a setup that looks complete but never runs for the request you are testing.

Creating these operations requires sn_cmp.cloud_service_designer. Keep that requirement tied to this action. Assigning Cloud Provisioning and Governance roles requires user_admin or admin; a person who manages access is not necessarily the person who designs the catalog operation.

Use a test request with a clear expected result before making the item available for broader use. Record the intended notification, workflow outcome, or script action, the inputs it needs, and the evidence that would show it ran. This gives the designer and operator a shared acceptance check.Cloud Provisioning and Governance is being prepared for future deprecation starting with the Brazil release. It is hidden and is no longer installed on new instances, but it remains supported. Confirm that the application is available on your instance before you plan this work. The steps below match the Brazil documentation; menu names and fields can differ on other releases. For context on where the feature fits, see pre- and post-provisioning operations.

Create pre-provisioning operations on the item

  1. In the Cloud Admin Portal, navigate to Design > Cloud Catalog Items.
  2. Open the template-based catalog item you intend to configure.
  3. Select the Pre Provisioning Operation tab and click New.
  4. Choose Step Type and complete the fields that appear for that type.
  5. Enter Order to position the operation in the sequence.
  6. Select Enabled for an operation you want invoked.
  7. Click Submit, then configure the operation attributes.

Choose the action before filling out the form. A notification requirement may be implemented through a selected subflow; a requirement to execute an existing instance script calls for a different selection. Decide based on the operation you have prepared rather than choosing a type because its form looks familiar.

Treat the operation record and its attribute mappings as two parts of one change. Submitting the record establishes the step, but input values still need attention. Include the mapping review in your implementation checklist so a saved operation does not get mistaken for a tested operation.

Choose the step type and its exact inputs

Step Type determines the additional fields displayed. Identify the executable component and its input contract before selecting it. The available choices connect the catalog item to different kinds of action:

  • CAPI: specify CAPI Provider, CAPI Method, and CAPI Version.
  • InstanceScript: enter the script name in Script.
  • Resource: specify Resource Interface and Interface Operation.
  • Flow: select a subflow.

For CAPI, check the provider, method, and version together. In the AWS provisioning chain, resource-block operations can call CAPI, which in turn makes provider API calls. A recognizable provider name alone does not establish that the selected method performs the intended preparation.

For Resource, review the interface and operation as a pair. The AWS walkthrough illustrates how a virtual server operation can call a host resource operation through an interface. That relationship makes the operation selection significant: the interface identifies the contract, while the operation identifies the action.

For InstanceScript, verify that the named script is the one prepared for this requirement. For Flow, confirm the selected subflow’s purpose and expected inputs. As a design recommendation, keep the step narrowly focused so a reviewer can explain what it changes before the cloud resource is provisioned.

Flow steps need more checking than the other types. The lookup lists only active flows and subflows, so an inactive subflow will not appear as a choice. Once you select it, the subflow’s input parameters appear on the Key Values related list. Check that the flowcorrelationid key is set to the generateCorrelationId call in the CMPFlowStepHandler script. The flow will not work without that correlation ID, so treat it as a required input. Flows also cannot be invoked from a resource operation step, so a subflow needs its own Flow step.

Set execution order and map operation attributes

Lower Order numbers run first. For example, if a preparation action needs to happen before a notification, give preparation the lower value. Write the intended sequence down before assigning numbers, especially when several people maintain the same catalog item.

Leave gaps between order values, such as 10, 20 and 30. A step added later can then sit between two existing steps without renumbering the rest. When two operations share an order value, their relative sequence becomes harder to predict and harder to explain to the next maintainer, so give each operation its own number.

When Order is left empty, the system supplies values in increments of 20. Explicit numbers make dependencies easier to review. Do not rely on the visual position of records as the explanation of your intended sequence; compare the stored Order values instead.

Enabled controls whether the pre-provisioning operation is invoked. Review it alongside Order when diagnosing a missing action. A record can contain the correct executable selection yet still fail the intended setup review because it is not enabled for invocation.

Record the Enabled state in your test notes alongside the order value. A run made with an operation disabled says nothing about its mapped values, so keep those two results apart when you compare them.

Parameters for these operations become operation attributes. After submitting the operation, use this sequence:

  1. Click Manage Attributes.
  2. Select PreProvision to display the pre-provisioning attributes.
  3. For an attribute, create an expression mapping in Mapping or generate variables.
  4. Click Apply Changes to save the attribute configuration and return to Cloud Catalog Items.

Review each required input against the action’s purpose. For a proposed notification subflow, for instance, identify how it will receive the request context it needs. This is a test-design example, not a prescribed parameter name. Use the actual attributes exposed by the selected operation.

Separate fixed design choices from request-dependent values in your review notes. The first tells a maintainer which action was selected; the second explains what data reaches that action. When a test behaves unexpectedly, that distinction helps isolate selection errors from mapping errors.

Validate the preparation and the provisioning chain separately

Submit a controlled request and compare the observed preparation with the acceptance check you recorded. Check the enabled state, sequence, selected executable, and mapped values before changing several settings together. Change one suspected cause at a time so the next test can establish whether it mattered.

When a subflow step fails, start with the error reporting inside the flow. Configure the step so it shows whether it produced an error, and send an error from the action whenever the step is designed to fail. A step that fails silently can look like a successful preparation, which is why the acceptance check should name the output you expect to see.

Keep pre-provisioning evidence separate from evidence that a virtual machine was created. In the AWS chain, a resource operation can reach the Compute Interface and CreateNode through CAPI. A response processor then updates CMDB information after the VM is created. Those later results answer different questions from whether the preparation action received its intended inputs.

The AWS component walkthrough requires admin. For operational investigation, sn_cmp.cloud_operator provides access to dashboards and reports including Cloud Orchestration Trail and Cloud API Trail. Give each participant access for their specific work rather than assuming the catalog designer’s role covers investigation.

When a request needs wider investigation, use the Cloud Provisioning and Governance troubleshooting guide. Keep the request context and the tested configuration together so another operator can follow the same evidence.

For help organizing this configuration, see ServiceNow implementation.

Keep surrounding configuration in its proper place

Pre-provisioning actions are one part of a larger catalog design. Cloud administrators with sn_cmp.cloud_admin configure infrastructure such as service accounts, cloud accounts, networks, and IPAM. A custom preparatory script should have an explicit purpose rather than becoming an unexplained substitute for those infrastructure settings.

Governors with sn_cmp.cloud_governor manage governance areas including policies, quotas, permissions, and tags. Day-2 capacity limits can restrict resource attributes separately for logical datacenters. Review whether a requirement belongs in those controls before introducing another catalog action.

Use cloud provisioning setup for AWS, Azure, and VMware when the unresolved work concerns the environment itself. This keeps the operation focused on what must happen before the selected item is provisioned and gives maintainers a clearer ownership boundary.