Connectors

/

ServiceNow

/

Decommission a ServiceNow configuration item
Write

Retire a ServiceNow CI only when nothing depends on it

For configuration and asset managers who want a server or device retired in ServiceNow with its asset, after dependency checks, by asking their AI assistant.

Try PopdockAI free
Get a live demo
Decommission a ServiceNow configuration item
Decommission app-test-07 in ServiceNow. It was replaced by the new cluster.
app-test-07 has no open alerts or changes, so it can be retired. - CI: app-test-07, Installed to Retired - Asset: P1000318 found by serial, In use to Retired - Services: none depend on it - Knowledge: KB0010234 mentions it and will need updating Shall I retire both records?
ServiceNow
Sample figures. Your results come from your own account.
servicenow-get-configuration-item
servicenow-get-alert
servicenow-get-ci-affected
servicenow-get-change-request
servicenow-get-impacted-ci
servicenow-get-knowledge-related-product
servicenow-get-asset
servicenow-update-configuration-item
servicenow-update-asset

On this page

The problem

The problem

The prompt

Who it's for

How it works

Tools used

Connector

ServiceNow

ServiceNow
Run it on your own ServiceNow data.

Connect ServiceNow, pick your AI tool and paste the prompt.

Try PopdockAI free

The problem

Retiring a CI that something still depends on

Retiring a server or device means updating the CI and its matching asset, but only once nothing depends on it. Retire it too early and open changes or live alerts lose their CI; forget the asset and it stays in inventory and spend reports.

Without PopdockAI

  • Check alerts, changes and services by hand
  • Retire the CI and hope nothing breaks
  • Forget to update the matching asset
  • Leave stale articles pointing at it

With PopdockAI

  • Open alerts, open changes, dependent services and articles are checked
  • Open alerts or changes block the job unless you override
  • The matching asset is found by serial number
  • Both records update after you confirm and are re-read

The prompt

Use this prompt

Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.

Prompt
**Objective:** Decommission configuration item `{ci-name}` (reason: `{reason}`) and retire its matching asset, only when nothing still depends on it.

**Step 1: Read the CI**

Call `servicenow-get-configuration-item` with name `{ci-name}`. It must match exactly one record. Keep sys-id, class, install-status, operational-status and serial-number. If install-status is already Retired, stop.

**Step 2: Dependency checks**

* Call `servicenow-get-alert` with configuration-item `{ci-name}` and state Open.
* Call `servicenow-get-ci-affected` with configuration-item `{ci-name}`; read every CHG task with `servicenow-get-change-request` and keep open ones.
* Call `servicenow-get-impacted-ci` with configuration-item `{ci-name}` to see whether it is a service that tasks depend on.
* Call `servicenow-get-knowledge-related-product` with configuration-item `{ci-name}` for articles that will need updating.

Open alerts or open changes block the decommission: list them and stop unless the user explicitly overrides.

**Step 3: Find the asset**

If the CI has a serial-number, call `servicenow-get-asset` with serial-number set to it. Keep the asset sys-id and state.

**Step 4: Confirm**

Show: the CI, the dependency findings, the planned CI update (install-status Retired, operational-status Non-Operational) and the planned asset update (install-status Retired) if an asset was found. Ask for an explicit yes.

**Step 5: Write**

1. Call `servicenow-update-configuration-item` once with the CI sys-id, install-status Retired and operational-status Non-Operational.
2. If an asset was found, call `servicenow-update-asset` once with its sys-id, install-status Retired and comments "Decommissioned with CI `{ci-name}`. `{reason}`".

**Step 6: Verify and report**

Re-read both records and report their new statuses, plus the knowledge articles from Step 2 that mention this CI.

**Rules & Guidelines:**

* Write tools allowed: `servicenow-update-configuration-item` once and `servicenow-update-asset` once, after one confirmation. Do not call `servicenow-update-base-configuration-item`, `servicenow-update-ci-affected` or any add- tool.

**Validation:**

* If `{ci-name}` matches nothing, retry with name.contains, list the candidates and stop.

Who it's for

One answer, three teams that use it

Infrastructure engineers

Decommission servers safely

Know nothing depends on a server before retiring it, with both records updated together.

Decommission db-legacy-02 in ServiceNow, migrated to the new database cluster.

CMDB managers

Keep the CMDB and assets in step

Retire the CI and the matching asset at once so inventory and spend stay accurate.

Retire the CI web-old-05 and its asset, replaced during the data centre move.

IT asset managers

Remove retired kit from spend reports

Make sure decommissioned hardware stops appearing in inventory.

Decommission switch-floor3-a in ServiceNow, it has been physically removed.

How it works

What PopdockAI does when you ask

You give the CI and a reason, and your AI assistant checks nothing still depends on it. The CI and its asset are retired only after you confirm.

01

Ask

You give the CI name and a reason.

Your AI tool

02

Check

It looks for open alerts, open changes, dependent services and related articles.

servicenow-get-configuration-item
servicenow-get-alert
servicenow-get-ci-affected
servicenow-get-change-request
servicenow-get-impacted-ci
servicenow-get-knowledge-related-product

03

Confirm

You see both planned updates for the CI and its matching asset and say yes.

No items found.

04

Retire

It updates both records, re-reads them and lists articles to update.

Your AI tool

What PopdockAI provides

The tools behind the answer

Ready made tools for ServiceNow and one secure connection to your AI tool. No code, no exports.

get-data

servicenow-get-configuration-item

Returns configuration items (name, class, IP address, operational status and support group) from ServiceNow. Filter by name, class, environment, IP address, operational status, install status and location.
get-data

servicenow-get-alert

Returns event management alerts (severity, state, source, node and the linked task) from ServiceNow. Filter by number, state, severity, source, node, configuration item, whether it is acknowledged, and created date range.
get-data

servicenow-get-ci-affected

Returns the configuration items affected by each task from ServiceNow. Filter by task, configuration item and whether the link is applied.
get-data

servicenow-get-change-request

Returns change request records (type, state, risk, approval and planned window) from ServiceNow. Filter by number, type, state, risk, assignment group, assignee, short description text and planned start date range.
get-data

servicenow-get-impacted-ci

Returns the services impacted by each task from ServiceNow. Filter by task or configuration item.
get-data

servicenow-get-knowledge-related-product

Returns links between knowledge articles and the configuration items (products) they cover from ServiceNow. Filter by knowledge article or configuration item.
get-data

servicenow-get-asset

Returns asset records (tag, model, serial number, state, assignee, cost and warranty) from ServiceNow. Filter by asset tag, serial number, display name, model category, state, location, assignee, cost range and warranty expiration.
run-action

servicenow-update-configuration-item

Updates an existing configuration item record in ServiceNow (the cmdb_ci table), identified by its sys_id. Only the fields you pass are changed.
run-action

servicenow-update-asset

Updates an existing asset record in ServiceNow (the alm_asset table), identified by its sys_id. Only the fields you pass are changed.
Read only.Nothing in ServiceNow Changes

This report is built from Get data tools only. PopdockAI applies the row, field and parameter rules your admin sets, and every query is written to the audit trail.

How Popdock AI secures your data

The outcome

Retired equipment leaves the CMDB and inventory together

Try PopdockAI free
Get a live demo

Related use cases

More ways to put this data to work

All Ramp use cases

One prompt template with infinite possibilities.

‍

Your AI assistant adapts its approach, tone, and capabilities to match each unique context while you maintain a single, manageable workflow.

Join forward-thinking companies that are transforming their operations with intelligent, secure AI automation.

Try PopdockAI Free
See Documentation