ServiceNow Connector Reference¶ Connection configuration¶ The connection is used to establish a connection to the ServiceNow instance. The ServiceNow API requires all requests to be authenticated as a user. User has to create a own instance with his user credentials. When you create an account in ServiceNow Developer page then you are enable to create your own instance. For more information, see the ServiceNow Developer page. SERVICENOW Connection Parameter Name Description Required serviceNowInstanceURL The base endpoint URL of the ServiceNow API. Yes. username The user Name of the own instance. Yes. password The Password of the own instance. Yes. Sample configurations <servicenow.init> <serviceNowInstanceURL>{$ctx:serviceNowInstanceURL}</serviceNowInstanceURL> <username>{$ctx:username}</username> <password>{$ctx:password}</password> </servicenow.init> Sample request { "serviceNowInstanceURL":"https://dev17686.service-now.com", "username":"admin", "password":"12345" } The following operations allow you to work with the ServiceNow Connector. Click an operation name to see parameter details and samples on how to use it. Aggregate Management¶ servicenow.getAggregateRecordThe getAggregateRecord operation allows you to compute aggregate statistics about existing table and column data. Parameter Name Description Required tableName Name of the table you want to retrieve a record. Yes sysparmAvgFields A comma-separated list of fields for which to calculate the average value. No sysparmMinFields A comma-separated list of fields for which to calculate the minimum value. No sysparmMaxFields A comma-separated list of fields for which to calculate the maximum value. No sysparmSumFields A comma-separated list of fields for which to calculate the sum of the values. No sysparmCount You can set this parameter to true for the number of records returned by the query. No Sample configurations <servicenow.getAggregateRecord> <tableName>{$ctx:tableName}</tableName> <sysparmAvgFields>{$ctx:sysparmAvgFields}</sysparmAvgFields> <sysparmCount>{$ctx:sysparmCount}</sysparmCount> </servicenow.getAggregateRecord> Sample request { "tableName":"incident", "sysparmAvgFields":"category,active", "sysparmCount":"true", } Import Set Management¶ servicenow.getRecordStagingTableThe getRecordStagingTable operation retrieves the associated record and resulting transformation result. Parameter Name Description Required tableNameStaging Name of the staging table you want to retrieve records. Yes. sysIdStaging The Id that is automatically generated by ServiceNow. It is a unique value for each record. Yes. Sample configurations <servicenow.getRecordsStagingTable> <tableNameStaging>{$ctx:tableNameStaging}</tableNameStaging> <sysIdStaging>{$ctx:sysIdStaging}</sysIdStaging> </servicenow.getRecordsStagingTable> Sample request { "tableName":"incident", "sysparmAvgFields":"category,active", "sysparmMinFields":"number", "sysparmMaxFields":"number", "sysparmCount":"true", "sysparmSumFields":"priority" } servicenow.postRecordStagingTableThe postRecordStagingTable operation inserts incoming data into a specified staging table and triggers transformation based on predefined transform maps in the import set table. Parameter Name Description Required tableNameStaging Name of the staging table you want to retrieve records. Yes. serialNumber This is an attribute in the table. Specify the row value for serialNumber. Yes. cpuCount This is an attribute in the table. Specify the row value for cpuCount. Yes. manufacturer This is an attribute in the table. Specify the row value for manufacturer. Yes. name This is an attribute in the table. Specify the row value for name. Yes. operatingSystem This is an attribute in the table. Specify the row value for operatingSystem. Yes. diskSpace This is an attribute in the table. Specify the row value for diskSpace. Yes. ram This is an attribute in the table. Specify the row value for ram. Yes. apiColumns The attribute values of your table in your instance. Yes. Sample configurations <servicenow.postRecordStagingTable> <tableNameStaging>{$ctx:tableNameStaging}</tableNameStaging> <serialNumber>{$ctx:serialNumber}</serialNumber> <cpuCount>{$ctx:cpuCount}</cpuCount> <manufacturer>{$ctx:manufacturer}</manufacturer> <name>{$ctx:name}</name> <operatingSystem>{$ctx:operatingSystem}</operatingSystem> <diskSpace>{$ctx:diskSpace}</diskSpace> <ram>{$ctx:ram}</ram> <apiColumns>{$ctx:apiColumns}</apiColumns> </servicenow.postRecordStagingTable> Sample request { "tableNameStaging":"imp_computer", "serialNumber":"282", "cpuCount":"234", "name":"Mac", "operatingSystem":"ubunthu", "manufacturer":"IBM", "diskSpace":"400Gb", "ram":"ram 1500", "apiColumns": {"sys_mod_count":"2","sys_import_state_comment":"wwww"} } Table Management¶ servicenow.postRecordThe postRecord operation inserts a new record into a specified table. Parameter Name Description Required tableName Name of the table you want to insert a record. Yes sysparmDisplayValue Data retrieval operation for reference and choice fields. No sysparmFields Comma-separated field names to return in the response. No sysparmView UI view to determine fields returned in the response. No sysparmExcludeReferenceLink Additional information provided for reference fields. No sysparmInputDisplayValue Data insert or update operations. No number The row value for number. No shortDescription The row value for short_description. No active The row value for active. No approval The row value for approval. No category The row value for category. No contactType The row value for contact. No apiColumns The attribute values of your table in your instance. No Sample configurations <servicenow.postRecord> <tableName>{$ctx:tableName}</tableName> </servicenow.postRecord> Sample request { "tableName":"incident" } servicenow.getRecordsThe getRecords operation retrieves a records from a specified table. Parameter Name Description Required tableName Name of the table you want to retrieve a record. Yes sysparmQuery An encoded query. The encoded query provides support for order by and filter out records. No sysparmDisplayValue Data retrieval operation for reference and choice fields. No sysparmFields Comma-separated field names to return in the response. No sysparmView UI view to determine fields returned in the response. No sysparmLimit Limit to be applied on pagination. The default is 10000. No sysparmOffset A number of records to skip before returning records. No sysparmExcludeReferenceLink Additional information provided for reference fields. No sysparmReadReplicaCategory The category value to read data from read replicas. No sysparmReadReplicaCategory The category value to read data from read replicas. No keyValuePairs Alternative query syntax: field1=value1,field2=value2. No Sample configurations <servicenow.getRecords> <tableName>{$ctx:tableName}</tableName> </servicenow.getRecords> Sample request { "tableName":"incident" } servicenow.getRecordByIdThe getRecordById operation retrieves record according to the system ID from table. Parameter Name Description Required tableName Name of the table you want to retrieve a record. Yes sysId System Id of the record to retrieve. No sysparmDisplayValue Data retrieval operation for reference and choice fields. No sysparmFields Comma-separated field names to return in the response. No sysparmView UI view to determine fields returned in the response. No sysparmExcludeReferenceLink Additional information provided for reference fields. No Sample configurations <servicenow.getRecordById> <tableName>{$ctx:tableName}</tableName> </servicenow.getRecordById> Sample request { "tableName":"incident" } servicenow.putRecordByIdThe putRecordById operation updates an existing record in a specified table. Parameter Name Description Required tableName Name of the table you want to update a record. Yes sysId System Id of the record to update. Yes sysparmDisplayValue Data retrieval operation for reference and choice fields. No sysparmFields Comma-separated field names to return in the response. No sysparmView UI view to determine fields returned in the response. No sysparmExcludeReferenceLink Additional information provided for reference fields. No sysparmInputDisplayValue Data insert or update operations. No number The row value for number. No shortDescription The row value for short_description. No active The row value for active. No approval The row value for approval. No category The row value for category. No contactType The row value for contact. No apiColumns The attribute values of your table in your instance. No Sample configurations <servicenow.putRecordById> <tableName>{$ctx:tableName}</tableName> <sysId>{$ctx:sysId}</sysId> </servicenow.putRecordById> Sample request { "tableName":"incident", "sysId":"f0c1b2c3d4e5f6g7h8i9j0k1l2m3n4o5" } servicenow.patchRecordByIdThe patchRecordById operation updates an existing record in a specified table. Parameter Name Description Required tableName Name of the table you want to update a record. Yes sysId System Id of the record to update. Yes sysparmDisplayValue Data retrieval operation for reference and choice fields. No sysparmFields Comma-separated field names to return in the response. No sysparmView UI view to determine fields returned in the response. No sysparmExcludeReferenceLink Additional information provided for reference fields. No sysparmInputDisplayValue Data insert or update operations. No number The row value for number. No shortDescription The row value for short_description. No active The row value for active. No approval The row value for approval. No category The row value for category. No contactType The row value for contact. No apiColumns The attribute values of your table in your instance. No Sample configurations <servicenow.patchRecordById> <tableName>{$ctx:tableName}</tableName> <sysId>{$ctx:sysId}</sysId> </servicenow.patchRecordById> Sample request { "tableName":"incident", "sysId":"f0c1b2c3d4e5f6g7h8i9j0k1l2m3n4o5" } servicenow.deleteRecordByIdThe deleteRecordById operation deletes a record from a specified table. Parameter Name Description Required tableName Name of the table you want to delete a record. Yes sysId System Id of the record to delete. Yes Sample configurations <servicenow.deleteRecordById> <tableName>{$ctx:tableName}</tableName> <sysId>{$ctx:sysId}</sysId> </servicenow.deleteRecordById> Sample request { "tableName":"incident", "sysId":"f0c1b2c3d4e5f6g7h8i9j0k1l2m3n4o5" }