ServiceNow

ServiceNow

ServiceNow

Service now plugin step are used to perform operations on ServiceNow forms such as Incident, Request, Problem, Change etc. 


Compatibility: This plugin is compatible with ServiceNow – Jakarta, London Versions


Prerequisites:

  1. ServiceNow Login account and ServiceNow instance URL and credentials.
  2. Internet connectivity and access to ServiceNow instance from AutomationEdge Agent Machine.


Service Now: Delete Record

Description

Service Now: Delete Record plugin step deletes a record in a selected Application in Service Now (e.g. Incident, Request, Problem, Change etc.). Users can delete a record from the selected Application based on user permissions.


Configurations 

No.

Field Name

Description

1

Step Name

Name of the step.  This name has to be unique in a single workflow.


Connection:


2

ServiceNow Base URL

Specify URL of the Service Now Instance.

(e.g. https://XXXXXX.service-now.com)

3

Username

Specify a username to authenticate to the Service-Now instance. This field is mandatory.

  1. User must have appropriate permissions in ServiceNow to delete a record through ‘ServiceNow: Delete Record’ step.
  2. User must be authorized to access table: sys_dictionary


Password:


4

Checkbox: Accept Value as variable/static

Leave checkbox unchecked to accept Password value from a field in the previous steps of the stream using a drop down list. 

Else enable checkbox for Password field to appear as Text box.

5

Password

The Password to the username to authenticate to ServiceNow. Password is encrypted and not stored in the .psw file. Password is entered using a widget. The widget handles both Text (static value or environment variable) and a Combo (drop down containing values from previous steps). This field is mandatory.


If checkbox above is enabled Password field appears as a Text box. Else if checkbox above is disabled Password a field appears as a drop down to select fields from previous steps.


Button:


6

Test Connection

Click Test Connection Button to verify whether the connection is established or not. ServiceNowBase 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.


Input Tab:

No.

Field Name

Description


Input Fields:


1

Form Name

A form name needs to be selected from the form explorer in which a document/record is to be deleted. A form explorer is opened by clicking the Get 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 window. Select a form from the form names displayed or filter form names using the filter field.

3

Criteria Field

Select a field from the Field Explorer window associated with the selected form.

4

Button: Get

Click button to open Field Explorer window populated with the list of fields associated with the Form Name on the ServiceNow instance.

5

Criteria Value

Specify the valid value for the selected field. If an invalid value is provided then no result record is returned. Additionally, provide an appropriate value to this field so as to make a unique qualification that fetches a distinct Record.


Note: This Criteria Fields and Criteria Value make a search query on the selected form. And if the number of records returned is exactly one then that record is deleted else the workflow is aborted.



Confirmation Buttons:

No.

Field Name

Description

1

OK

Click OK to confirm Delete operation. 

Note: User must have appropriate permissions in ServiceNow to delete a record through ServiceNow Delete Plugin.

2

Cancel

Click Cancel to Cancel the operation.



Service Now: Download Attachments

Description

Service Now: Download Attachment plugin step downloads all attachments associated with a ServiceNow record. 

Configurations 

Connection:

No.

Field Name

Description

1

Step Name

Name of the step.  This name has to be unique in a single workflow.

2

ServiceNow Base URL

Specify URL of the Service Now Instance.

(e.g. https://XXXXXX.service-now.com)

3

User Name 

Specify a username to authenticate to the Service-Now instance. This field is mandatory.

  1. User must have appropriate permissions in ServiceNow to Download Attachments through ‘ServiceNow: Download Attachments’ step.
  2. User must be authorized to access table: sys_dictionary


Password:


4

Accept Value as variable/static

Leave checkbox unchecked to accept Password value from a field in the previous steps of the stream using a drop down list. 

Else enable checkbox for Password field to appear as Text box.

5

Password

Provide the Cherwell Password for the user.  Password is entered using a widget. The widget handles both Text (static value or environment variable) and Combo (drop down containing values from previous steps). This field is mandatory.


If checkbox above is enabled Password field appears as a Text box. Else if checkbox above is disabled Password field appears as a drop down to select fields from previous steps.

7

Button: Test Connection

Click Test Connection Button to verify whether the connection is established or not. ServiceNowBase 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.


Input Fields:

No.

Field Name

Description

1

Form Name  

Select a Form name from the Form Explorer window for downloading all attachments associated with a record of this form. This field is mandatory.

2

Button: Get 

Click Get Forms Button to open Form Explorer window with form namesSelect a form name displayed or filter form names using the filter field.

3

Table Sys ID

The Sys ID of the record for which associated attachments need to be downloaded.

The following screenshot shows that sys_id can be copied by right clicking on  a particular record and clicking Copy sys_id option. 

4

Output Folder Path

Specify a folder path where files are to be downloaded or browse for a folder using the Browse File… button. Alternatively, when the folder path is coming from an input stream, you may select the field containing the folder path from the drop down list

5

Button: Browse Folder

Click this button to browse for a folder to download to a Cherwell Business Object file.

6

Delete Output Folder Contents before downloading

Allowed values:  ‘Yes’, ‘No’. Specify Yes to delete output folder contents before downloading else Specify No.

7

Add Date TimeStamp for Duplicate Files

Allowed values:  ‘Yes’, ‘No’.  Specify Yes to add 

Date TimeStamp for Duplicate Files.

8

Add File To Result

Allowed values:  ‘Yes’, ‘No’.  Specify Yes to add the downloaded 

files to result set and display download link on AE otherwise else select No.


Output Tab:

No.

Field Name

Description

1

Total Files 

Specify a field name to store the total number of files in the Cherwell Business Object. This field is mandatory.

2

Downloaded Files

Specify a field name to store the number of Downloaded Files. 

This field is mandatory.

3

Overwritten Files

Specify a field name to store the number of Overwritten Files in the output folder. This field is mandatory. 


Result:

There is no explicit output Result field in this plugin. Plugin results weather success or error can be captured using Set Workflow Result. Errors can be captured in error handling as discussed in Appendix 1: Error Handling in IT Plugins to make the error message visible on AutomationEdge Requests.


Common Buttons:

No.

Field Name

Description


Buttons:


1

OK

On click of this button. It will check the field values.  If any required field values are missing then it will display validation error message.

If all the required field values are provided then it will save the field values.

2

Cancel

On click of this button, it will cancel the window and do not save any values


Service Now: Input

Description

Service Now: Input plugin step fetches chosen fields for all ServiceNow records matching criteria query. 


Configurations 

No.

Field Name

Description

1

Step Name

Name of the step.  This name has to be unique in a single workflow.


Connection:


2

ServiceNow Base URL

Specify URL of the Service Now Instance.

(e.g. https://XXXXXX.service-now.com)

3

Username

Specify a username to authenticate to the Service-Now instance. This field is mandatory.

  1. User must have appropriate permissions in ServiceNow to Download Attachments through ‘ServiceNow: Download Attachments’ step.
  2. User must be authorized to access table: sys_dictionary


Password:


4

Checkbox: Accept Value as variable/static

Leave checkbox unchecked to accept Password value from a field in the previous steps of the stream using a drop down list. 

Else enable checkbox for Password field to appear as Text box.

5

Password

The Password to the username to authenticate to ServiceNow. Password is encrypted and not stored in the .psw file. Password is entered using a widget. The widget handles both Text (static value or environment variable) and Combo (drop down containing values from previous steps). This field is mandatory.


If checkbox above is enabled Password field appears as a Text box. Else if checkbox above is disabled Password field appears as a drop down to select fields from previous steps.


Button:


6

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:

No.

Field Name

Description


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,

  1. short_description=RPA Test
  2. number= INC0010097
  3. 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 shoes 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.

  1. 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.be

ginningOfToday()@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 32 Appendix 6: Build Criteria Query in SNOW UI  

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.


Output Tab:

No.

Field Name

Description


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:

No.

Field Name

Description

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.



Service Now: Insert Record

Description

ServiceNow: Insert Record plugin step inserts a Record (e.g. Incident, Request, Problem, Change etc.) in ServiceNow application.


Configurations 

No.

Field Name

Description

1

Step Name

Name of the step.  This name has to be unique in a single workflow.


Connection:


2

ServiceNow Base URL

Specify URL of the Service Now Instance.

(e.g. https://XXXXXX.service-now.com)

3

Username

Specify a username to authenticate to the Service-Now instance. This field is mandatory.

  1. User must have appropriate permissions in ServiceNow to Download Attachments through ‘ServiceNow: Download Attachments’ step.
  2. User must be authorized to access table: sys_dictionary


Password:


4

Checkbox: Accept Value as variable/static

Leave checkbox unchecked to accept Password value from a field in the previous steps of the stream using a drop down list. 

Else enable checkbox for Password field to appear as Text box.

5

Password

The Password to the username to authenticate to ServiceNow. Password is encrypted and not stored in the .psw file. Password is entered using a widget. The widget handles both Text (static value or environment variable) and Combo (drop down containing values from previous steps). This field is mandatory.


If checkbox above is enabled Password field appears as a Text box. Else if checkbox above is disabled Password field appears as a drop down to select fields from previous steps.


Button:


5

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.


Input Tab:

No.

Field Name

Description


Input Fields:


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: 

  1. Lookup field values must exactly match existing values in the Service Now instance else it is ignored.
  2. 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:

Following is a sample JSON for inserting a record in Incident form. This JSON text has one key-value pair denoting field and its value to populate.


e.g. on Incident application there could be JSON field as shown below where field JSON is coming from the input stream such as a field in Generate Rows, CSV etc. 


Sample value of JSON:

{“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.


For example for Problem

{"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.



Service Now: Update Record

Description

Service Now: Update Record plugin step is designed to update a record in a ServiceNow Appllication such as Incident, Request, Problem, Change etc.

Configurations 

No.

Field Name

Description

1

Step Name

Name of the step.  This name has to be unique in a single workflow.


Connection:


2

ServiceNow Base URL

Specify URL of the Service Now Instance.

(e.g. https://XXXXXX.service-now.com)

3

Username

Specify a username to authenticate to the Service-Now instance. This field is mandatory.

  1. User must have appropriate permissions in ServiceNow to Download Attachments through ‘ServiceNow: Download Attachments’ step.
  2. User must be authorized to access table: sys_dictionary

Password:


4

Checkbox: Accept Value as variable/static

Leave checkbox unchecked to accept Password value from a field in the previous steps of the stream using a drop down list. 

Else enable checkbox for Password field to appear as Text box.

5

Password

The Password to the username to authenticate to ServiceNow. Password is encrypted and not stored in the .psw file.Password is entered using a widget. The widget handles both Text (static value or environment variable) and Combo (drop down containing values from previous steps). This field is mandatory.


If checkbox above is enabled Password field appears as a Text box. Else if checkbox above is disabled Password field appears as a drop down to select fields from previous steps.


Button:


6

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.


Input Tab:

No.

Field Name

Description


Input Fields:


1

Form Name

A form name needs to be selected from the form explorer in which a document/record is to be updated. 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 Field

Double click on this field to get the list of fields associated with the selected form.

4

Button: Get


5

Criteria Value

Specify the valid value for the selected field. If an invalid value is provided then no result record is returned. Additionally, provide an appropriate value to this field so as to make a unique qualification that fetches a distinct Record.


Note: This Criteria Fields and Criteria Value will make a search query on the selected form. And if the number of records returned is exactly one then that record is updated else the workflow is aborted.

6

Accept fields as JSON

Enable checkbox to accept field names as JSON input.

7

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: 

  1. Lookup field values must exactly match existing values in the Service Now instance else it is ignored.
  2. 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.



Following is a sample JSON text for updating an Incident record:

This JSON text has one key-value pair denoting field and its value to populate.


e.g. on Incident application there could be JSON field as shown below where field JSON is coming from the input stream such as a field in Generate Rows, CSV etc. 


Sample value of JSON for incident application:

{“short_description”:”Test_JSON_update_Incident”}


Following is a sample JSON for updating a record in Problem application. 


e.g. on Problem Application there could be JSON field as shown below, where field JSON is coming from the input stream such as a field in Generate Rows, CSV etc. 

Sample value of JSON1for Problem application:

{"short_description":"Hello There!","work_notes":"Test updating Record."}


Table Fields:


8

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.

9

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.

10

Field Value

Provide field values to be updated 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

SysId Field Name

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.

2

Result

Provide a field name to hold the result of the step.


Confirmation Buttons:

No.

Field Name

Description

1

OK

Click OK to confirm Update operation. 

Note: User must have appropriate permissions in ServiceNow to update a record through ServiceNow Update Plugin.

2

Cancel

Click Cancel to Cancel the operation.


Service Now: Upload Attachment

Description

Service Now: Upload Attachment step is used to upload a file to a Service Now record.

Configurations 

Connection:

No.

Field Name

Description

1

Step Name

Name of the step.  This name has to be unique in a single workflow.

2

ServiceNow Base URL

Specify URL of the Service Now Instance.

(e.g. https://XXXXXX.service-now.com)

3

User Name 

Specify a username to authenticate to the Service-Now instance. This field is mandatory.

  1. User must have appropriate permissions in ServiceNow to Download Attachments through ‘ServiceNow: Download Attachments’ step.
  2. User must be authorized to access table: sys_dictionary


Password:


4

Accept Value as variable/static

Leave checkbox unchecked to accept Password value from a field in the previous steps of the stream using a drop down list. 

Else enable checkbox for Password field to appear as Text box.

5

Password

Provide the Cherwell Password for the user.  Password is entered using a widget. The widget handles both Text (static value or environment variable) and Combo (drop down containing values from previous steps). This field is mandatory.


If checkbox above is enabled Password field appears as a Text box. Else if checkbox above is disabled Password field appears as a drop down to select fields from previous steps.

6

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.


Input Fields:

No.

Field Name

Description

1

Form Name  

Select a Form name from the Form Explorer window for which we need to upload an attachment.

2

Button: Get 

Click this button, to populate the list of form names in the ServiceNow instance in the Form Explorer window.

3

Table Sys ID  

The Sys ID of the record to which an attachment needs to be uploaded.

The following screenshot shows that sys_id can be copied by right clicking  on a particular record.


4

Input File Path

  1. Provide the absolute file path for the file to be uploaded as an attachment. 
  2. Alternately, Browse the file using the Browse button.
  3. Alternatively when the filename is coming from an input stream, you may select the field containing the filename from the drop down list.

5

Button: Browse

Click button to browse a file to be uploaded to a SNOW instance. 


Result:

There is no explicit output Result field in this plugin. Plugin results weather success or error can be captured using Set Workflow Result. Errors can be captured in error handling as discussed in Appendix 1: Error Handling in IT Plugins to make the error message visible on AutomationEdge Requests.


Common Buttons:

No.

Field Name

Description


Buttons:


1

OK

On click of this button. It will check the field values.  If any required field values are missing then it will display validation error message.

If all the required field values are provided then it will save the field values.

2

Cancel

On click of this button, it will cancel the window and do not save any values






      Links to better reach 

            Bot Store

             EPD