Create Incident operation for ServiceNow


The Create Incident operation creates an incident.

The following table describes the elements for this request. If the valid value for an element is not provided, the valid value must be assumed to be a string.

 Adapter request elements for the Create Incident operation

 

The following figure displays the sample adapter request for this operation:

Sample adapter request for the Create Incident operation in Patch 2 for 20.19.02 and later

<service-now-request>
   <operation-name>create-incident</operation-name>
   <proxy-settings>
     <host>172.11.11.111</host>
     <port>808</port>
     <user-name>username</user-name>
     <password encryption-type = "Base64">cGFzc3dvcmQ=</password>
   </proxy-settings>
   <arguments>
     <connection-parameters>
       <user-name>username</user-name>
       <password encryption-type = "Base64">cGFzc3dvcmQ=</password>
     </connection-parameters>
     <caller-id>System Administrator</caller-id>
     <location>Americas</location>
     <cmdb-ci>*JEMPLOYEE-IBM</cmdb-ci>
     <impact>Low</impact>
     <urgency>Low</urgency>
     <priority>Planning</priority>
     <knowledge>1</knowledge>
     <short-description>short desc</short-description>
     <opened-at>2010-04-03 13:02:39</opened-at>
     <opened-by>System Administrator</opened-by>
     <incident-state>Closed</incident-state>
     <category>inquiry</category>
     <escalation>Normal</escalation>
     <assignment-group>Service Desk</assignment-group>
     <assigned-to>Beth Anglin</assigned-to>
     <comments>mycomments</comments>
     <work-notes>myworknotes</work-notes>
     <template-name>change_template</template-name>
   </arguments>
</service-now-request>

Sample adapter request for the Create Incident operation in 20.19.02.001 or earlier

<service-now-request>
   <operation-name>create-incident</operation-name>
   <proxy-settings>
     <host>10.129.94.127</host>
     <port>8080</port>
     <user-name>tso</user-name>
     <password>****MASKED****</password>
   </proxy-settings>
   <arguments>
     <connection-parameters>
       <user-name>admin</user-name>
       <password>****MASKED****</password>
     </connection-parameters>
     <caller-id>System Administrator</caller-id>
     <contact-type>Email</contact-type>
     <location>Americas</location>
     <cmdb-ci>*JEMPLOYEE-IBM</cmdb-ci>
     <knowledge>1</knowledge>
     <opened-by>System Administrator</opened-by>
     <incident-state>New</incident-state>
     <category>inquiry</category>
     <escalation>Normal</escalation>
     <assignment-group>Service Desk</assignment-group>
     <assigned-to>Beth Anglin</assigned-to>
     <comments>mycomments</comments>
     <work-notes>myworknotes</work-notes>
     <template-name>incident_template</template-name>
   </arguments>
 </service-now-request>

The following figure shows the adapter response for the sample request irrespective of the release:

 Sample adapter response for the Create Incident operation

 <service-now-response>
 <metadata>
   <response-count>1</response-count>
   <status>success</status>
 </metadata>
 <responses>
   <response>
     <metadata>
       <count>1</count>
     </metadata>
     <item>
       <metadata>
         <status>success</status>
       </metadata>
       <parameters>
         <active>1</active>
         <approval>Not Yet Requested</approval>
         <assigned-to>Beth Anglin</assigned-to>
         <assignment-group>Service Desk</assignment-group>
         <business-duration>1970-01-13 00:00:00</business-duration>
         <business-stc>1036800</business-stc>
         <calendar-duration>1970-02-21 08:07:04</calendar-duration>
         <calendar-stc>4435624</calendar-stc>
         <caller-id>System Administrator</caller-id>
         <category>Inquiry / Help</category>
         <closed-at>2010-05-25 04:09:43</closed-at>
         <closed-by>Jagdeep Singh</closed-by>
         <cmdb-ci>*JEMPLOYEE-IBM</cmdb-ci>
         <contact-type>Phone</contact-type>
         <escalation>Normal</escalation>
         <impact>3 - Low</impact>
         <incident-state>Closed</incident-state>
         <knowledge>1</knowledge>
         <location>Americas</location>
         <made-sla>1</made-sla>
         <notify>Do not notify</notify>
         <number>INC0010970</number>
         <opened-at>2010-04-03 20:02:39</opened-at>
         <opened-by>System Administrator</opened-by>
         <order>0</order>
         <priority>5 - Planning</priority>
         <reassignment-count>0</reassignment-count>
         <severity>3 - Low</severity>
         <short-description>short desc</short-description>
         <state>Open</state>
         <sys-class-name>Incident</sys-class-name>
         <sys-created-by>qaadmin</sys-created-by>
         <sys-created-on>2010-05-25 04:09:43</sys-created-on>
         <sys-domain>global</sys-domain>
         <sys-id>cda6d7e74a362305019d5da80440cc2d</sys-id>
         <sys-mod-count>0</sys-mod-count>
         <sys-updated-by>qaadmin</sys-updated-by>
         <sys-updated-on>2010-05-25 04:09:43</sys-updated-on>
         <upon-approval>Proceed to Next Task</upon-approval>
         <upon-reject>Cancel all future Tasks</upon-reject>
         <urgency>3 - Low</urgency>
       </parameters>
     </item>
   </response>
 </responses>
</service-now-response>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*