📖 Guides
🗄️ Tables, Data Model & CMDB

🗄️ ServiceNow — Tables, Data Model & Applications

ServiceNow Developer Guide · Digital Kimya


Everything in ServiceNow is a record in a table.

Diagramme interactif — Hiérarchie des tables

ABSTRACTtask— table mère de tout l'ITSM
numbershort_descriptionassigned_toassignment_groupstatepriorityopened_atclosed_atwork_notes+ hérités par tous les enfants…
INCincident
CHGchange_request
PRBproblem
RITMsc_req_item
sc_task (SCTASK)
👆 Cliquez sur une table pour voir ses champs et sa définition
📦 Scoped Application
Préfixe x_acme_ sur toutes les tables et scripts.
Isolée — ne peut pas appeler du code Global sans permission.
Portable via App Repository ou Update Set.
✅ Recommandé pour tout nouveau développement.
🌐 Global Scope
Pas de préfixe — accès à tout.
Risque d'effet de bord sur les upgrades.
Difficile à isoler et versionner.
⚠️ À éviter pour les nouveaux développements.
🗂️ CMDB — Hiérarchie des Configuration Items
cmdb_ciParent — tous les CIs
cmdb_ci_serverServeurs physiques / VMs
cmdb_ci_applApplications logicielles
cmdb_ci_network_adapterÉquipements réseau
+ cmdb_ci_database, cmdb_ci_service, cmdb_ci_endpoint…
Understanding the table inheritance model — especially the task hierarchy — is the single most important concept for any ServiceNow developer or architect. Get this wrong and your CMDB, reporting, and customisations will fight against the platform instead of with it.


Application Scope — Where Your Code Lives

Every customisation in ServiceNow exists within a scope. The scope determines isolation, access, and portability.

Global Scope

  • Default scope for all out-of-the-box (OOB) configurations
  • Code in Global can call any other code on the platform
  • Customisations in Global are harder to isolate and upgrade-test
  • Risk: Global customisations can break on platform upgrades

Scoped Application

  • An isolated container for a specific application or feature set
  • Has its own tables, scripts, UI components, and access policies
  • Cannot call Global-scope scripts without explicit cross-scope access granted
  • Prefix applied to all objects: e.g., x_myco_hrapp_leave_request
  • Travels cleanly between instances via Update Sets or the App Repo

Example: ServiceNow HR Service Delivery (sn_hr_core) is a scoped app. Its tables, scripts, and ACLs are isolated from the ITSM modules. A custom integration you build as a scoped app (x_acme_sap_integration) can be exported, versioned, and installed independently.

Global Scope
├── incident (table)
├── change_request (table)
└── Custom Business Rule on incident (OOB style — avoid)

Scoped App: x_acme_hr_portal
├── x_acme_hr_portal_leave_request (table)
├── LeaveApprovalUtils (Script Include, scoped)
└── HR Portal Client Scripts

Best practice: New development should always be in a Scoped App, not Global.


The task Table — Foundation of All ITSM

The task table is the parent table for the entire ITSM platform. It defines the common fields shared by every work item in ServiceNow.

Fields Inherited by All Task Children

FieldTypePurpose
numberString (auto)Human-readable ID (INC0001234)
short_descriptionStringOne-line summary
descriptionStringFull detail
assigned_toReference → sys_userIndividual assignee
assignment_groupReference → sys_user_groupTeam assignee
stateInteger (Choice List)Current status
priorityInteger (Choice List)P1–P5
opened_atDateTimeCreation timestamp
closed_atDateTimeClosure timestamp
opened_byReference → sys_userWho created it
work_notesJournalInternal notes
commentsJournalCustomer-visible notes
activeBooleanIs this record open?

Because all task children inherit these fields, a GlideRecord query on task returns all incidents, changes, requests, and problems — the entire workload of the platform.


The Task Hierarchy

task (parent — abstract)
├── incident          ← Incident Management
├── problem           ← Problem Management
├── change_request    ← Change Management
├── sc_req_item       ← Service Catalogue (RITM)
│     └── sc_task     ← Catalogue Task (child of RITM)
├── sc_request        ← Catalogue Request wrapper
└── cert_follow_on_task ← ... and many more

incident — Extends task

Incident adds fields specific to disruption management:

FieldPurpose
caller_idWho reported the incident
categorye.g., Network, Software, Hardware
subcategorye.g., Connectivity, Crash, Printer
impactBusiness impact (1=High, 3=Low)
urgencySpeed of resolution needed (1=High, 3=Low)
resolve_timeTime to resolution (for SLA calculation)
caused_by_changeLink to the change that caused this incident

State values (Choice List specific to incident):

1 = New
2 = In Progress
3 = On Hold
6 = Resolved
7 = Closed
8 = Cancelled

Note: the state field is inherited from task, but the Choice List values are defined per-table. incident.state = 6 means Resolved. change_request.state = 6 means something completely different.


Service Catalogue — Three-Table Cascade

When a user submits a catalogue request, ServiceNow creates three linked records:

sc_request (REQ)           ← The shopping cart / overall request
  └── sc_req_item (RITM)   ← Each item ordered (extends task)
        └── sc_task (SCTASK) ← Fulfilment tasks created by workflow
