Overview

This guide maps your existing Excel data to CSDM v5 ServiceNow tables, providing transformation rules and migration scripts.


1. Business Applications Transformation

Source Data: "Ex_Client Business Applications" Sheet

Current Structure (10 applications):

Application | Status | Architecture Type | Install Type | Platform |
IT Application Owner | Support Group | Notes

Target Table: cmdb_ci_business_app

Field Mapping

Excel Column ServiceNow Field Transformation Rule
Application name Direct mapping
Status operational_status Map: "Operational" → 1 (Operational)
Architecture Type u_architecture_type Create choice list field
Install Type install_type Map to standard values
Platform u_platform Reference field (optional)
Platform Apps u_platform_apps String field
App Description short_description Direct mapping
IT Application Owner owned_by Lookup user in sys_user
Support Group support_group Lookup group in sys_user_group
Notes comments Direct mapping

Additional Required Fields

ServiceNow Field Value Source
sys_class_name cmdb_ci_business_app Fixed
asset_tag Auto-generate System
business_criticality To be defined Manual entry
company Your organisation Reference
location Corporate HQ Reference
u_cost_center From owner's dept Lookup

Transformation Script (JavaScript)

// Migration script for Business Applications
(function() {
    var excelData = [
        {
            Application: "SAP Business One",
            Status: "Operational",
            ArchitectureType: "SaaS",
            InstallType: "Cloud",
            AppDescription: "Finance",
            ITApplicationOwner: "Shaun Brachmann",
            SupportGroup: "Enterprise App Support"
        },
        // ... remaining 9 applications
    ];

    var statusMap = {
        "Operational": 1,
        "Non-Operational": 2,
        "Retired": 7
    };

    excelData.forEach(function(row) {
        var ba = new GlideRecord('cmdb_ci_business_app');
        ba.initialize();

        // Basic fields
        ba.name = row.Application;
        ba.operational_status = statusMap[row.Status] || 1;
        ba.short_description = row.AppDescription;
        ba.u_architecture_type = row.ArchitectureType;
        ba.install_type = getInstallType(row.InstallType);

        // Owner lookup
        var owner = new GlideRecord('sys_user');
        if (owner.get('name', row.ITApplicationOwner)) {
            ba.owned_by = owner.sys_id;
        }

        // Support group lookup
        var group = new GlideRecord('sys_user_group');
        if (group.get('name', row.SupportGroup)) {
            ba.support_group = group.sys_id;
        }

        // Default company
        var company = new GlideRecord('core_company');
        if (company.get('name', 'Your Organisation')) {
            ba.company = company.sys_id;
        }

        // Create record
        var sysId = ba.insert();
        gs.info('Created Business Application: ' + row.Application + ' [' + sysId + ']');
    });

    function getInstallType(excelValue) {
        var installTypeMap = {
            "Cloud": 1,
            "On Premise": 2,
            "Hybrid": 3,
            "Platform Host": 4
        };
        return installTypeMap[excelValue] || 1;
    }
})();


2. Technical Services Transformation

Source Data: "Technical Service Data" Sheet

Current Structure (7 services, 96 offerings):

Technical Service | Technical Service Offering | Vendor |
Service Classification | Support Group | Approval Group

Target Tables