Create Change operation for ServiceNow

The Create Change operation creates a change record.

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


Adapter request elements for the Create Change operation

Element

Definition

Required

<operation-name>

Contains the name of the operation: create-change

Yes

<proxy-settings>

Specifies the parent tag that contains the proxy server information

No

<host>

Specifies the IP or host name of the proxy server

Conditional

<port>

Specifies the port on which the proxy server listens for requests

Conditional; required only if <proxy-settings> is provided

<user-name>

Specifies the user name to be used for proxy server authentication

No

<password>

Specifies the password that corresponds to the proxy server <user-name>

The <password> element can contain an encryption-type attribute. The encryption-type attribute indicates whether the password specified is encrypted.

Valid values for encryption-type attribute: Base64, Plain (default)

No

<arguments>

Specifies a list of arguments required for the create-change operation

Yes

<connection-parameters>

Specifies the parent tag of <user-name> and <password>

You can use the <connection-parameters> element to specify a user name and password. The connection parameters specified here override the default values specified in the adapter configuration.

No

<user-name>

Specifies the user name for remote host authentication

Conditional; required if <connection-parameters> is specified in request

<password>

Specifies the password that corresponds to the proxy server <user-name>

The <password> element can contain an encryption-type attribute. The encryption-type attribute indicates whether the password specified is encrypted.

Valid values for encryption-type attribute: Base64, Plain (default)

Conditional; required if <connection-parameters> is specified in request

<assigned-to>

Contains the name of the element: Assigned to

Valid value: Any valid user name supported by the application

If an invalid value is specified, then change record is created without populating the <assigned-to> field.

No

<cmdb-ci>

Contains the name of the element: Configuration Item

Valid value: Any valid configuration item

No

<requested-by>

Contains the name of the element: Requested by

Valid value: Any valid user name supported by the application

If an invalid value is specified, then change record is created without populating this field.

Default value: User who creates the change

No

<priority>

Contains the name of the element: Priority

Valid value: Any valid priority

For example:

  • 1 - Critical
  • 2 - High
  • 3 - Moderate
  • 4 - Low (default)
  • 5 - Planning
    The ServiceNow application allows you to personalize this list. However, when using an item from your personalized list, you must use its value and not the label or name of the item.

No

<short-description>

Contains the name of the element: Short description

Valid value: Any string

No

<approval>

Contains the name of the element: Approval

Valid value: Any valid approval

For example:

  • Not Yet Requested (default)
  • Requested
  • Approved
  • Rejected
    The ServiceNow application allows you to personalize this list. However, when using an item from your personalized list, you must use its value and not the label or name of the item.

No

<category>

Contains the name of the element: Category

Valid value: Any valid category

For Example:

  • Hardware
  • Software
  • Business Service
  • System Software
  • Application Software
  • Network
  • Telecom
  • Documentation
  • Other
    The ServiceNow application allows you to personalize this list. But when using an item from your personalized list, you must use its value and not the label or name of the item.

No

<type>

Contains the name of the element: Type Valid value: Any valid type For example:

  • Routine
  • Comprehensive (default)
  • Emergency
    The ServiceNow application allows you to personalize this list. However, when using an item from your personalized list, you must use its value and not the label or name of the item.

No

<state>

Contains the name of the element: State Valid value: Any valid state For example:

  • Open (default)
  • Work In Progress
  • Closed Complete
  • Closed Incomplete
  • Closed Skipped
    The ServiceNow application allows you to personalize this list. However, when using an item from your personalized list, you must use its value and not the label or name of the item.

No

<risk>

Contains the name of the element: Risk Valid value: Any valid risk For example:

  • Very High
  • High
  • Moderate (default)
  • Low
  • None
    The ServiceNow application allows you to personalize this list. However, when using an item from your personalized list, you must use its value and not the label or name of the item.

No

<description>

Contains the name of the element: Description

Valid value: Any string

No

<work-notes>

Contains the name of the element: Work Notes Valid value: Any string

Note

The value of this field is not displayed in the response.

No

<requested-by-date>

Contains the name of the element: Requested by date

Valid value: Any value in date-time format (YYYY-MM-DD hh:mm:ss)

If an invalid value is specified then change record is created, without this field populated.

No

<start-date>

Contains the name of the element: Planned start date

Valid value: Any value in date-time format (YYYY-MM-DD hh:mm:ss)

If an invalid value is specified, then change record is created, without this field populated.

No

<end-date>

Contains the name of the element: Planned end date

Valid value: Any value in date-time format (YYYY-MM-DD hh:mm:ss)

If an invalid value is specified, then change record is created, without this field populated.

No

<work-start>

Contains the name of the element: Work start

Valid value: Any value in date-time format (YYYY-MM-DD hh:mm:ss)

If an invalid value is specified, then a change record is created, without this field populated.

No

<work-end>

Contains the name of the element: Work end

Valid value: Any value in date-time format (YYYY-MM-DD hh:mm:ss)

If an invalid value is specified, then change record is created, without this field populated.

No

<change-plan>

Contains the name of the element: Change plan

Valid value: Any string

No

<backout-plan>

Contains the name of the element: Backout plan

Valid value: Any string

No

<test-plan>

Contains the name of the element: Test plan

Valid value: Any string

No

<template-name>Specifies the name of the template based on which you can create a change record

No

The following figure displays a sample adapter request for the create-change operation:

Sample adapter request for the Create Change operation

 <service-now-request>
    <operation-name>create-change</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>
      <assigned-to>Beth Anglin</assigned-to>
      <cmdb-ci>*JEMPLOYEE-IBM</cmdb-ci>
      <requested-by>ITIL User</requested-by>
      <priority>Low</priority>
      <short-description>short desc</short-description>
      <approval>Not Yet Requested</approval>
      <category>Other</category>
      <type>Comprehensive</type>
      <state>Open</state>
      <risk>Moderate</risk>
      <description>desc</description>
      <work-notes>my notes</work-notes>
      <requested-by-date>2010-03-29 13:30:45</requested-by-date>
      <start-date>2010-03-29 13:30:48</start-date>
      <end-date>2010-03-29 13:30:50</end-date>
      <work-start>2010-03-29 13:30:53</work-start>
      <work-end>2010-03-29 13:30:56</work-end>
      <change-plan>change plan</change-plan>
      <backout-plan>backout plan</backout-plan>
      <test-plan>test plan</test-plan>
    </arguments>
  </service-now-request>



The following figure shows the adapter response for the sample request:

Sample adapter response for the Create Change 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>
          <backout-plan>backout plan</backout-plan>
          <category>Other</category>
          <change-plan>change plan</change-plan>
          <cmdb-ci>*JEMPLOYEE-IBM</cmdb-ci>
          <contact-type>Phone</contact-type>
          <description>desc</description>
          <end-date>2010-03-29 20:30:50</end-date>
          <escalation>Normal</escalation>
          <impact>3 - Low</impact>
          <knowledge>0</knowledge>
          <made-sla>1</made-sla>
          <number>CHG0031327</number>
          <opened-at>2010-05-24 17:26:19</opened-at>
          <opened-by>Jagdeep Singh</opened-by>
          <order>0</order>
          <phase>Requested</phase>
          <phase-state>Open</phase-state>
          <priority>4 - Low</priority>
          <production-system>0</production-system>
          <requested-by>ITIL User</requested-by>
          <requested-by-date>2010-03-29 20:30:45</requested-by-date>
          <review-status>(3)</review-status>
          <risk>Moderate</risk>
          <scope>Medium</scope>
          <short-description>short desc</short-description>
          <start-date>2010-03-29 20:30:48</start-date>
          <state>Open</state>
          <sys-class-name>Change Request</sys-class-name>
          <sys-created-by>qaadmin</sys-created-by>
          <sys-created-on>2010-05-24 17:26:19</sys-created-on>
          <sys-domain>global</sys-domain>
          <sys-id>cb59cd174a362305017fc71622a3b598</sys-id>
          <sys-mod-count>0</sys-mod-count>
          <sys-updated-by>qaadmin</sys-updated-by>
          <sys-updated-on>2010-05-24 17:26:19</sys-updated-on>
          <test-plan>test plan</test-plan>
          <type>Comprehensive</type>
          <upon-approval>Proceed to Next Task</upon-approval>
          <upon-reject>Cancel all future Tasks</upon-reject>
          <urgency>3 - Low</urgency>
          <work-end>2010-03-29 20:30:56</work-end>
          <work-start>2010-03-29 20:30:53</work-start>
        </parameters>
      </item>
    </response>
  </responses>
</service-now-response>

The following figure shows the adapter response for the sample request by using a change template:

<service-now-request>
    <operation-name>create-change</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>
		<requested-by>DavidLounge</requested-by>
		<template-name>change_template</template-name>
	</arguments>
  </service-now-request>
Was this page helpful? Yes No Submitting... Thank you

Comments