Input
Description
ServiceNow: Input plugin step fetches chosen fields for all ServiceNow records matching criteria query.
Configurations
No. | Field Name | Description |
---|---|---|
Connection: | ||
1 | Step Name | Name of the step. This name has to be unique in a single workflow. |
2 | Grant Type | Select the type of grant from OAuth 2.0 or Basic Auth. The data type is String. This is a mandatory field. Notes: - Client ID, Client Secret and Refresh Token are displayed when Grant Type is OAuth 2.0. - Username and Password are displayed when Grant Type is Basic Auth. |
3 | ServiceNow Base URL | Specify URL of the Service Now Instance. (e.g. https://XXXXXX.service-now.com) |
4 | Client ID | Specify the Client ID of the registered application on the ServiceNow instance. The data type is String. This is a mandatory field. Note: The field is available if the grant type is, OAuth 2.0. |
5 | Client Secret | Specify the Client Secret of the registered application on the ServiceNow instance. The data type is String. This is a mandatory field. Note: The field is available if the grant type is, OAuth 2.0. |
6 | Refresh Token | Specify Refresh Token to obtain a new Access Token. The data type is String. This is a mandatory field. Note: The field is available if the grant type is, OAuth 2.0. |
7 | User Name | Specify the user name to authenticate ServiceNow instance. The data type is String. This is a mandatory field. Note: The field is available if the grant type is, Basic Auth. |
8 | Password: | Specify the password to authenticate ServiceNow instance. The data type is String. This is a mandatory field. Note: The field is available if the grant type is, Basic Auth. |
9 | Button: Test Connection | Click Test Connection Button to verify whether the connection is established or not. ServiceNow Base URL, Username and Password fields are mandatory. Once connection is established All requisite forms and fields in Input and Output fields are populated. Note: Test Connection button, does not work for fields coming from previous steps as these field values can only be accessed when workflow is in running state. Static values and environment variables are allowed. Once input and output field values are populated the connection fields may be replaced with previous step fields. |
Fields Tab: | ||
Input Fields: | ||
1 | Form Name | A form name needs to be selected from the form explorer from which a document/record is to be retrieved. A form explorer is opened by clicking the Get Forms button. Note: Listeners on Form Name do not work for previous step variables, static values or environment variables. |
2 | Button: Get | Click Get Forms Button to open Form explorer. Select a form from the form names displayed or filter form names using the filter field. |
3 | Criteria Query | Fetch all ServiceNow Records matching Criteria Query. You can create simple Criteria Query as shown in the following samples, - short_description=RPA Test - number= INC0010097 - sys_id= ef43c6d40a0a0b5700c77f9bf387afe3 The following screenshot shows that sys_id can be copied by right clicking on a particular record. ![]() Alternatively create filters in SNOW UI and copy Criteria Query from the UI. This is especially useful for complex query criteria with one or more AND, OR criteria. The following is a screen shot of the Incident Application. You can see the filter sign on top of the column headings. It shows the filter Active=True has been applied on All incidents. ![]() You may right click on the filter and click Copy query to copy the Criteria Query. ![]() You may paste this as Criteria Query in the plugin step. - active=true You can now see the filtered list with filter applied: Short_description=RPA or Opened Today. ![]() Right click on the filter and click Copy query. ![]() The Criteria query is as follows: short_description=RPA^ORopened_atONToday@javascript:gs.beginningOfToday()@javascript:gs.endOfToday() You may now use it in the Plugin step. For a detailed description of how to create Criteria query in SNOW UI refer Appendix: Build Criteria Query in SNOW UI Additional information for Criteria Query: To get the display value and/or the actual value of the field in the response, use the following query parameter in the Criteria Query: sysparm_display_value={valid_value} . Valid values: a. true : Returns the display values for all fields. b. false : Returns the actual values from the database of ServiceNow. c. all : Returns both actual and display values. Default value: false Syntax: <Criteria Query>&sysparm_display_value=<valid_value> Example query: number=INC0010001&sysparm_display_value=true There is no preferred method for setting sysparm_display_value . However, specifying the display value may cause performance issues since it is not reading directly from the database of ServiceNow and may include referencing other fields and records. For more information on Service Now: Input step, see https://developer.servicenow.com/dev.do#!/reference/api/rome/rest/c_TableAPI#table-GET. - Sort records in ascending or descending order using the ORDERBY clause. See the following example: state=1^assignment_group=d625dccec0a700a222a0f7900d06^ORDERBYnumber state=1^assignment_group=d625dccec0a700a222a0f7900d06^ORDERBYDESCnumber |
4 | Fetch Records Batch Size | Input step will give the output based upon the batch size. By this provision, it will fetch the records in the provided batches. Default value: 10 Note: Very large Fetch Records Batch Size values can impact system performance. |
5 | Get Top N Records | Specify a value, which will fetch the top number of records in the provided batches. |
Output Tab: | ||
Output Fields: | ||
1 | Field Name | Click Field Name to populate the list of fields associated with the Form Name on the ServiceNow instance. The name of the particular field that has to be fetched should be selected. Multiple fields can be selected from the list displayed on click. The selected fields will be the output parameters of this plugin. Note: If selected field name is Lookup Field (caller_id, assigned to, etc.) then the field values for such fields is not displayed, the URL to get the actual value of that field is returned. The users can use Rest Client to fetch the actual values. |
2 | Output Field | The output field name to store the fields chosen in the Field Name. These output fields will hold the respective values of the Field name selected. |
Confirmation Buttons: | ||
1 | OK | Click OK to confirm Get (Fetch Records) operation. Note: User must have appropriate permissions in ServiceNow to fetch a record through ServiceNow Get Plugin. |
2 | Cancel | Click Cancel to Cancel the operation. |