Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

SCCM Service Graph Connector - Add Discovery source

Nisha30
Kilo Sage

Hi ITOM Experts,

 

How do I add Discovery Source for SGC -SCCM.

Is it different than Normal SCCM integration. Usually in Transform map we add a field map .

 

Here where exactly we need to add since it uses ETL

 

Thanks

2 REPLIES 2

VivekSattanatha
Mega Sage

Hi,

 

Usually, when you create a new ETL configuration, it will ask for the Discovery Source. If you are using the OOTB SG-SCCM integration, it will already be handled automatically. Do you miss the Discovery source in any tables?

 

VivekSattanatha_0-1763126649594.png

 

MaxMixali
Giga Guru

COME AGGIUNGERE DISCOVERY SOURCE IN SGC-SCCMMETODO
Tramite ETL Definition (Raccomandato)

Passo 1: Navigare all'ETL Definition


Vai a: Service Graph Connectors > ETL Definitions
Oppure: System Applications > Studio
Cerca l'applicazione: Service Graph Connector - SCCM
Filtra per: sn_sccm_etl_*


Passo 2: Trovare l'ETL Definition CorrettaLe principali ETL Definitions per SCCM

sono:- sn_sccm_etl_computer (per Computer/Server)
- sn_sccm_etl_software (per Software)
- sn_sccm_etl_user (per Users)
- sn_sccm_etl_device (per Mobile Devices)Passo 3: Modificare l'ETL Transform Script
Apri l'ETL Definition (es: sn_sccm_etl_computer)
Vai alla sezione Transform Script

 

 

Aggiungi il Discovery Source nel transform script:

javascript// ETL Transform Script - Aggiungere Discovery Source

(function transform(source, target, etl) {

// ========== MAPPATURA STANDARD ==========
// (il codice esistente rimane)
target.name = source.name;
target.serial_number = source.serial_number;
// ... altri campi ...

// ========== AGGIUNGERE DISCOVERY SOURCE ==========

// Opzione 1: Discovery Source Hardcoded
target.discovery_source = 'SCCM'; // Valore fisso

// Opzione 2: Discovery Source dalla connessione
var connectionId = etl.connection.sys_id.toString();
var connection = new GlideRecord('sn_disco_ext_connection');
if (connection.get(connectionId)) {
target.discovery_source = connection.getValue('name'); // Nome della connessione
}

// Opzione 3: Discovery Source personalizzato
target.discovery_source = 'SCCM-' + etl.connection.name; // Es: "SCCM-Production"

// Opzione 4: Discovery Source da campo source (se disponibile)
if (source.source_system) {
target.discovery_source = source.source_system;
} else {
target.discovery_source = 'SCCM';
}

// ========== FINE ==========

})(source, target, etl);