find_duplicate_cis
Identify duplicate CIs in ServiceNow CMDB by grouping records that share the same field value, such as name or serial number, to detect duplicates created by multiple sources.
Instructions
Find CIs that share the same value for a given field within a class.
Identifies potential duplicates by grouping CIs on a field (typically name or serial_number) and returning groups with more than one record. Useful for finding CIs that may have been created by multiple discovery sources or manual entry.
Examples: find_duplicate_cis(ci_class="cmdb_ci_server", match_field="name") find_duplicate_cis(ci_class="cmdb_ci_server", match_field="serial_number") find_duplicate_cis(ci_class="cmdb_ci_server", match_field="ip_address", name_filter="prod")
Args: ci_class: CMDB table to search (e.g. cmdb_ci_server). Defaults to cmdb_ci. match_field: Field to match duplicates on. Defaults to "name". Common choices: "name", "serial_number", "asset_tag", "ip_address". name_filter: Optional STARTSWITH filter on the name field to narrow scope. limit: Maximum duplicate groups to return (1-1000, default 25). offset: Pagination offset.
Returns: JSON object with "ci_class", "match_field", "count", "total_count", "has_more", "next_offset", and "duplicate_groups" (list of groups, each with the shared value and matching CIs).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ci_class | No | cmdb_ci | |
| match_field | No | name | |
| name_filter | No | ||
| limit | No | ||
| offset | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |