To add or edit CI relationships in tag-based discovery, use Tag-based Service Traversal Rules with the service_mapping_admin role. Activate an additional preconfigured rule or add a relationship through its Rule Definition. Set Used By to Service by Tags, check direction and order, and review existing application services after changing the configuration.
Plan how to add or edit CI relationships in tag-based discovery
Tag-based discovery can include CIs connected through preconfigured relationships even when those CIs have no tags. A missing tag therefore does not, by itself, explain why a CI appears in an application service. Start by identifying the relationship that brings the CI into the service and deciding whether that path belongs in the intended service boundary.
Separate three decisions: enabling an available relationship, defining an additional relationship, and excluding an unwanted path. Activating an existing definition avoids creating another definition for the same parent class, relationship type, and child class. Adding a definition makes sense when the required combination is absent. Exclusion addresses a path that expands the service beyond its intended scope.
Write the expected result before making changes. Identify a starting CI, the connected CI you expect to include, and an example that should remain outside the service. This gives the review a specific target. For the underlying relationship concepts, see creating and editing CMDB CI relationships.
Check the workflow on your instance and release. Starting with Service Mapping Plus version 1.16.3, tag-based mapping is also available through the Service Mapping workspace. The navigation and fields below describe the Tag-based Service Traversal Rules procedure.
Inspect defaults and additional preconfigured relationships
The Traversal Rules for Application Services [svc_traversal_rules] table holds the relationships used for this discovery process. The navigation view filters the records for tag-based discovery. Preconfigured relationships used by the base system have true in the Base System Rule column. Inspect that value before deciding how to handle a record.
The default relationship set includes these class combinations:
- Virtual Machine Instance [cmdb_ci_vm_instance] to Hardware [cmdb_ci_hardware] through Virtualizes::Virtualized by.
- Hardware [cmdb_ci_hardware] to Application [cmdb_ci_appl] through Runs::Runs on.
- Kubernetes Pod [cmdb_ci_kubernetes_pod] to Operating-system-level Virtualization Container [cmdb_ci_oslv_container] through Contains::Contained by.
Additional preconfigured combinations include Configuration Item to Logical Datacenter and Logical Datacenter to Cloud Service Account through Hosted on::Hosts. Kubernetes and OpenShift combinations are also available, including Kubernetes Pod to Kubernetes Cluster and Kubernetes Pod to Kubernetes Service. Review the exact definition rather than choosing by the class name alone.
Base rules have a protection boundary: preconfigured relationships cannot be deleted or modified directly from the traversal table. Participation is controlled with Active. Where a definition needs editing, use the Rule Definition record workflow described below. Treat the traversal record and its referenced definition as separate records during review.
Activate an available rule or add a definition
The role required to add or edit relationships for tag-based discovery is service_mapping_admin. Navigate to Service Mapping > Administration > Tag-based Service Traversal Rules. Open an existing relationship to work with it, or select New to introduce an additional relationship.
- In the Traversal Rules for Application Services form, work with Rule Definition. Use Lookup using list to inspect the available CI Relationship Type Rule Definitions.
- If the required combination already exists, select that definition. Verify both CI classes and the relationship type before continuing.
- If the combination is missing, select New in the CI Relationship Type Rule Definitions window.
- Choose the parent CI class in Parent Type, enter and select the required Relationship Type, and choose the destination class in Child Type.
- Select Submit for the definition, then complete the Traversal Rules for Application Services record and select Submit.
For an additional preconfigured rule that is already present, inspect its definition and select Active to make it participate. Do not create a substitute simply because the existing record is inactive. Keep a note of whether the change enabled a supplied combination or introduced a new one; that distinction helps later reviews.
A concrete definition is Linux Server [cmdb_ci_linux_server], Contains::Contained by, Storage Device [cmdb_ci_storage_device]. It expresses a class pair and a relationship type. Compare it with the relationship represented by the CIs you intend to traverse. The CMDB relationship table guide provides context for reviewing the underlying relationship data.
Edit through Rule Definition and set traversal direction
For the referenced definition workflow, select the preconfigured relationship in the Parent Type column. Select Preview this record, then Open Record. Adjust Parent Type, Relationship Type, or Child Type as required and select Update. This route opens the definition record rather than attempting to rewrite the protected base traversal record directly.
Review direction separately from the class combination. The Is reverse check box makes traversal start at the child CI. With the Linux Server and Storage Device example, selecting it starts from storage devices and follows the relationship toward the Linux servers that host those devices.
Sketch the intended movement as a short sentence: start from this CI class, follow this relationship, and reach that CI class. Compare the sentence with Parent Type, Child Type, and Is reverse together. A definition can name the right classes while still expressing the wrong starting point for the service you are building.
Use a CMDB relationships diagram when reviewing direction with a service owner. The review should establish which connected infrastructure belongs in the application service before additional rules widen its boundary.
Set participation, sequence, and the active rule limit
Set Used By to Service by Tags. Do not select Service Recomputation for this configuration. That selection helps prevent adding or editing these traversal rules and produces an error message. Check this field before investigating more complicated explanations for a rejected change.
Select Active when the traversal rule should participate. To exclude a preconfigured relationship, use the service_mapping_admin role, open it from Tag-based Service Traversal Rules, clear Active, and select Submit. Exclusion changes participation without requiring deletion of the base relationship.
Use Order to control sequence. Rules run from lower order values to higher values. When one rule depends on another, give the prerequisite the lower number. Review the dependency itself before assigning values; a tidy numerical sequence is insufficient if a dependent step runs before its prerequisite.
The default maximum is five participating traversal rules. The property svc_by_tags.max.traversal.rules.active in System Property [sys_properties] controls that maximum. Count the intended active set before expanding it. A decision to raise the maximum should follow a review of the required paths, rather than replace that review.
For help planning this work, see ServiceNow implementation.
Validate the service boundary after saving
Reopen the saved traversal record and compare it with the intended change. Check the referenced class pair, relationship type, reverse setting, Used By selection, Active state, and Order. Keep the expected starting and destination CIs beside that check so that validation remains tied to a service outcome. Log the previous and intended values for each of these fields so the change can be reviewed later.
Then examine the resulting application service. Look for the expected connected CI and the example that should remain outside the boundary. If the outcome differs, distinguish a wrong relationship definition from a wrong direction, an inactive rule, or a dependency sequence problem. Avoid adding another rule until the existing path is understood.
Check the install-status filter and the size limits before judging membership. The svc_by_tags.install_status.blacklist property excludes tagged CIs with the listed install statuses, and its default value is 7,100, where 7 stands for Retired. By default, CIs that traversal rules bring in are not treated as tagged, so that filter does not remove them. Setting svc_by_tags.install_status.filter_traversed_cis to true makes the next service recalculation remove traversed CIs with an excluded status, which changes membership and should be recorded as its own step.
Two size limits can also shape membership. svc_by_tags.max_ci_limit caps a tag-based application service at 1000 CIs by default, and svc_by_tags.max_candidates_per_family caps candidates per family at 200 by default. When a family exceeds its candidate limit, the most recently updated CIs take precedence, so an unexpected set of members can reflect that ordering rather than a faulty relationship.
When refining configuration after tag-based application services have already been created, include recalculation of those existing services in the follow-up work. Saving a rule is a configuration milestone; review the affected service membership as a separate acceptance step. Broader setup considerations are covered in tag and traffic based Service Mapping configuration.
Questions about reviewing relationship changes
How should shared infrastructure be reviewed?
Ask the service owner whether including the connected infrastructure expresses the intended service boundary. Record that decision for the tested relationship. Connectivity is a reason to inspect membership, rather than sufficient evidence that the business service should contain the connected CI.
When is a second reviewer helpful?
Use a second review when the proposed definition crosses infrastructure boundaries or when several traversal rules depend on one another. Have the reviewer trace the expected path from the starting CI before comparing the saved configuration and resulting membership.
Which custom Discovery scripts break when findOrCreateRelationshipType stops creating missing CI relationship types, and what should they call instead?
Custom scripts that call findOrCreateRelationshipType for a relationship type that does not yet exist in the instance are the ones that break. The helper now finds an existing CI relationship type and returns an error when none exists. Scripts that only reference types already present should keep running. Each affected call should switch to findCIRelationshipType.
Why some scripts fail and others keep running
The helper used to look up a relationship type and create it when it was missing. Under the new behavior, a call for a type the instance does not hold returns an error.
How to find the exposed scripts
Search every custom Discovery artifact for the helper name, including script includes, pattern customizations, and scheduled jobs. A call is often buried in a utility function that other scripts reuse.
- List every custom artifact that contains the helper name.
- Record the relationship type name passed to each call.
- Check whether that exact name exists in the instance. A name that differs by one character counts as missing.
- Mark a call as exposed when the type is missing and this helper is the only thing that would have created it.
- Replace each exposed call with findCIRelationshipType, and add a branch for the missing-type case that logs a clear message and stops.
- Run the changed script on a non-production copy of the target release before it reaches production.
What to change in the call
The release notes name findCIRelationshipType as the replacement for the helper. If the design needs the type to exist, seed it through a controlled change and record that change. If the type is optional, skip that relationship and log the skip rather than stopping partway through a run.
Compare the argument order and return value of findCIRelationshipType with your current call before you swap the name. Test the swapped call on a copy before production to catch an argument-order mistake.
Which releases carry the change
As of November 2026, the change is effective from Zurich Patch 10, Australia Patch 2 Hotfix 2a, Australia Patch 3, and Brazil. Brazil became generally available on November 5, 2026. Patch level matters as much as the family name, and dates for individual patches are not stated here. Confirm each instance’s exact patch level before you plan the fix.
What to test before production
- A run where the type already exists, to confirm the relationship is still created.
- A run on a copy where the type is absent, to confirm the script stops cleanly.
- A discovery run on a sample of CIs, comparing relationship counts before and after the change.
What to confirm with the script owners
Ask which relationship types each script assumes already exist, and who reads the logs of any script that runs unattended. Agree who signs off the fix before the patch date for each instance.