preview_ci_create
Validates and returns a confirmation token for a new CI entry without inserting it into ServiceNow.
Instructions
Preview the creation of a new CI before inserting it.
Validates the fields and returns a confirmation token. No record is created in ServiceNow until confirm_ci_create is called.
The confirmation token is valid for 5 minutes.
Prerequisites: Call describe_ci_class(table) first to review mandatory fields and valid values before composing the fields dict. Call suggest_table if you are unsure of the correct table name.
Typical workflow: suggest_table → describe_ci_class → preview_ci_create → confirm_ci_create
Examples: preview_ci_create(table="cmdb_ci_server", fields={ "name": "web-server-01", "ip_address": "10.0.1.5", "operational_status": "1", "os": "Linux Red Hat" }) preview_ci_create(table="cmdb_ci_appl", fields={ "name": "MyApp", "operational_status": "1" }) preview_ci_create(table="cmdb_ci_linux_server", fields={ "name": "db-primary-01", "ip_address": "10.10.5.20", "os": "Linux Red Hat", "install_status": "1", "operational_status": "1" })
Args: table: The CMDB table to create the CI in (e.g. cmdb_ci_server). fields: Dictionary of field names to values. Must include at minimum a "name" field. Example: {"name": "web-server-01", "ip_address": "10.0.1.5", "operational_status": "1"}. System fields (sys_id, sys_created_on, etc.) cannot be set.
Returns: JSON object with "token" (confirmation token), "table", "fields" (the values to be created), and a human-readable message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| fields | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |