Import Set


This topic illustrates the adapter request and response for the Import Set operation.

Create Import Set Record operation

The Create Import Set Record operation creates an import set record.

Note

Before you run the create-import-set-record operation, ensure that you set the following configurations in the ServiceNow environment:

  • Import set tables and transform maps are created in ServiceNow
  • System Import Set plug-in has been enabled

For more information about import sets in ServiceNow, see the ServiceNow documentation.

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

 Adapter request elements for the Create Import Set Record operation 

Here, the <category><comments> and <uuid> elements are derived from the import set that you have defined in the ServiceNow application. The "Find Import Set Fields" wrapper in the "Utilities" folder can be used to list the fields of an import set table. 

The following figure displays a sample adapter request for this operation. 

Sample adapter request for the Create Import Set Record operation 

 <request-data>
 <service-now-request>
   <operation-name>create-import-set-record</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>
     <importset-table>imp_notification</importset-table>
     <category>Cat</category>
     <comments>myComments</comments>
     <uuid>3210321</uuid>
   </arguments>
 </service-now-request>
</request-data>

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

Sample adapter response for the Create Import Set Record 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>
         <sys-id>ed1f1de94a3623050128303a9af901c4</sys-id>
         <table>incident</table>
         <display-name>number</display-name>
         <display-value>INC0011019</display-value>
         <status>inserted</status>
       </parameters>
     </item>
   </response>
 </responses>
</service-now-response>

Find Import Set Record

The Find Import Set Record operation finds records from the import set table. This operation can also find records from any table.

 The following table describes the elements for this request.

Adapter request elements for the Find Import Set Record operation

Element

Definition

Required

<operation-name>

Specifies the name of the operation you want to perform: create-import-set-record

Yes

<proxy-settings>

Specifies the parent element that contains the proxy server information.

To enable <proxy-settings>, do these steps:

  1. On the server or the peer on which the ServiceNow adapter is installed and running, open the command line.
  2. Go to the <AO_HOME>\tomcat\bin directory and run the following command:

    tomcat9w.exe //ES//<PEER_SERVICE_NAME>
    Example
    tomcat9w.exe //ES//BAO_CDP
  3. On the service dialog box, click the Java tab, and in Java options, add the following property: 

    -Djdk.http.auth.tunneling.disabledSchemes=””
  4. Restart the service. 

No

<host>

Specifies the IP or host name of the proxy server

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

<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 authenticating the proxy server

No

<password>

Specifies the password that corresponds to <user-name> 

You can encrypt the password by specifying the encryption-typeattribute. 

For example: <password encryption-type = "Base64">cGFzc3dvcmQ=</password> 

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

No

<arguments>

Specifies a list of arguments required for this operation

Other than <connection-parameters> and <importset-table>, there are no defined set of child elements for this element. 

Child elements for this element are derived from the fields of the import set table that you defined in the ServiceNow application. The "Find Import Set Fields" wrapper in the "Utilities" folder can be used to list the fields of an import set table.

Yes

<connection-parameters>

Specifies the parent element for <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 to be used for remote host authentication

Conditional; required if you specify the<connection-parameters> element

<password>

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

You can encrypt the password by specifying the encryption-typeattribute. 

For example: <password encryption-type = "Base64">cGFzc3dvcmQ=</password>

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

Conditional; required if you specify the<connection-parameters> element

<importset-table>

Specifies the import set table name from where you want to retrieve the records

Valid value: Any valid import set table name

Yes

The following figure describes the sample <items> XML for the Find Import Set Record operation.

Sample <items> XML for the Find Import Set Record operation

<items>
 <item>
   <importset-table>sys_template</importset-table>
   <name>change_template</name>
 </item>
</items>

The following figure describes the sample adapter request for the Find Import Set Record operation.

Sample adapter request for the the Find Import Set Record operation.

 

<service-now-request>
   <operation-name>find-import-set-record</operation-name>
   <arguments>
     <importset-table>task_ci</importset-table>
     <applied>fbd624b93d303140217b005c3446a344</applied>
   </arguments>
</service-now-request>

The following figure describes the adapter response for the Find Import Set Record operation.

Adapter response for the Find Import Set Record operation

<service-now-response>
 <metadata>
   <response-count>1</response-count>
   <status>success</status>
 </metadata>
 <responses>
   <response>
     <metadata>
       <count>6</count>
     </metadata>
     <item>
       <metadata>
         <status>success</status>
       </metadata>
       <parameters>
         <applied>0</applied>
         <ci-item>Java Application Server FLX</ci-item>
         <sys-created-by>felix.bait</sys-created-by>
         <sys-created-on>2015-02-02 11:30:12</sys-created-on>
         <sys-id>0f685fa437501000bff8e0f617733494</sys-id>
         <sys-mod-count>0</sys-mod-count>
         <sys-updated-by>felix.bait</sys-updated-by>
         <sys-updated-on>2015-02-02 11:30:12</sys-updated-on>
         <task>CHG0000015</task>
       </parameters>
     </item>
    </response>
 </responses>
</service-now-response>

 

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