TablePrefixWho manages it
sc_requestREQFinancial approval, overall status
sc_req_itemRITMThe actual delivery unit — has its own SLA
sc_taskSCTASKIndividual to-do items for fulfilment teams

Why this matters: SLAs on catalogue requests attach to the RITM, not the REQ. Reporting on catalogue fulfilment should query sc_req_item, not sc_request.


change_request — Extends task

Change adds fields for risk, scheduling, and governance:

FieldPurpose
typeNormal / Standard / Emergency
riskHigh / Medium / Low
impactBusiness impact of the change
start_datePlanned implementation start
end_datePlanned implementation end
cab_dateCAB review meeting
cab_recommendationCAB decision
implementation_planStep-by-step plan
backout_planRollback procedure
test_planPost-implementation testing

Data Dictionary (sys_dictionary)

Every field on every table is defined in the Data Dictionary. This is where you control field types, lengths, defaults, and mandatory flags — not in the table record itself.

Key Dictionary Properties

PropertyControls
Typestring, integer, boolean, reference, datetime, html, journal
Max lengthCharacter limit for string fields
Default valuePre-filled value on new records
MandatoryWhether the field must be filled before save
Read-onlyPrevents editing
Display valueWhat shows in the UI vs stored value

Adding a custom field via Data Dictionary:

  1. Navigate to the table (e.g., open an Incident form)
  2. Right-click the form header → Configure → Form Layout
  3. Or: navigate to sys_dictionary.list → New
  4. Set: Table = incident, Column name = u_business_impact, Type = String, Max length = 200
  5. Custom fields always use u_ prefix (not scoped) or x_scope_ (scoped app)

Example — Dictionary query:

// Find all custom fields on the incident table
var dict = new GlideRecord('sys_dictionary');
dict.addQuery('name', 'incident');
dict.addQuery('element', 'STARTSWITH', 'u_'); // Custom fields
dict.query();
 
while (dict.next()) {
    gs.info(dict.element + ' — Type: ' + dict.internal_type);
}

CMDB — Configuration Item Database

The CMDB is ServiceNow's inventory of everything the IT organisation is responsible for. Every server, application, network device, database, and service is a Configuration Item (CI).

CMDB Table Hierarchy

cmdb_ci (parent — all CIs)
├── cmdb_ci_server         ← Physical and virtual servers
│     ├── cmdb_ci_linux_server
│     └── cmdb_ci_win_server
├── cmdb_ci_appl           ← Software applications
├── cmdb_ci_database       ← Database instances
├── cmdb_ci_network_adapter← Network devices
├── cmdb_ci_service        ← Business/IT services
└── cmdb_ci_endpoint       ← Workstations, laptops

Key CMDB Fields

FieldPurpose
nameCI name (e.g., "WEB-PROD-01")
sys_class_nameCI type (e.g., cmdb_ci_linux_server)
operational_statusIn Service / Maintenance / Retired
environmentProduction / Development / Test
owned_byCI owner (sys_user)
managed_by_groupResponsible team (sys_user_group)
ip_addressFor servers and network devices

Relationships

CIs are linked via the cmdb_rel_ci table:

cmdb_rel_ci
├── parent    → CI A
├── child     → CI B
└── type      → "Runs on::Runs" / "Hosted on::Hosts" / "Depends on::Used by"

Example: Linking an incident to a CMDB CI:

// Business Rule: link incident to CI based on category
(function executeRule(current, previous) {
    if (current.category == 'network') {
        var ci = new GlideRecord('cmdb_ci_network_adapter');
        ci.addQuery('name', current.short_description);
        ci.setLimit(1);
        ci.query();
        if (ci.next()) {
            current.cmdb_ci = ci.sys_id;
        }
    }
})(current, previous);

Platform Data Model — Summary

ServiceNow Data Model — Building Blocks

Click any step to expand · 5 steps

1
🏗️Start with the task hierarchy

Understand that incident, change, problem, and RITM all extend task. Query task for cross-process reporting. Never recreate fields that already exist on task — they are automatically inherited.

task query covers all ITSM typesNo duplicate fieldsUnified SLA foundation
2
📊Model your custom tables correctly
3
📝Use the Data Dictionary for all field changes
4
🗺️Populate the CMDB systematically
5
📦Build scoped apps for new functionality

Common Data Model Mistakes

MistakeImpactFix
Querying incident when you need cross-process dataMiss change/problem recordsQuery task table
Creating custom table instead of extending taskNo SLA, no unified queue, no assignmentExtend task
Manual CMDB populationInaccurate, stale dataUse Discovery or import automation
u_ prefix fields in scoped appsNaming collision riskUse x_scope_ prefix
Ignoring Choice List isolation per tableWrong state label displayedCheck Choice List per table, not just task

Part of the Digital Kimya (opens in a new tab) ServiceNow Guide Series — Identity & Access · Scripts & Logic · Deployment

Digital Kimya — MENA & Europe

Ready to implement what you've read?

Our ITSM practitioners deliver ITIL 4 & 5 projects across ServiceNow, Jira SM, SMAX and BMC Helix — from initial assessment to full ESM deployment.

🚀 ITIL Implementation🔧 ITSM Platform Setup📊 Assessment & Roadmap🏭 Industry-Specific Projects
🌍 MENA & Europe🎯 ITIL 4 & 5 Certified🏢 6 Industries covered Assessment in 2 weeks
contact@digitalkimya.net