Incident Creation Script
The default creation script is below, followed by a breakdown of the available variables.
 
  
  (function createServiceNowIncident(scomRecord) {
	// Use the below script to create your incident workflow
	// The inbound SCOM alert is in the variable scomAlertGr
	// scomAlertGr.incident needs to be set to allow SCOM to be updated, 
	// updated custom fields will return to SCOM.
	// 
	// The example below is the same as the built in process
	// Create an empty incident which will be submitted later
	// If you want to link this NEW scom alert to an EXISTING incident, this is where you'd choose that incident.
	// Once this alert creates an incident, you can manage it through the 'Advanced Updates' option
	var grInc = new GlideRecord('incident');
	grInc.initialize();
	// Set the assignment group sys_id for our new incident
	grInc.assignment_group = "0243a356dbd8b300afe1e536ca96194c";
	// Populate the description from the SCOM alert
	grInc.Description = scomRecord.description;
	// The short description on the incident comes from the SCOM alert name
	grInc.short_description = scomRecord.name;
	// Specify our Configuration item by sys_id
	grInc.cmdb_ci = "b6606356dbd8b300afe1e536ca9619a1";
	// Set the caller of the incident as desired, using the user's sys_id
	grInc.caller_id = "908a14d2dbd76b00afe1e536ca9619bd";
	// insert the new incident and store the created incident to our SCOM record (Don't use scomAlertGr.Update()!)
	scomAlertGr.incident = grInc.insert();
})(scomRecord); 
  
 | Variable | Type | Notes | 
|---|
| scomRecord | GlideRecord from the SCOM Alerts table | This GlideRecord represents all of the properties on the incoming SCOM Alert record | 
| grInc | GlideRecord for the new Incident | An empty GlideRecord created for the Incident table | 
| 
 | 
 | 
 |