Insert Record
Description
ServiceNow: Insert Record plugin step inserts a Record (e.g. Incident, Request, Problem, Change etc.) in ServiceNow application.
Field Descriptions
No. | Field Name | Description |
---|---|---|
1 | Step Name | Name of the step. This name must be unique within a workflow. Connection: |
2 | Grant Type | Select the type of grant from OAuth 2.0 or Basic Auth. Data type: String Mandatory: Yes Notes:
|
3 | ServiceNow Base URL | Specify the URL of the ServiceNow instance. e.g. https://XXXXXX.service-now.com |
4 | Client ID | Specify the Client ID of the registered application on the ServiceNow instance. Data type: String Mandatory: Yes Note: Available when the grant type is OAuth 2.0. |
5 | Client Secret | Specify the Client Secret of the registered application on the ServiceNow instance. Data type: String Mandatory: Yes Note: Available when the grant type is OAuth 2.0. |
5.a | Checkbox: Accept Value as variable/static | Leave the checkbox unchecked to select the client secret from a field in previous steps (dropdown). Check the checkbox to display the client secret field as a text box. |
5.b | Client Secret | Encrypted and not stored in the .psw file. Enter the Client Secret using the widget. The widget supports both text (static/environment variable) and combo (dropdown from previous steps).Mandatory: Yes Behavior: If the checkbox is enabled, this field appears as a text box. If disabled, it appears as a dropdown. |
6 | Refresh Token | Specify the refresh token to obtain a new access token. Data type: String Mandatory: Yes Note: Available when the grant type is OAuth 2.0. |
6.a | Checkbox: Accept Value as variable/static | Leave the checkbox unchecked to select the refresh token from a field in previous steps (dropdown). Check the checkbox to display the refresh token field as a text box. |
6.b | Refresh Token | Encrypted and not stored in the .psw file. Enter the refresh token using the widget. The widget supports both text (static/environment variable) and combo (dropdown from previous steps).Mandatory: Yes Behavior: If the checkbox is enabled, this field appears as a text box. If disabled, it appears as a dropdown. |
7 | Username | Specify the username to authenticate with the ServiceNow instance. Data type: String Mandatory: Yes Note: Available when the grant type is Basic Auth. |
8 | Password | Specify the password to authenticate with the ServiceNow instance. Note: Available when the grant type is Basic Auth. |
8.a | Checkbox: Accept Value as variable/static | Leave the checkbox unchecked to select the password from a field in previous steps (dropdown). Check the checkbox to display the password field as a text box. |
8.b | Password | Password for authentication is encrypted and not stored in the .psw file. Enter the password using the widget. The widget supports both text (static/environment variable) and combo (dropdown from previous steps).Mandatory: Yes Behavior: If the checkbox is enabled, this field appears as a text box. If disabled, it appears as a dropdown. |
9 | Test Connection | Click Test Connection to verify whether the connection is established. Mandatory fields: ServiceNow Base URL, Username, and Password. Note: This button does not support values sourced from previous steps, as they are only available at runtime. Static values and environment variables are supported. Once the connection is successful, all requisite forms and fields in Input and Output sections are populated. The connection fields may then be replaced with values from previous steps. |
Input Tab
No. | Field Name | Description |
---|---|---|
1 | Form Name | A form name needs to be selected from the form explorer in which a document/record is to be created. 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 | Accept fields as JSON | Enable checkbox to accept field names as JSON input. |
4 | JSON | If ‘Accept Fields as JSON’ checkbox is enabled, this field is activated. Choose a field containing the JSON text. JSON text should contain key-value pairs enclosed by double quotes (“) enclosure with a colon separating them. Key-value pairs denote fields and their values to populate. Provide all the required or mandatory fields as well as other fields to be updated as keys in the JSON. Note: • Lookup field values must exactly match existing values in the Service Now instance else it is ignored. • The JSON could be from any input step such as Generate rows, Text File input, Excel Input et al. In SNOW steps JSON text can only be accepted from input fields from previous steps and not as files directly. At least one input field must be provided. Either using JSON or Table Fields. ![]() Sample JSON text for inserting an Incident record: {“short_description”:”Test_Incident”} Sample JSON text for inserting a Problem record: Following is a sample JSON for inserting a record in Problem form. This JSON text has one key-value pair denoting field and its value to populate. ![]() {"short_description":"Hello There!","work_notes":"Test Inserting Record."} |
Tabular Fields | ||
5 | Variable Field Name | This is an optional field. Choose a field in input stream from drop down list or provide a user or system defined variable. |
6 | Static Field Name | On click of this column field, it opens a dialog with the list of available form fields of the provided Form Name. The name of the fields to be inserted should be selected. Multiple fields can be selected from the list displayed on click. The selected field’s values below will be inserted in the record. Validation: The plugin validates field names from remedy server. If ‘Static Field Name’ and ‘Variable Field Name’, both are provided in the same row in ‘Table Fields’ then ‘Static Field Name’ will be considered to build the JSON to insert a record. |
7 | Field Value | Provide field values to be inserted in the corresponding chosen fields. Following, is a sample snapshot of input tab with Table Fields with Static Field Name. ![]() Following, is a sample snapshot of input tab with Table Fields with Variable Field Name. ![]() Note: If the selected Field Name is mapped with any Lookup List on the backend then, in that case, it will accept only valid mapped values in the Field Value and the ticket will be created. But if an invalid value is provided to such Fields then the ticket will take the default value mapped with that Field on the backend. |
Output Tab:
No. | Field Name | Description |
---|---|---|
Output Fields: | ||
1 | Record Number | Holds the document/record id of the request created in service-now. |
2 | Sys ID | Each record in the instance is identified by a unique 32-character GUID (Globally Unique ID) called a Sys ID (sys_id). Holds the sysid of the record created. |
3 | Result | Provide a field name to hold the result of the step. |
Confirmation Buttons:
No. | Field Name | Description |
---|---|---|
1 | OK | Click OK to confirm Insert operation. Note: User must have appropriate permissions in ServiceNow to insert a record through ServiceNow Insert Plugin. |
2 | Cancel | Click Cancel to Cancel the operation. |