ServiceNow Query
On this Page
Snap type: | Read | |||||||
---|---|---|---|---|---|---|---|---|
Description: | This Snap connects to the particular instance provided by ServiceNow, executes the query and fetches the records or keys depending on the chosen action, and returns the result as a document stream.
| |||||||
Prerequisites: | None | |||||||
Support and limitations: |
| |||||||
Account: | This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Configuring ServiceNow Accounts for information on setting up this type of account. | |||||||
Views: |
| |||||||
Settings | ||||||||
Label | Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline. | |||||||
Table name | Required. The name of the table in the instance. The table name is suggestible but requires an account setting for the suggestions to appear. Only accounts that have the 'Personalize dictionary' role can see the field labels associated with each table in the ServiceNow data dictionary. Therefore, accounts used with Snaps in this Snap Pack must have the ‘Personalize dictionary’ permission if you want to view the Table name suggestions.. Example: incident Default value: [None] | |||||||
API type | Required. A property that determines which API to be used. Options available include:
Default API does not support OrderBy in the Query Field due to ServiceNow Limitation. Default value: default | |||||||
Query | An encoded query string to filter the records. For more information, see Encoded Query Strings. Example: active=true
| |||||||
Fields | This property specifies the fields to be retrieved from the table. | |||||||
Display value | A property that determines whether to display values for the reference fields.Â
Default value: true | |||||||
Page size | Required. Number of documents for processing in a single batch. Minimum Value: 1 Maximum Value: 500 Default Value: 500 Set the value as 1 when using the Snap in an Ultra Pipeline. | |||||||
Display variables | A property that determines whether to display composite fields in a hierarchical order.
Default value: Selected | |||||||
Pass through | If selected, the input document will be passed through to the output view under the key 'original'.
| |||||||
Allow empty query result | A property that determines whether the query for an empty result is allowed or not. If selected, the Snap writes an empty document when it fetches no records. Otherwise, an exception is thrown. Default value: Not selected | |||||||
Number of retries | Specifies the maximum number of retry attempts when the Snap fails to read. Example: 3 Minimum value: 0 Default value: 0 | |||||||
Retry interval (seconds) | Specifies the minimum number of seconds the Snap must wait before each retry attempt. Example: 3 Minimum value: 1 Default value: 1 | |||||||
Snap Execution | Select one of the following three modes in which the Snap executes:
Default Value:Â Execute only |
For more information on how to define the Action and Query, see Action Parameters.Â
Example
The example assumes that you have configured & authorized a valid ServiceNow account (see Configuring ServiceNow Accounts) to be used with this Snap. Â
The following ServiceNow Query Snap shows how you can query and retrieve records from a ServiceNow table. The following Snap queries the incident table. The Snap specifies that the query results include only some of the columns (Such as active, upon_approval, location, impact, urgency) in the incident table.
When the API type is set to default, the Query field specifies the filter condition. When the API type is set to table, the Fields field specifies the filter condition. In the below example, if the API type is specified as default, then the specified Query searches the active column and returns all the records that have the column field value as true (active=true).Â
Â
After successful validation of the Snap, you will see a data preview that shows the query results:Â
You can also learn how to use ServiceNow Query Snap from the example pipeline (Pipeline: Data from Salesforce.com and ServiceNow).
Snap Pack History
Have feedback? Email documentation@snaplogic.com | Ask a question in the SnapLogic Community
© 2017-2024 SnapLogic, Inc.