The Common Change document is an XML schema that contains default fields for mapping change request form values from one system to another. The common change format mirrors what one would see in an ITIL view of the Change Request form with related lists expressed in embedded XML form.

What's on this page?




Implementation

The implementation of any common attachment format is symmetrical, meaning that the output, when consumed, should produce the same or similar records at the target. The implementation should also exhibit idempotent behavior, meaning when a document is consumed and processed repeatedly, the same result either appears or is ignored, because the results already exist.


↑ Go to top of page




Dynamic Shares

For the correct outputs to be produced, you must create 2 Dynamic Shares - one to capture the comments and work_notes field values in a before context, and the other as async mode to capture the related records in a delayed step.

In the before Dynamic Share, use the following code snippet to prevent unwanted outbound messages to be queued when comments or work_notes are not updated. Please note this is only necessary if it applies to your use case.

if (current.comments.nil() && current.work_notes.nil()) {
	ignore = true;
}
↑ Go to top of page




Embedded Records

Embedded records are fields in the Common Change document that cannot be mapped by singular values. Instead, they are entirely different records embedded inside the Common Change document to be created on the subscribing system.

(info) NOTEDeactivate each of the transform scripts in PSP Common Change to Change if you choose not to parse these embedded objects into records. If you need to extend or add additional capabilities, instead of modifying the existing scripts, add new ones so that upgrades are possible.

The following are examples of the embedded records in Common Change: 

Configuration Item's Affected Embedded Record


The CI affected field in the Common Change is an embedded record that, when populated, will create a new CI affected on the system receiving the Common Change.

Table Map Source FieldDefinition
ci_classClass name of the configuration item
ci_nameName of the configuration item
ci_idUnique record identifier of the configuration item

Approver Embedded Record


The approver field in the Common Change is an embedded record that, when populated, will create a new approver on the system receiving the Common Change.

Table Map Source FieldDefinition
createdDate the record was created on
approver_nameName of the approver
assignment_group_nameName of the assignment group
approverUnique record identifier of the approver record
commentsComments of the approver
approver_emailEmail of the approver
assignment_groupUnique record identifier of the assignment group record

Attachment Embedded Record


The attachment field in the Common Change is an embedded record that, when populated, will create a new attachment on the system receiving the Common Change.

Table Map Source FieldDefinition
dataAttachment data in an encoded string format
size_bytesMeasurement of how much the attachment data contains
file_nameName of the attached file 
sys_idUnique record identifier of the attachment
content_typeAttachments content type (i.e jpeg, png, txt, etc.) 

Change Task Embedded Record


The change task field in the Common Change is an embedded record that, when populated, will create a new change task on the system receiving the Common Change.

Table Map Source FieldDefinition
assignment_groupUnique record identifier of the assignment group record
short_descriptionShort description of the change task
correlation_idUnique record identifier of the correlating change task
numberRecord number of change task 
work_notesWork notes for the change task
commentsComments for the change task
correlation_displayUnique record display of the correlating change task
change_task_typeChange task category 
assigned_toUser the change task is assigned to 
stateState of the change task
descriptionDescription of the change task
cmbd_ciUnique record identifier of the parent record

Impacted Service Embedded Record


The impacted service field in the Common Change is an embedded record that, when populated, will create a new impacted service on the system receiving the Common Change.

Table Map Source FieldDefinition
operational_statusStatus of the impacted service
typeClass type of the impacted service
location_nameLocation of the impacted service
idUnique record identifier of the impacted service
manually_addedRepresents if the impacted service is added manually
nameName of the impacted service

Incident Embedded Record


The incidents_caused and incidents_fixed fields in the Common Change is an embedded record that, when populated, will create a new incident on the system receiving the Common Change.

Table Map Source FieldDefinition
assigned_to_nameDisplay name of the assigned user 
assignment_group_nameDisplay name of the assigned group
caller_id_nameDisplay name of the caller
categoryCategory the incident record falls under
numberNumber of the incident record
opened_atDate the incident record was opened
priorityPriority level of the incident record

short_description

Short description of the incident record
stateState of the incident record
idUnique record identifier of the incident

Problems Embedded Record


The problems field in the Common Change is an embedded record that, when populated, will create a new problem on the system receiving the Common Change.

Table Map Source FieldDefinition
short_descriptionShort description of the problem record
assignment_group_nameDisplay name of the assigned group
idUnique record identifier of the problem
assigned_to_nameDisplay name of the assigned user 
stateState of the problem record
numberNumber of the problem record
↑ Go to top of page




Table Maps

The Perspectium Common Change Helium update set will contain the following:


Outbound Table Maps


NameTypeSource tableDescription
Change to Common Changecommon_changeChange Request [change_request]Main body of the common_change format
psp_attachmentembedded_attachmentsys_attachmentMap for building embedded attachments field in common_change
psp_affected_ciembedded_affected_ciCIs Affected [task_ci]Map for building embedded affected CI in common_change
psp_change_taskembedded_change_taskChange Task [change_task]Map for building embedded change_tasks in common_change
psp_problemembedded_problemProblem [problem]Map for building embedded problem records in common_change
psp_impacted_serviceembedded_impacted_serviceImpacted CIs [task_cmdb_ci_service]Map for building affected CI/service to common_change
psp_incidentembedded_incidentIncident [incident]Map for building incidents fixed and caused by embedded incidents for common_change
psp_approversembedded_approversApproval [sysapproval_approvers]Map for building embedded approvers

Inbound Table Map


NameTypeTarget TableDescription
Common Change to PSP Common Changecommon_changePSP Common Change (u_psp_common_change)Main body of the common_change format

Import Set


Name

Description

PSP Common Change to Change Request (u_psp_common_chane)Transforms the common_change format to change. 
↑ Go to top of page




Sample Output

A sample Common Change looks like this:

<common_change>
   <affected_cis>
      <affected_ci>
         <ci_class />
         <ci_name />
         <ci_id />
      </affected_ci>
   </affected_cis>
   <approval />
   <approvers>
      <approver>
         <created />
         <approver_name />
         <assignment_group_name/>
         <approver />
         <state />
         <comments/>
         <approver_email />
         <assignment_group/>
      </approver>
   </approvers>
   <assigned_to />
   <assignment_group />
   <attachments>
      <attachment>
         <data />
         <size_bytes />
         <file_name />
         <sys_id />
         <content_type />
      </attachment>
   </attachments>
   <backout_plan />
   <category />
   <change_tasks>
      <change_task>
         <assignment_group />
         <short_description />
         <correlation_id />
         <number />
         <work_notes />
         <comments />
         <correlation_display />
         <change_task_type />
         <assigned_to />
         <state />
         <description />
         <cmdb_ci />
      </change_task>
   </change_tasks>
   <close_code />
   <close_notes />
   <cmdb_ci />
   <comments />
   <correlation_display />
   <correlation_id />
   <description />
   <end_date />
   <impact />
   <impacted_services>
      <impacted_service>
         <operational_status />
         <type />
         <location_name />
         <id />
         <manually_added />
         <name />
      </impacted_service>
   </impacted_services>
   <implementation_plan />
   <incidents_caused>
      <incident>
         <number />
         <opened_at />
         <category />
         <caller_id_name />
         <assigned_to_name />
         <short_description />
         <priority />
         <id />
         <state />
         <assignment_group_name />
      </incident>
   </incidents_caused>
   <incidents_fixed>
      <incident>
         <number />
         <opened_at />
         <category />
         <caller_id_name />
         <assigned_to_name />
         <short_description />
         <priority />
         <id />
         <state />
         <assignment_group_name />
      </incident>
   </incidents_fixed>
   <justification />
   <number />
   <priority />
   <problems>
      <problem>
         <short_description />
         <assignment_group_name />
         <id />
         <assigned_to_name />
         <state />
         <number />
      </problem>
   </problems>
   <provider />
   <psp_action />
   <requested_by />
   <requested_by_date />
   <risk />
   <short_description />
   <start_date />
   <state />
   <test_plan />
   <type />
   <work_notes />
</common_change>

The following Perspectium Inbound/Outbound Message unloads can be un-gzipped and uploaded into your instance of ServiceNow to view and used for testing.

Common Change Sample - Inbound.xml.gz

Common Change Sample - Outbound.xml.gz



↑ Go to top of page